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

Allow DagParam to hold falsy values #22964

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

uranusjr
Copy link
Member

Fix #22843.

This uses the NOTSET sentinel instead of None as the "default" sentinel, so it's now possible to supply None to a DagParam. The value presence check is also tightened up, so all falsy values can be stored.

Also fixed some deprecation warnings, added type annotations, converted tests to pytest, and removed some weird expressions along the way.

This uses the NOTSET sentinel instead of None as the "default" sentinel,
so it's now possible to supply None to a DagParam. The value presence
check is also tightened up, so all falsy values can be stored.
@uranusjr uranusjr requested review from kaxil, XD-DENG and ashb as code owners April 12, 2022 21:21
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Apr 12, 2022
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Apr 13, 2022
@uranusjr uranusjr merged commit a0f7e61 into apache:main Apr 13, 2022
@uranusjr uranusjr deleted the dag-param-allow-falsy branch April 13, 2022 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full tests needed We need to run full set of tests for this PR to merge type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When passing the 'False' value to the parameters of a decorated dag function I get this traceback
3 participants