-
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
[CT-540] [Bug] 'target' suddenly not available at compile time in selectors.yml #5131
Comments
@ljhopkins2 Thanks for the report! We'll get on this. Could it be an unintended side-effect of #4878? The In addition to the fix here, we need a test case for it. |
Confirmed that change looks to be the cause. We need our renderers / rendering contexts to be such that:
@ljhopkins2 In the meantime, could you work around this by using an |
@jtcohen6 Thanks for suggesting a workaround. I'll probably just leave it commented out for now, though: short-term I can just remember to |
Using a target context for the selector renderer was introduced in 1.0.0. The secret renderers were passed a context dictionary instead of a cli_var dictionary, so they were broken for var usage. In 1.0.5 we fixed the secret renders so that they were passed a cli_var dictionary instead of the context dictionary, but over-corrected and changed the selector renderer so that it also was just passed a cli_var dictionary. This PR changes the selector rendering to use the DbtProjectYamlRenderer, since the 'render_selectors' call is contained within it and needs the same rendering setup that it has. |
+1 dbt Cloud enterprise customer. This is resulting in a failure to all jobs due to a failed dbt deps due to a 'target undefined' error |
@ljhopkins2 @saraleon1 This fix is now available in v1.0.6-rc1 and v1.1.0-rc3. Those are available in dbt Cloud, respectively, as Thank you so much for reporting the regression, and helping us get to the bottom of it! |
Is there an existing issue for this?
Current Behavior
After upgrading to
dbt v1.0.5
, I get the following error when compiling my model:Expected Behavior
The project should compile without error, as it did in earlier post-v1 releases.
Steps To Reproduce
selectors.yml
dbt v1.0.5
default: "{{ target.name == 'dev' | as_bool }}"
Relevant log output
No response
Environment
What database are you using dbt with?
redshift
Additional Context
No response
The text was updated successfully, but these errors were encountered: