Skip to content

python: add LongOperationWarning to reduce poll-loop log spam - #6769

Merged
blp merged 2 commits into
mainfrom
python-long-op-warning
Jul 31, 2026
Merged

python: add LongOperationWarning to reduce poll-loop log spam#6769
blp merged 2 commits into
mainfrom
python-long-op-warning

Conversation

@blp

@blp blp commented Jul 30, 2026

Copy link
Copy Markdown
Member

The Python client logged a debug line on every iteration of its wait loops (compile, start/stop, clear storage, commit transaction, wait for token/completion), flooding logs on fast or long polls. Port the Rust LongOperationWarning (crates/adapters/src/util.rs) to back off the warning threshold exponentially, and log once when a previously-warned wait finally completes.

The Python client logged a debug line on every iteration of its wait
loops (compile, start/stop, clear storage, commit transaction, wait
for token/completion), flooding logs on fast or long polls. Port the
Rust LongOperationWarning (crates/adapters/src/util.rs) to back off
the warning threshold exponentially, and log once when a
previously-warned wait finally completes.

Signed-off-by: Ben Pfaff <blp@feldera.com>
@blp
blp requested a review from abhizer July 30, 2026 16:34
@blp blp self-assigned this Jul 30, 2026
@blp blp added CI/CD QA Testing and quality assurance python Pull requests that update python code labels Jul 30, 2026
@blp
blp requested review from gz and removed request for abhizer July 30, 2026 17:15
@blp
blp added this pull request to the merge queue Jul 30, 2026

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 30, 2026
@blp
blp added this pull request to the merge queue Jul 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 30, 2026
CI run 30584868028 hit a pipeline stuck provisioning for 180s but
logged no "still waiting" line at all: LongOperationWarning defaulted
to logging.DEBUG, and this project's test suite (tests/__init__.py)
only configures logging at INFO by default, so every warning was
silently dropped below the configured level regardless of how long
the operation ran. These messages fire rarely thanks to the built-in
backoff, so there's no spam to hide by keeping them at DEBUG.

Signed-off-by: Ben Pfaff <blp@feldera.com>
@blp
blp enabled auto-merge July 30, 2026 23:15
@blp
blp added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit 4d8aad1 Jul 31, 2026
1 check passed
@blp
blp deleted the python-long-op-warning branch July 31, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD python Pull requests that update python code QA Testing and quality assurance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants