scripts: add run_in_parallel helper for prod ops#14300
Conversation
PR SummaryLow Risk Overview
New Reviewed by Cursor Bugbot for commit df94c18. Bugbot is set up for automated code reviews on this repo. Configure here. |
ron-starkware
left a comment
There was a problem hiding this comment.
@ron-starkware reviewed 2 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on matanl-starkware).
scripts/prod/common_lib.py line 77 at r1 (raw file):
is printed every `heartbeat_interval_seconds`. Errors: workers must raise rather than call `sys.exit()` (a `SystemExit` raised in a worker
I see that except BaseException does catch sys.exit(), which the workers throw on an exception (and then prints the SystemExit code).
scripts/prod/common_lib.py line 91 at r1 (raw file):
errors: dict[int, BaseException] = {} def run_one(index: int, item: T) -> R:
I see that index isn't used in this function (nor later in the stack)
893cb64 to
a92e79a
Compare
|
Addressed in the latest push:
|
ron-starkware
left a comment
There was a problem hiding this comment.
@ron-starkware reviewed 1 file and all commit messages, and resolved 2 discussions.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on matanl-starkware).
a92e79a to
04009a0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 04009a0. Configure here.
bd81d90 to
29828fb
Compare
04009a0 to
029ce2e
Compare
29828fb to
de95d91
Compare
029ce2e to
463f2bc
Compare
matanl-starkware
left a comment
There was a problem hiding this comment.
@matanl-starkware resolved 2 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on matanl-starkware).
463f2bc to
654aa33
Compare
654aa33 to
a185a20
Compare
4de0366 to
4cd57f7
Compare
Merge activity
|
a185a20 to
fc6f37a
Compare
fc6f37a to
fdefe46
Compare
0f582a6 to
8d50432
Compare
Add a thread-pool-based run_in_parallel helper to common_lib that buffers each worker's output into a labeled block, prints a 5s progress heartbeat naming still-running items, and aggregates per-item failures into a single non-zero exit. Resolve print_colored's output stream at call time so redirection works. Foundation for parallelizing per-node kubectl operations; nothing calls it yet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fdefe46 to
df94c18
Compare


Add a thread-pool-based run_in_parallel helper to common_lib that buffers each
worker's output into a labeled block, prints a 5s progress heartbeat naming
still-running items, and aggregates per-item failures into a single non-zero
exit. Resolve print_colored's output stream at call time so redirection works.
Foundation for parallelizing per-node kubectl operations; nothing calls it yet.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com