Skip to content

[airflow-ctl/v0-1-test] Fix airflowctl list pagination when the server caps the page size (#76268) - #76414

Merged
henry3260 merged 1 commit into
apache:airflow-ctl/v0-1-testfrom
henry3260:backport-5308480-airflow-ctl/v0-1-test
Nov 4, 2026
Merged

henry3260 merged 1 commit into
apache:airflow-ctl/v0-1-testfrom
henry3260:backport-5308480-airflow-ctl/v0-1-test

Conversation

@henry3260

Copy link
Copy Markdown
Member

Backport of #76268 to airflow-ctl/v0-1-test, requested in #76268 (comment). The backport-to-airflow-ctl/v0-1-test label did not produce a PR because the cherry-pick conflicts with this branch.

airflowctl's execute_list moved to the next page by the limit it requested. The server may return fewer entries than that when api.maximum_page_limit is set lower than the client's limit of 50. In that case the entries between the pages are never fetched, and a result smaller than the limit comes back as one short page. Commands such as pools export, dags list and variables list then silently drop data.

This advances by the number of entries actually received and stops on an empty page, so a short or empty page can't cause a wrong offset or an endless loop.

(cherry picked from commit 5308480)

related: #76268


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

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

…r caps the page size (apache#76268)

(cherry picked from commit 5308480)

Conflict resolution: this branch validates pages through the local
safe_validate/fill_missing_fields helper instead of validate_response, and it
has no "total_entries is None" guard because that handling is main-only, so the
early return for a short collection is dropped rather than narrowed.
@henry3260
henry3260 marked this pull request as ready for review November 4, 2026 13:40
@henry3260
henry3260 merged commit 2b72a7d into apache:airflow-ctl/v0-1-test Nov 4, 2026
14 checks passed
shahar1 pushed a commit to shahar1/airflow that referenced this pull request Nov 4, 2026
…r caps the page size (apache#76268) (apache#76414)

(cherry picked from commit 5308480)

Conflict resolution: this branch validates pages through the local
safe_validate/fill_missing_fields helper instead of validate_response, and it
has no "total_entries is None" guard because that handling is main-only, so the
early return for a short collection is dropped rather than narrowed.

Co-authored-by: Rishabh <[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