Skip to content

Cap airflow-ctl httpx dependency below 1.0#65607

Merged
potiuk merged 1 commit intoapache:mainfrom
potiuk:cap-airflow-ctl-httpx-below-1-0
Apr 21, 2026
Merged

Cap airflow-ctl httpx dependency below 1.0#65607
potiuk merged 1 commit intoapache:mainfrom
potiuk:cap-airflow-ctl-httpx-below-1-0

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented Apr 21, 2026

httpx 1.0 (currently `1.0.dev3` on PyPI) is a ground-up API rewrite:
the entire exception hierarchy (`HTTPStatusError`, `RequestError`, `ConnectError`, `ReadError`, `TimeoutException`, ...) was removed and client/transport/auth interfaces were redesigned. airflow-ctl currently uses `httpx.HTTPStatusError`, `httpx.ConnectError`, `AsyncClient`, and `Response.raise_for_status()` throughout `api/client.py` and `api/operations.py`, so pre-release httpx 1.x breaks `airflowctl` at import-time (`ModuleNotFoundError` / `AttributeError`) and the tool fails to start.

Reported during 0.1.4rc2 testing in #65497 — user had to work around it with `--with 'httpx==0.28.1'` on install.

Cap to `<1.0` so `uv tool install apache-airflow-ctl --prerelease=allow` does not accidentally pull the rewrite. The cap carries a comment in `airflow-ctl/pyproject.toml` linking to the migration tracking issue so the reference survives after this PR merges.

The full migration to httpx 1.x is tracked in #65609.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Opus 4.7 (1M context)

Generated-by: Claude Opus 4.7 (1M context) following the guidelines

@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Apr 21, 2026

Tracking issue for the full httpx 1.x migration: #65609

httpx 1.0 (currently 1.0.dev3 on PyPI) is a ground-up API rewrite:
the entire exception hierarchy (HTTPStatusError, RequestError,
ConnectError, ReadError, TimeoutException, ...) was removed and
client/transport/auth interfaces were redesigned. airflow-ctl today
uses httpx.HTTPStatusError, httpx.ConnectError, AsyncClient, and
Response.raise_for_status() throughout api/client.py and
api/operations.py, so pre-release httpx 1.x breaks import-time
(ModuleNotFoundError / AttributeError) and the tool fails to start.

Cap to <1.0 so users who pass --pre / --prerelease=allow do not
accidentally pull the rewrite. The full migration to httpx 1.x is
tracked at apache#65609 and the
cap carries a comment pointing at that URL so the link survives
after this PR merges.
@potiuk potiuk force-pushed the cap-airflow-ctl-httpx-below-1-0 branch from ae16da1 to 3473cd2 Compare April 21, 2026 15:22
@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Apr 21, 2026

cc: @bugraoz93 -> This one we also need for rc3

@potiuk potiuk requested a review from jscheffl April 21, 2026 20:58
@potiuk potiuk added backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch backport-to-airflow-ctl-v0-1-test Backport to airflow-ctl/v0-1-test labels Apr 21, 2026
Copy link
Copy Markdown
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

Oh.

@potiuk potiuk merged commit e16871e into apache:main Apr 21, 2026
70 checks passed
@potiuk potiuk deleted the cap-airflow-ctl-httpx-below-1-0 branch April 21, 2026 21:30
@github-actions github-actions Bot added this to the Airflow 3.2.2 milestone Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.2.2 based on: backport label targeting v3-2-test
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

@github-actions
Copy link
Copy Markdown
Contributor

Backport failed to create: airflow-ctl-v0-1-test. View the failure log Run details

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 Commit Link

You can attempt to backport this manually by running:

cherry_picker e16871e airflow-ctl-v0-1-test

This should apply the commit to the airflow-ctl-v0-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

@github-actions
Copy link
Copy Markdown
Contributor

Backport successfully created: v3-2-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
v3-2-test PR Link

potiuk added a commit that referenced this pull request Apr 21, 2026
httpx 1.0 (currently 1.0.dev3 on PyPI) is a ground-up API rewrite:
the entire exception hierarchy (HTTPStatusError, RequestError,
ConnectError, ReadError, TimeoutException, ...) was removed and
client/transport/auth interfaces were redesigned. airflow-ctl today
uses httpx.HTTPStatusError, httpx.ConnectError, AsyncClient, and
Response.raise_for_status() throughout api/client.py and
api/operations.py, so pre-release httpx 1.x breaks import-time
(ModuleNotFoundError / AttributeError) and the tool fails to start.

