vscode-dbt-power-user icon indicating copy to clipboard operation
vscode-dbt-power-user copied to clipboard

Support Live-Share for collaborative editing

Open quimnuss opened this issue 1 year ago • 5 comments

Describe the feature

Live share is essential to everybody doing pair-programming and according to vscode's live-share FAQ, extensions should work with minor changes.

Is it feasible?

Describe alternatives you've considered

Not using dbt power user

Who will benefit?

Everybody doing pair-programming in dbt

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

quimnuss avatar Sep 02 '23 20:09 quimnuss

@quimnuss This seems like an excellent idea. Also, Thank you for volunteering to build out the feature. Looking forward to the PR. Check out the contribution guideline also. Let us know if you need any help.

anandgupta42 avatar Sep 04 '23 18:09 anandgupta42

If dbt power user absolutely requires reading files under /target it might not be possible since guests do not have local access to files outside the workspace. I'm unsure if a degraded experience can be offered nonetheless, hopefully it could read the guest's dbt profiles instead of the host's.

How is the extension retrieving this info at the moment?

I'll try to dig a bit deeper... any help appreciated 😃

polmonso avatar Sep 07 '23 11:09 polmonso

Could you elaborate on what operations you tried when doing a iive share session and what kind of result/errors you faced?

mdesmet avatar Sep 09 '23 13:09 mdesmet

How is the extension retrieving this info at the moment?

The extension relies on the dbt profile information to connect to the database (typically stored in ~/.dbt/. it also uses node's fs library extensively to read files. Both of these are not supported.

It also launches a Python process to interact with dbt.

mdesmet avatar Sep 09 '23 13:09 mdesmet

You asked about how does this degraded experience behave and what we tried to do. The guest can't Run model, preview compiled query nor see the nice-to-have lineage tab, the documentation helpers and so on. Naturally, none of these work, since they heavily rely on fs. It doesn't do anything when you press the buttons if you're the guest. I believe even traveling across models doesn't work either.

Some postgres extensions manage to pull a local config from the guest and run a query you're working together, but for dbt power user sounds complicated to achieve the same quality of life. I'll try to learn a bit more on how do other extensions deal with this, since we'd be fine creating a copy of target or using the guest's profiles. Sounds unpromising tho.

At the moment our workflow is the host previews the compiled query, then both participants can see it and the guest can run it using other postgres/sql extensions without leaving the editor.

quimnuss avatar Sep 09 '23 16:09 quimnuss