Skip to content
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

Testing improvements and new replace_on_push parameter #31

Merged
merged 4 commits into from Jan 22, 2022

Conversation

tomasfarias
Copy link
Owner

DbtDepsOperator could have unintended side-effects if it were to
modify files outside of the packages directory. For this reason, we
added a new test, and extended existing tests to ensure no files are
changed in a dbt project outside of the dbt packages directory.

This should provide more guarantees about the behavior of the
operator, especially when looking to push back files to S3.

Moreover, this PR introduces a new parameter: replace_on_push.
Setting it to False will skip any S3 uploads when a key
already exists. This is useful to guarantee no unexpected files are
changed.

I'm still not super convinced about the solution as ideally
we would like partial replacing; only replacing changed files would be
ideal. This is hard to do with compressed projects, as it would
require downloading and uncompressing the project first. This has
been left for future work.

DbtDepsOperator could have unintended side-effects if it were to
modify files outside of the packages directory. For this reason, we
added a new test, and extended existing tests to ensure no files are
changed in a dbt project outside of the dbt packages directory.

This should provide more guarantees about the behavior of the
operator, specially when looking to push back files to S3.
Setting replace_on_push to False will skip any S3 uploads when a key
already exists. This is useful to guarantee no unexpected files are
changed.

I'm still not super convinced about the solution as ideally
we would like partial replacing; only replacing changed files would be
ideal. This is hard to do with compressed projects, as it would
require downloading and uncompressing the project first. This has
been left for future work.
@tomasfarias
Copy link
Owner Author

Closes #30

@tomasfarias tomasfarias mentioned this pull request Jan 22, 2022
@tomasfarias tomasfarias merged commit bdaa841 into master Jan 22, 2022
@tomasfarias tomasfarias deleted the overwrite-toggle branch January 22, 2022 12:06
@tomasfarias tomasfarias linked an issue Jan 22, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dbt_deps question
1 participant