Skip to content

[airflow-ctl/v0-1-test] Report invalid variables in airflowctl variables import as readable errors (#76174) - #76196

Merged
shahar1 merged 2 commits into
airflow-ctl/v0-1-testfrom
backport-122f7b4-airflow-ctl/v0-1-test
Nov 1, 2026
Merged

shahar1 merged 2 commits into
airflow-ctl/v0-1-testfrom
backport-122f7b4-airflow-ctl/v0-1-test

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

A variable with a bad value, such as a non-string description or an
over-long key, crashed airflowctl variables import with a raw
pydantic traceback that did not say which variable was wrong. Report the
variable key, the file and the reason instead, as
airflowctl connections import already does.
(cherry picked from commit 122f7b4)

Co-authored-by: Rishabh [email protected]

…les import as readable errors (#76174)

A variable with a bad value, such as a non-string description or a blank
or over-long key, crashed `airflowctl variables import` with a raw
pydantic traceback that did not say which variable was wrong. Report the
variable key, the file and the reason instead, as
`airflowctl connections import` already does.
(cherry picked from commit 122f7b4)

Co-authored-by: Rishabh <[email protected]>
The blank-key case relies on the pattern constraint that #74896 added to VariableBody.key. That change is not on airflow-ctl/v0-1-test: the branch models follow the 3.2 spec, and Airflow 3.2 and 3.3 servers accept a whitespace-only key.
@shahar1
shahar1 marked this pull request as ready for review November 1, 2026 09:05
@shahar1
shahar1 merged commit 8fc5499 into airflow-ctl/v0-1-test Nov 1, 2026
13 checks passed
@shahar1
shahar1 deleted the backport-122f7b4-airflow-ctl/v0-1-test branch November 1, 2026 09:41
shahar1 added a commit that referenced this pull request Nov 19, 2026
…les import as readable errors (#76174) (#76196)

* [airflow-ctl/v0-1-test] Report invalid variables in airflowctl variables import as readable errors (#76174)

A variable with a bad value, such as a non-string description or a blank
or over-long key, crashed `airflowctl variables import` with a raw
pydantic traceback that did not say which variable was wrong. Report the
variable key, the file and the reason instead, as
`airflowctl connections import` already does.
(cherry picked from commit 122f7b4)

Co-authored-by: Rishabh <[email protected]>

* Drop the blank-key import test case from the v0-1-test backport

The blank-key case relies on the pattern constraint that #74896 added to VariableBody.key. That change is not on airflow-ctl/v0-1-test: the branch models follow the 3.2 spec, and Airflow 3.2 and 3.3 servers accept a whitespace-only key.

---------

Co-authored-by: Rishabh <[email protected]>
Co-authored-by: Shahar Epstein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants