Skip to content

fix: use warning logging for retries - #222

Open
MatufA wants to merge 1 commit into
google:mainfrom
MatufA:codex/fix-retry-warning-log
Open

fix: use warning logging for retries#222
MatufA wants to merge 1 commit into
google:mainfrom
MatufA:codex/fix-retry-warning-log

Conversation

@MatufA

@MatufA MatufA commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • replace direct stderr retry prints with secops.auth warning logs
  • preserve the existing f-string retry messages and caller-controlled logging
  • cover response-triggered and error-triggered retries without stderr output

Why

Raw stderr retry messages can be buffered with neighboring application logs
before Datadog ingestion. Because those messages bypass Python logging, they
lack consistent level and logger metadata and can cause downstream parser
discrepancies.

Validation

  • pytest tests/ -m "not integration" -k "not test_time_config": 772 passed,
    208 deselected, 64% coverage
  • pylint --rcfile=pylintrc src/secops/auth.py: passed
  • black --check --line-length=80 --target-version=py310 src/secops/auth.py:
    passed
  • manual LogRetry driver: both retry paths produced separate warning records

The unrelated test_time_config unit test was excluded locally because it
attempts to create ~/.secops, which is blocked by the execution sandbox.
Integration tests remain code-owner-triggered per TESTING.md.

Fixes #221

@MatufA
MatufA marked this pull request as ready for review July 30, 2026 19:38
@MatufA
MatufA requested a review from prachib29 as a code owner July 30, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use warning logging instead of stderr print for HTTP retries

1 participant