Skip to content

fix infinite loop for limit<0 for all list operations in airflowctl#64582

Merged
potiuk merged 1 commit intoapache:mainfrom
rjgoyln:111111
Apr 1, 2026
Merged

fix infinite loop for limit<0 for all list operations in airflowctl#64582
potiuk merged 1 commit intoapache:mainfrom
rjgoyln:111111

Conversation

@rjgoyln
Copy link
Copy Markdown
Contributor

@rjgoyln rjgoyln commented Apr 1, 2026

prevent infinite loop by validating limit in pagination logic

Description

In operations.py at line 217, the offset is incremented by limit in each iteration. However, there is currently no validation to ensure limit is a positive integer.

Changes

raise a ValueError if an invalid limit is provided.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@rjgoyln rjgoyln marked this pull request as ready for review April 1, 2026 13:47
Copy link
Copy Markdown
Contributor

@henry3260 henry3260 left a comment

Choose a reason for hiding this comment

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

LGTM Thanks for the PR!

Copy link
Copy Markdown
Contributor

@bugraoz93 bugraoz93 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the fix!

@bugraoz93 bugraoz93 changed the title fix infinite loop for limit<0 fix infinite loop for limit<0 for all list operations in airflowctl Apr 1, 2026
@potiuk potiuk merged commit 0eb3067 into apache:main Apr 1, 2026
87 of 88 checks passed
Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Apr 3, 2026
Suraj-kumar00 pushed a commit to Suraj-kumar00/airflow that referenced this pull request Apr 7, 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.

4 participants