Skip to content

Log the retry reason in airflowctl API client retries - #75059

Merged
Lee-W merged 1 commit into
apache:mainfrom
mattwang44:fix-airflowctl-retry-log-before-sleep
Oct 20, 2026
Merged

Lee-W merged 1 commit into
apache:mainfrom
mattwang44:fix-airflowctl-retry-log-before-sleep

Conversation

@mattwang44

@mattwang44 mattwang44 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

When the airflowctl API client retries a failed request, its warning only says "Starting call ..., this is the 1st time calling it": no reason, and the count is off by one. The retry decorator passed before_log where before_sleep_log belongs.

With before_sleep_log the warning now reads "Retrying ... in 1.77 seconds as it raised ConnectError: ...". The Edge Worker client got the same fix in #58480.

A new test captures the warning and fails on main; the airflow-ctl tests pass.


Was generative AI tooling used to co-author this PR?

The retry decorator on the airflowctl API client used before_log in the
before_sleep slot. That callback runs after a failed attempt, but
before_log only reports "Starting call to ..., this is the 1st time
calling it.", which hides why the request is being retried and is off by
one. Users saw repeated warnings with no hint of the connection error or
5xx that triggered them.
@mattwang44
mattwang44 force-pushed the fix-airflowctl-retry-log-before-sleep branch from f4f1015 to e461446 Compare October 19, 2026 05:58
@Lee-W
Lee-W merged commit 7126d33 into apache:main Oct 20, 2026
85 checks passed
@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

@mattwang44
mattwang44 deleted the fix-airflowctl-retry-log-before-sleep branch October 20, 2026 08:52
Lee-W pushed a commit that referenced this pull request Oct 20, 2026
shahar1 pushed a commit that referenced this pull request Nov 19, 2026
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