Skip to content

Fix airflowctl list operations ignoring the requested offset - #70989

Merged
henry3260 merged 3 commits into
apache:mainfrom
rjgoyln:fix-airflowctl-execute-list-offset
Aug 4, 2026
Merged

Fix airflowctl list operations ignoring the requested offset#70989
henry3260 merged 3 commits into
apache:mainfrom
rjgoyln:fix-airflowctl-execute-list-offset

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

BaseOperations.execute_list accepts an offset but never sent it on the first request, so paging started at the server default while the loop still resumed at offset + limit — a non-zero offset both returned the wrong first page and skipped the rows in between. offset=100, limit=2 returned rows 0-1, then jumped to row 102.

Nothing released is affected: no caller passes offset, and jobs list takes a separate path when one is given. But the parameter is public on the signature and silently discarded, so the first caller to use it gets wrong results rather than an error.

Compatibility

Sending offset=0 is equivalent to omitting it — the API's QueryOffset already defaults to 0.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

The paginating helper behind the list operations built its query params
without the caller's offset, so the first request always started at the
server default. The paging loop then resumed at offset + limit, meaning
a non-zero offset both returned the wrong first page and silently
skipped the rows in between. The parameter is public on the signature,
so the mismatch was waiting for the first caller that used it.
@rjgoyln
rjgoyln marked this pull request as ready for review August 4, 2026 05:47

@henry3260 henry3260 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.

Overall looks good, just one nit

Comment thread airflow-ctl/tests/airflow_ctl/api/test_operations.py Outdated
rjgoyln and others added 2 commits August 5, 2026 00:29
Co-authored-by: Henry Chen <henryhenry0512@gmail.com>
Removed duplicate assertion for response.hellos.
@henry3260 henry3260 added the backport-to-airflow-ctl-v0-1-test Backport to airflow-ctl/v0-1-test label Aug 4, 2026
@henry3260 henry3260 added this to the Airflow 3.3.1 milestone Aug 4, 2026
@henry3260
henry3260 merged commit b541458 into apache:main Aug 4, 2026
97 checks passed
@github-actions

github-actions Bot commented Aug 4, 2026

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 b541458 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.

henry3260 added a commit that referenced this pull request Aug 5, 2026
…equested offset (#70989) (#71119)

(cherry picked from commit b541458)

Co-authored-by: rjgoyln <151457491+rjgoyln@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-airflow-ctl-v0-1-test Backport to airflow-ctl/v0-1-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants