Skip to content

Fix airflowctl JSON parsing for Dag run conf - #68985

Merged
bugraoz93 merged 2 commits into
apache:mainfrom
atakanyenel:fix-airflow-ctl-conf-json
Jul 13, 2026
Merged

bugraoz93 merged 2 commits into
apache:mainfrom
atakanyenel:fix-airflow-ctl-conf-json

Conversation

@atakanyenel

Copy link
Copy Markdown
Contributor

Fixes airflowctl dags trigger ... --conf so JSON object values are parsed into dictionaries before validating the generated Dag run request body. Previously the generated parser used raw dict, which rejects JSON strings such as { "my-key": "my-value" }.

closes: #67989


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Opus 4.8 (GitHub Copilot CLI)

Generated-by: Claude Opus 4.8 (GitHub Copilot CLI) following the guidelines

@boring-cyborg

boring-cyborg Bot commented Jun 25, 2026

Copy link
Copy Markdown

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
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@SameerMesiah97 SameerMesiah97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI needs to be triggered. Besides that, tests currently only cover one scenario.

@atakanyenel
atakanyenel requested a review from henry3260 as a code owner July 7, 2026 16:36
Atakan Yenel added 2 commits July 8, 2026 01:01
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.
@atakanyenel
atakanyenel force-pushed the fix-airflow-ctl-conf-json branch from c79cca8 to a03a79e Compare July 8, 2026 00:01
@henry3260 henry3260 added the full tests needed We need to run full set of tests for this PR to merge label Jul 8, 2026
@henry3260 henry3260 closed this Jul 8, 2026
@henry3260 henry3260 reopened this Jul 8, 2026

@bugraoz93 bugraoz93 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@henry3260 henry3260 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@atakanyenel

Copy link
Copy Markdown
Contributor Author

This PR is as green as the Amazon forest, let's goo !!

@bugraoz93
bugraoz93 merged commit a1cec52 into apache:main Jul 13, 2026
201 of 220 checks passed
@boring-cyborg

boring-cyborg Bot commented Jul 13, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: airflow-ctl/v0-1-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ airflow-ctl/v0-1-test PR Link

@bugraoz93

Copy link
Copy Markdown
Contributor

Congrats on your first PR @atakanyenel!

bugraoz93 pushed a commit that referenced this pull request Jul 13, 2026
…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]>
@atakanyenel
atakanyenel deleted the fix-airflow-ctl-conf-json branch July 13, 2026 21:53
shahar1 pushed a commit that referenced this pull request Nov 19, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:airflow-ctl backport-to-airflow-ctl/v0-1-test 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.

airflow CTL --conf option can't parse input

4 participants