Skip to content

fix(cli): filter out None values to preserve method defaults#65062

Open
rjgoyln wants to merge 8 commits intoapache:mainfrom
rjgoyln:fix/cli-param-none-override
Open

fix(cli): filter out None values to preserve method defaults#65062
rjgoyln wants to merge 8 commits intoapache:mainfrom
rjgoyln:fix/cli-param-none-override

Conversation

@rjgoyln
Copy link
Copy Markdown
Contributor

@rjgoyln rjgoyln commented Apr 11, 2026

Summary

In the current Task SDK CLI auto-generation mechanism, when a user executes a command without providing optional primitive flags (e.g., --limit or --state), the CLI parser captures these as explicit None values.

Change

  • Optimized cli_config.py to filter None values, preserving native method defaults while allowing 0 or False.
  • Enhanced parameter mapping and added unit tests for fallback behavior, manual overrides, and edge cases.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@rjgoyln rjgoyln marked this pull request as draft April 11, 2026 16:30
@rjgoyln rjgoyln closed this Apr 11, 2026
@rjgoyln rjgoyln reopened this Apr 11, 2026
@rjgoyln rjgoyln marked this pull request as ready for review April 12, 2026 12:49
@bugraoz93
Copy link
Copy Markdown
Contributor

Resolved conflict

@bugraoz93 bugraoz93 added the full tests needed We need to run full set of tests for this PR to merge label Apr 12, 2026
@bugraoz93 bugraoz93 closed this Apr 12, 2026
@bugraoz93 bugraoz93 reopened this Apr 12, 2026
@bugraoz93 bugraoz93 added the backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch label Apr 12, 2026
@bugraoz93
Copy link
Copy Markdown
Contributor

bugraoz93 commented Apr 12, 2026

Said using UI could be easier, famous last words. Rebased locally and pushed again

@bugraoz93 bugraoz93 force-pushed the fix/cli-param-none-override branch from bd8918b to 7996f34 Compare April 12, 2026 17:22
@rjgoyln
Copy link
Copy Markdown
Contributor Author

rjgoyln commented Apr 12, 2026

Said using UI could be easier, famous last words. Rebased locally and pushed again

Haha, Thanks for the manual rebase. You're so nice 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:airflow-ctl backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants