-
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
Add git info to context #8693
base: main
Are you sure you want to change the base?
Add git info to context #8693
Conversation
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8693 +/- ##
==========================================
- Coverage 86.62% 86.61% -0.01%
==========================================
Files 176 176
Lines 25663 25696 +33
==========================================
+ Hits 22230 22257 +27
- Misses 3433 3439 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I have now added support for The last pending thing would be to invalidate the partial parsing cache in case |
Would there also be appetite to add this info to |
Thinking more about it. In order to identify that we changed branch (and that we might need to trigger a full parse in case we refer to |
What would be the use-case here? |
resolves #8690
Problem
Today, it is not possible to know which branch and/or which commit dbt's current code is based on. This PR adds the variables
git_branch
andgit_sha
to the Jinja contextSolution
Add objects to the context
Still To be Done (and keen to get Core Team inputs on the 2 first ones)
--project-dir
is set and not the current dirspecial_override_macros
refers to git_branchor
git_sha`.Checklist