feat(kanban): make worker log retention configurable#25639
Closed
qWaitCrypto wants to merge 1 commit into
Closed
Conversation
8ecfa6b to
a12faca
Compare
Contributor
|
Merged via #27867 onto current main. Your commit was cherry-picked with authorship preserved. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds configurable Kanban worker log retention while preserving the existing default behavior.
Today worker logs rotate at a hard-coded 2 MiB and keep only one backup generation (
.log.1). That is fine as a default, but long-running workers can overwrite early failure evidence before an operator has a chance to inspect it. This PR keeps the default 2 MiB + one backup, and lets operators tune retention for heavier workloads.Related Issue
#25641
Type of Change
Changes Made
kanban.worker_log_rotate_bytesto configure the per-file rotation threshold.kanban.worker_log_backup_countto configure how many rotated worker log generations are kept.worker_log_rotate_bytes: 2097152worker_log_backup_count: 1_rotate_worker_log()to shift multiple backup generations (.log.1,.log.2, ...).Reproduction
Before the fix, rotation only accepted a byte threshold and always replaced
.log.1:After the fix, rotation accepts a backup count and preserves older generations when configured:
How to Test
Result: passed.
Result:
5 passed, 151 deselected in 12.90s.Latest local rerun:
5 passed, 151 deselected in 8.05s.Result: passed.
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
See reproduction and test logs above.