Repository navigation
Fix airflowctl required-option test broken by concurrent merges - #76092
Merged
shahar1 merged 3 commits intoOct 31, 2026
Merged
Conversation
apache#69317 made required request-body fields required in argparse, and apache#75177 added a test expecting the post-parse validation to report a missing --conn-type. Each passed on its own, but together argparse rejects the command during parsing, so the test failed on main. The argparse error is the intended behaviour; the test now checks it.
shahar1
requested review from
bugraoz93,
dheerajturaga,
henry3260 and
potiuk
as code owners
October 30, 2026 21:28
shahar1
enabled auto-merge (squash)
October 30, 2026 21:29
1 task done
SameerMesiah97
approved these changes
Oct 30, 2026
SameerMesiah97
left a comment
Contributor
There was a problem hiding this comment.
Approved pending green CI
henry3260
approved these changes
Oct 31, 2026
FrankYang0529
approved these changes
Oct 31, 2026
shahar1
added a commit
to shahar1/airflow
that referenced
this pull request
Oct 31, 2026
…he#76092) apache#69317 made required request-body fields required in argparse, and apache#75177 added a test expecting the post-parse validation to report a missing --conn-type. Each passed on its own, but together argparse rejects the command during parsing, so the test failed on main. The argparse error is the intended behaviour; the test now checks it. (cherry picked from commit 9c164b5)
Merged
1 task done
shahar1
added a commit
that referenced
this pull request
Oct 31, 2026
…dation error (#69317) (#76116) * [airflow-ctl/v0-1-test] Fix airflowctl operations create command validation error (#69317) The only conflict was context: _find_subgroup_suffix from the operation subgroups change is not on this branch and stays out. The fix itself applies unchanged. (cherry picked from commit 1c3b3de) Co-authored-by: Pratiksha Badheka <[email protected]> * Fix airflowctl required-option test broken by concurrent merges (#76092) #69317 made required request-body fields required in argparse, and #75177 added a test expecting the post-parse validation to report a missing --conn-type. Each passed on its own, but together argparse rejects the command during parsing, so the test failed on main. The argparse error is the intended behaviour; the test now checks it. (cherry picked from commit 9c164b5) --------- Co-authored-by: Pratiksha Badheka <[email protected]>
shahar1
added a commit
that referenced
this pull request
Nov 19, 2026
…dation error (#69317) (#76116) * [airflow-ctl/v0-1-test] Fix airflowctl operations create command validation error (#69317) The only conflict was context: _find_subgroup_suffix from the operation subgroups change is not on this branch and stays out. The fix itself applies unchanged. (cherry picked from commit 1c3b3de) Co-authored-by: Pratiksha Badheka <[email protected]> * Fix airflowctl required-option test broken by concurrent merges (#76092) #69317 made required request-body fields required in argparse, and #75177 added a test expecting the post-parse validation to report a missing --conn-type. Each passed on its own, but together argparse rejects the command during parsing, so the test failed on main. The argparse error is the intended behaviour; the test now checks it. (cherry picked from commit 9c164b5) --------- Co-authored-by: Pratiksha Badheka <[email protected]>
28 of 67 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_create_command_without_required_option_exits_with_friendly_messagefails onmain:#69317 and #75177 merged 14 minutes apart and each was green on its own:
connections create --connection-id my_conn(no--conn-type) outsidepytest.raises, expecting_validate_datamodelto report the missing field after parsing.Together, argparse rejects the command while parsing, so the test fails before it reaches its assertion.
The product behaviour is fine:
airflowctl connections create --connection-id xexits with code 2 andcommand error: the following arguments are required: --conn-type, see help above., with no traceback and no request sent. So only the test changes: it now asserts that the parser rejects the command, with exit code 2 and the message on stderr. If--conn-typestops being required in argparse, the test fails._validate_datamodelkeeps its direct unit tests from #75177, and its invalid-value path is still reachable from the CLI.Its "missing required" branch can no longer be reached from any generated command, because argparse rejects those first. It stays as a fallback; this PR leaves it alone.
Not for
airflow-ctl/v0-1-test: that branch has #75177 (via #76089) but not #69317, so the old test passes there and this one would fail.Testing:
pytest airflow-ctl/tests: 700 passed.prek run mypy-airflow-ctl --all-filesand the commit's prek hooks passed.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5, Sonnet 5.5) following the guidelines
🤖 Generated with Claude Code