-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a "dbt deps" api call (#1834) #1837
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave this a spin locally and it doesn't appear to me that the rpc server reparses the packages.yml file when it receives a SIGHUP. That's going to be a requirement here, as we want to be able to manage dependencies without cycling the rpc server.
It does appear that the deps
task works great though -- all of that is 👍 👍 👍
We should also add a dbt clean
task to let folks remove dependencies that they no longer want to include in their projects. That can certainly happen in a separate issue, or we could probably punt on it for the time being -- the rm -rf
nature of dbt clean
sounds... unappealing... in an environment like the rpc server.
Should |
@beckjake yeah - i think that's the move - i don't think there's any viable use case that wouldn't benefit from cleaning out existing deps before downloading new ones. Maybe in the future dbt will check the installed deps and conditionally download new/changed ones, but today is not that day |
Refactor deps - split it up - move most of it into dbt.deps Add the idea of a remote method that does not require a manifest - it does still require config/args - set up the various reloading logic to not care about reloading these methods Add dbt deps api call - also available as if it were from the cli Add tests
Move setting real_task into set_args on the CLI handler Move set_args into the handle() method, and out of task bootstrap - now it happens in the parent/handling process - now the parent process can know what real task was chosen Make the cli handler report status properly
464bc91
to
e4d5ca0
Compare
…, and builds a new manifest
b816207
to
be1c6f5
Compare
dbt clean does not clean the modules path shutil.rmtree does :) bump test timeouts SIGHUP also reloads the config
be1c6f5
to
bf5a6b8
Compare
I played around with this locally and some things didn't quite work as expected. This is what my testing plan looked like:
|
9d367a1
to
fcc0110
Compare
Fix a bug where failed deps were "lost" forever Un-support 'cli_args' + 'deps', skip those tests Add a new test suite for RPC tests Move flaky RPC tests into new suite where they passes like they should
fcc0110
to
45bc25d
Compare
a3bcb84
to
57aa443
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works great! Thanks for your hard work iterating on this very complex bit of server flow. The new test suite here is A+.
Ship it!
Fixes #1834
Fixes #1838
shutil.rmtree
on themodules_path
if it existsKilled
andFailed
task states inps
'sstate
andpoll
'sstatus