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

Enable deprecation: dispatch-packages #3895

Closed
emmyoop opened this issue Sep 16, 2021 · 3 comments · Fixed by #3975
Closed

Enable deprecation: dispatch-packages #3895

emmyoop opened this issue Sep 16, 2021 · 3 comments · Fixed by #3975
Assignees

Comments

@emmyoop
Copy link
Member

emmyoop commented Sep 16, 2021

dispatch-packages

Introduced in: v0.19.2
In the last week, raised by: 276 projects (~9% of eligible projects)

Instead of raising a deprecation warning when the user has defined the packages arg, or has passed a list instead of a string, we should instead raise a clear error. That error message should point to the same documentation that the deprecation warning message currently does

https://github.com/dbt-labs/dbt/blob/96083dcaf51ab7725f1b554891581e1522e32d7d/core/dbt/context/providers.py#L137-L140

Then, we can:

  • Remove DispatchPackagesDeprecation from the list of active deprecations
  • Significantly simplify the logic (removing jank backwards compatibility) from jinja_static.py — to discuss with @gshank

Originally posted by @jtcohen6 in #2798 (comment)

@emmyoop emmyoop self-assigned this Sep 16, 2021
@emmyoop
Copy link
Member Author

emmyoop commented Sep 24, 2021

https://docs.getdbt.com/reference/dbt-jinja-functions/dispatch will also need an update.

@emmyoop
Copy link
Member Author

emmyoop commented Oct 4, 2021

@jtcohen6 Should I rip out the packages arg all together or leave it in for now and just raise an exception when it's used?

@jtcohen6
Copy link
Contributor

jtcohen6 commented Oct 4, 2021

@emmyoop I think I prefer leaving it in and raising an explicit exception when it's used explicitly. That feels like the same approach as raising an explicit exception when a list is passed to the second positional argument.

At the same time, we should feel very comfortable removing all the code from jinja_static.py that exists to handle values being passed to packages. This was all for backwards compatibility, since we had to rework dispatch in a patch release (v0.19.2) to fix some regressions from v0.19.1.

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 a pull request may close this issue.

2 participants