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

Use SchemaParser render context to render test configs #3646

Merged
merged 3 commits into from
Jul 29, 2021

Conversation

kwigley
Copy link
Contributor

@kwigley kwigley commented Jul 29, 2021

resolves #3564

Description

Instead of creating a new context for the test builder to jinja render test configs, we can just use the context from the schema parser that has the right context properties to support var() with project configured vars in addition to cli vars.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt next" section.

@kwigley kwigley temporarily deployed to Snowflake July 29, 2021 14:43 Inactive
@cla-bot cla-bot bot added the cla:yes label Jul 29, 2021
@kwigley kwigley temporarily deployed to Snowflake July 29, 2021 14:43 Inactive
@kwigley kwigley temporarily deployed to Postgres July 29, 2021 14:43 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 29, 2021 14:43 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 29, 2021 14:43 Inactive
@kwigley kwigley temporarily deployed to Redshift July 29, 2021 14:43 Inactive
@kwigley kwigley temporarily deployed to Redshift July 29, 2021 14:43 Inactive
@kwigley kwigley requested review from gshank and jtcohen6 July 29, 2021 14:43
@kwigley kwigley self-assigned this Jul 29, 2021
@kwigley kwigley temporarily deployed to Postgres July 29, 2021 15:06 Inactive
@kwigley kwigley temporarily deployed to Redshift July 29, 2021 15:06 Inactive
@kwigley kwigley temporarily deployed to Redshift July 29, 2021 15:06 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 29, 2021 15:06 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 29, 2021 15:06 Inactive
@kwigley kwigley temporarily deployed to Snowflake July 29, 2021 15:06 Inactive
@kwigley kwigley temporarily deployed to Snowflake July 29, 2021 15:06 Inactive
Copy link
Contributor

@gshank gshank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I'm glad you saved that context because generating a new one each time shouldn't be necessary.

@kwigley kwigley merged commit 30e72bc into develop Jul 29, 2021
@kwigley kwigley deleted the kwigley/vars-in-test-configs branch July 29, 2021 16:59
@jtcohen6 jtcohen6 mentioned this pull request Jul 29, 2021
5 tasks
kwigley pushed a commit that referenced this pull request Jul 29, 2021
* use available context when rendering test configs

* add test

* update changelog
kwigley pushed a commit that referenced this pull request Jul 29, 2021
* use available context when rendering test configs

* add test

* update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Variables not picked up by tests
3 participants