validate_commits: harden transient-error handling (follow-up to #29) - #37
validate_commits: harden transient-error handling (follow-up to #29)#37vm-pranavan wants to merge 9 commits into
Conversation
ReviewI went through this against #34, ran the suite locally (63 passing), and probed the runtime behavior of the new circuit-breaker. The five items #34 actually asked for are implemented correctly and tested. My concerns are that the PR carries two large changes that aren't in its description, and that one of them — parallelization — undercuts the circuit-breaker feature the PR claims to deliver. Blocking1. Undescribed scope, and the skip-list additions are what turned CI green The body lists 6 items. The branch has 8 commits, three of which aren't described:
Run history on the branch: Every run before the skip-list commits failed. The green check is attributable to disabling tests, not to the transient-error work. 2. The skip-list additions disable coverage for 5 extensions, including SemanticMediaWiki
These should go in their own PR against their own issue so the decision is reviewable on its merits instead of riding along in a transient-error PR. 3. The circuit-breaker does not fast-abort on the path production uses
In the parallel path every future is submitted before the All 40 entries burned their full retry budget. Item 2 of the description — "aborts the loop immediately" — holds for the sequential path only. 4. Neither new feature is tested on the shipping path
5.
6. "Consecutive" isn't meaningful under parallel completion
7. The abort message loses the unchecked count Collapsing 165 noisy per-entry lines into one aggregate was the right call, but the aggregate doesn't say how many entries went unvalidated. In the probe above, a run that checked 4 of 40 is indistinguishable from one that checked all 40 and found 4 bad. Worth including Non-blockingDead code, which is worth a pass given item 6 of the description:
Other:
What works wellThe parallelization is a substantial win and deserves to be in the description rather than buried: 137 entries validated in 6.2 seconds (11:09:14.86 to 11:09:21.05), against roughly 3-4 minutes serially. Items 1, 4, and 5 land cleanly. Timeout retry is correct and the test now asserts Suggested path forwardSplit into two PRs: the skip-list additions on their own issue, and the transient-error work here with the parallelization described in the body. Then for items 3-7, the cleanest fix is to move the breaker and budget checks to gate submission rather than completion — that makes fast-abort real and lets the sequential/parallel fork go away, so the tests exercise the path that ships. |
…taWiki#29) Addresses issue CanastaWiki#34: - Catch and retry subprocess.TimeoutExpired inside _run_git_with_retry - Fast-abort circuit-breaker with a single aggregate failure, removing loop noise - Add 600s time budget to validate_commits and timeout-minutes: 10 to parse CI job - Add missing transient patterns (RPC failed, early EOF, Empty reply, etc.) - Use specific SSL/TLS error patterns to avoid matching TLSAuth or ssl-cache - Move import tempfile to top level and clean up unreachable return code - Format print output so RETRY logs do not break one-line-per-entry format - Clean up unused test imports and update/add test cases
50e4a15 to
b161a8d
Compare
|
Hi @cicalese , The CI test matrix failures on this PR are due to upstream test suite/environment compatibility issues in 5 extensions (OATHAuth, AntiSpoof, TimedMediaHandler, SemanticMediaWiki, and SemanticDependencyUpdater). Per reviewer feedback, the skip-list additions for these extensions were separated into a dedicated PR: #39 (#39) (ci: add OATHAuth, SMW, SemanticDependencyUpdater, AntiSpoof, TimedMediaHandler to upstream_test_compat). Kindly review and merge #39 first. Once merged, I will rebase #37 onto main so all CI checks turn green! Thanks! |
Resolves #34.
This follow-up to PR #29 addresses items from issue #34 and reviewer feedback:
ThreadPoolExecutor(default 16 workers), reducing validation time for 138 entries from ~3-4 minutes to ~6.2 seconds.threading.Event()abort signal across all threads when reaching transient failure limits. Aborts report the unvalidated count:(N of M entries unvalidated).600sinternal time budget invalidate_commitsand aligns theparsejob timeout inci.ymltotimeout-minutes: 15so script diagnostics print cleanly before runner termination.subprocess.TimeoutExpiredinside_run_git_with_retryusing exponential backoff.early EOF,Empty reply from server,Error in the HTTP2 framing layer) and anchorsRPC failedandSSL/TLSpatterns to avoid false positives (such asHTTP 404or extension names likeTLSAuth).RETRY for [entry_name]to eliminate log line interleaving across parallel threads, removes dead code/unused parameters, and standardizes top-level imports.(Note: Skip-list additions for extension compatibility have been removed from this PR to be submitted separately under a dedicated issue/PR.)