-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
[AIRFLOW-4490] DagRun.conf should return empty dictionary by default #5388
[AIRFLOW-4490] DagRun.conf should return empty dictionary by default #5388
Conversation
578073a
to
a91847e
Compare
Codecov Report
@@ Coverage Diff @@
## master #5388 +/- ##
==========================================
- Coverage 84.7% 84.41% -0.29%
==========================================
Files 679 679
Lines 38488 38494 +6
==========================================
- Hits 32600 32496 -104
- Misses 5888 5998 +110
Continue to review full report at Codecov.
|
a91847e
to
d908ff8
Compare
I got rid of the change to template context, which initially provided an empty |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@dstandish can you rebase? |
@OmerJog I just resolved conflicts using github's "resolve conflicts" thing -- i will rebase and squash later this week. What do you think is the better approach? This or #5387? #5387 adds a "dag_run_conf" to context. The nice thing about that approach is then it doesn't fail when there is no dag_run (i.e. when you are just testing template rendering in interactive console). If you still think this is valuable I can mention it in #development slack chat -- I don't really use dag run conf anymore so I lost interest. |
@OmerJog also you are welcome to take this over and do the rebase and do the squeaky-wheeling if you want :) |
@dstandish tests did not run because of Falke8 error: can you resolve this? |
f5e572a
to
f377c64
Compare
@OmerJog rebased. passed flake8 locally. |
@ashb ping :) |
stale block |
f377c64
to
654a62a
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Currently, we can access dag_run.conf in templates like so:
But if no conf is passed to the dag run, the above jinja template will fail upon rendering, because
conf
will beNone
.So currently, to be safe, you have to do this:
This PR changes DagRun model so that it returns an empty dictionary when there is no conf.
Jira
Description
Tests
Commits
Documentation
Code Quality
flake8