Repository navigation
Fix airflowctl JSON parsing for Dag run conf - #68985
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
SameerMesiah97
left a comment
There was a problem hiding this comment.
CI needs to be triggered. Besides that, tests currently only cover one scenario.
airflowctl dags trigger --conf rejected JSON object strings because the
generated parser validated them with raw dict, which cannot consume a JSON
string. Parse JSON object CLI values into dictionaries before validation so
conf values such as {"my-key": "my-value"} are accepted.
closes: apache#67989
Cover dict input early return, invalid JSON, and non-object JSON so all branches of the conf parser are exercised.
c79cca8 to
a03a79e
Compare
bugraoz93
left a comment
There was a problem hiding this comment.
Thanks Atakan! We can merge after seeing the CI. This will be included into next versin which I will start somewhere this week. We delayed as I waited 1.0 discussion but didn't evolve much yet so will be in 0.1.x
|
This PR is as green as the Amazon forest, let's goo !! |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Backport successfully created: airflow-ctl/v0-1-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
|
Congrats on your first PR @atakanyenel! |
…68985) (#69837) * Fix airflowctl JSON parsing for Dag run conf airflowctl dags trigger --conf rejected JSON object strings because the generated parser validated them with raw dict, which cannot consume a JSON string. Parse JSON object CLI values into dictionaries before validation so conf values such as {"my-key": "my-value"} are accepted. closes: #67989 * Expand json_dict_type test coverage for airflowctl conf parsing Cover dict input early return, invalid JSON, and non-object JSON so all branches of the conf parser are exercised. --------- (cherry picked from commit a1cec52) Co-authored-by: Atakan Yenel <[email protected]> Co-authored-by: Atakan Yenel <[email protected]>
…68985) (#69837) * Fix airflowctl JSON parsing for Dag run conf airflowctl dags trigger --conf rejected JSON object strings because the generated parser validated them with raw dict, which cannot consume a JSON string. Parse JSON object CLI values into dictionaries before validation so conf values such as {"my-key": "my-value"} are accepted. closes: #67989 * Expand json_dict_type test coverage for airflowctl conf parsing Cover dict input early return, invalid JSON, and non-object JSON so all branches of the conf parser are exercised. --------- (cherry picked from commit a1cec52) Co-authored-by: Atakan Yenel <[email protected]> Co-authored-by: Atakan Yenel <[email protected]>
Fixes
airflowctl dags trigger ... --confso JSON object values are parsed into dictionaries before validating the generated Dag run request body. Previously the generated parser used rawdict, which rejects JSON strings such as{ "my-key": "my-value" }.closes: #67989
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Opus 4.8 (GitHub Copilot CLI) following the guidelines