Cap to <1.0 so users who pass --pre / --prerelease=allow do not
accidentally pull the rewrite. The full migration to httpx 1.x is
tracked at #65609 and the
cap carries a comment pointing at that URL so the link survives
after this PR merges.
@bugraoz93
Copy link
Copy Markdown
Contributor

Sorry Jarek, I was focused on Helm release, couldn't check anything else, glad it merged 😓

@bugraoz93
Copy link
Copy Markdown
Contributor

bugraoz93 commented Apr 21, 2026

I tried checking your early comments, but it seems I missed this one. Sorry again @potiuk, blocked you here :( Please ping me from Slack as well anytime. Will be careful next time 🙏

potiuk added a commit that referenced this pull request Apr 21, 2026
* Fix airflowctl dagrun list crash when --state is omitted (#65608)

DagRunOperations.list() required a non-None state and unconditionally
sent str(state) to the API. When the CLI omitted --state, argparse
passed None and the API received the literal string "None", failing
with "Invalid value for state. Valid values are queued, running,
success, failed".

Make state optional (Optional[str] = None) and only include it in the
query string when provided. Give limit a sensible default (100) while
we are at it so the method works when called with no args. The
auto-generated `airflowctl dagrun list` command now accepts --state as
a true filter instead of a required flag.

Reported in #65497 (rc2 testing).

* Fix airflow-ctl missing pyyaml runtime dependency (#65489)

* Cap airflow-ctl httpx dependency below 1.0 (#65607)

httpx 1.0 (currently 1.0.dev3 on PyPI) is a ground-up API rewrite:
the entire exception hierarchy (HTTPStatusError, RequestError,
ConnectError, ReadError, TimeoutException, ...) was removed and
client/transport/auth interfaces were redesigned. airflow-ctl today
uses httpx.HTTPStatusError, httpx.ConnectError, AsyncClient, and
Response.raise_for_status() throughout api/client.py and
api/operations.py, so pre-release httpx 1.x breaks import-time
(ModuleNotFoundError / AttributeError) and the tool fails to start.

Cap to <1.0 so users who pass --pre / --prerelease=allow do not
accidentally pull the rewrite. The full migration to httpx 1.x is
tracked at #65609 and the
cap carries a comment pointing at that URL so the link survives
after this PR merges.

* Prepare airflow-ctl 0.1.4rc3 release (#65634)
github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Apr 21, 2026
httpx 1.0 (currently 1.0.dev3 on PyPI) is a ground-up API rewrite:
the entire exception hierarchy (HTTPStatusError, RequestError,
ConnectError, ReadError, TimeoutException, ...) was removed and
client/transport/auth interfaces were redesigned. airflow-ctl today
uses httpx.HTTPStatusError, httpx.ConnectError, AsyncClient, and
Response.raise_for_status() throughout api/client.py and
api/operations.py, so pre-release httpx 1.x breaks import-time
(ModuleNotFoundError / AttributeError) and the tool fails to start.

Cap to <1.0 so users who pass --pre / --prerelease=allow do not
accidentally pull the rewrite. The full migration to httpx 1.x is
tracked at apache#65609 and the
cap carries a comment pointing at that URL so the link survives
after this PR merges.
(cherry picked from commit e16871e)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Apr 21, 2026
httpx 1.0 (currently 1.0.dev3 on PyPI) is a ground-up API rewrite:
the entire exception hierarchy (HTTPStatusError, RequestError,
ConnectError, ReadError, TimeoutException, ...) was removed and
client/transport/auth interfaces were redesigned. airflow-ctl today
uses httpx.HTTPStatusError, httpx.ConnectError, AsyncClient, and
Response.raise_for_status() throughout api/client.py and
api/operations.py, so pre-release httpx 1.x breaks import-time
(ModuleNotFoundError / AttributeError) and the tool fails to start.

Cap to <1.0 so users who pass --pre / --prerelease=allow do not
accidentally pull the rewrite. The full migration to httpx 1.x is
tracked at apache#65609 and the
cap carries a comment pointing at that URL so the link survives
after this PR merges.
(cherry picked from commit e16871e)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
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 Backport to airflow-ctl/v0-1-test backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants