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

add empty to context flags #10315

Merged
merged 2 commits into from
Jun 17, 2024
Merged

add empty to context flags #10315

merged 2 commits into from
Jun 17, 2024

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Jun 15, 2024

resolves #10317
resolves #10152

Problem

We are missing the --empty flag value from the jinja context flags, making it tricky to overwrite the ref macro in a way that incorporates the value of --empty

Solution

Add empty to jinja flags + unit test

Checklist

  • I have read the contributing guide and understand what's expected of me
  • 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
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

🎩
(adding {{ log(flags.EMPTY, info=True) }} to locations.sql)

❯ dbt run --empty  --select locations
...
14:42:08  1 of 1 START sql view model test_arky.locations ................................ [RUN]
14:42:08  True
❯ dbt run --select locations
...
14:42:08  1 of 1 START sql view model test_arky.locations ................................ [RUN]
14:42:08  False

Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented Jun 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.71%. Comparing base (27b2f96) to head (ace8aca).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10315      +/-   ##
==========================================
- Coverage   88.76%   88.71%   -0.05%     
==========================================
  Files         180      180              
  Lines       22488    22488              
==========================================
- Hits        19962    19951      -11     
- Misses       2526     2537      +11     
Flag Coverage Δ
integration 85.97% <ø> (-0.13%) ⬇️
unit 61.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cla-bot cla-bot bot added the cla:yes label Jun 17, 2024
@MichelleArk MichelleArk marked this pull request as ready for review June 17, 2024 14:43
@MichelleArk MichelleArk requested a review from a team as a code owner June 17, 2024 14:43
@MichelleArk MichelleArk merged commit 1475abb into main Jun 17, 2024
70 checks passed
@MichelleArk MichelleArk deleted the add-empty-flag-to-context-vars branch June 17, 2024 16:09
github-actions bot pushed a commit that referenced this pull request Jun 17, 2024
(cherry picked from commit 1475abb)
MichelleArk pushed a commit that referenced this pull request Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --empty flag value to context flags.EMPTY [Feature] --empty flag should be exposed in flags variable
2 participants