Skip to content

fix(prefetch): allow for any prefetch to fail all of them - #82

Merged
nobe4 merged 3 commits into
mainfrom
prefetch-timeout
Sep 22, 2026
Merged

nobe4 merged 3 commits into
mainfrom
prefetch-timeout

Conversation

@nobe4

@nobe4 nobe4 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Currently, if any of the prefetch fails, it doesn't fails the whole thread pool. This means that the execution will hang until something kills it. This happened a few times when one of the prefetch fails and the CI just kept waiting.

This change keeps running prefetch in parallel but allows a failure to cancel execution and raise the error.

Currently, if any of the prefetch fails, it doesn't fails the whole
thread pool. This means that the execution will hang until something
kills it. This happened a few times when one of the prefetch fails and
the CI just kept waiting.

This change keeps running prefetch in parallel but allows a failure to
cancel execution and raise the error.
Copilot AI balanced review requested due to automatic review settings September 22, 2026 10:56

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

The implementation safely propagates failures, terminates remaining workers, and includes focused regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Ensures parallel prefetch failures propagate immediately instead of hanging.

Changes:

  • Tracks worker outcomes through a thread-safe queue.
  • Terminates the thread pool after completion or failure.
  • Adds regression coverage for blocked workers.
File Description
lib/​entitlements.rb Implements fail-fast prefetch execution and cleanup.
spec/​unit/​entitlements_spec.rb Tests immediate worker-failure propagation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

hosom
hosom previously approved these changes Sep 22, 2026

@hosom hosom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't forget to bump the gemfile and version OR we can ship this together with #83, your choice.

to merge after #83
hosom
hosom previously approved these changes Sep 22, 2026
@nobe4
nobe4 merged commit 9584de6 into main Sep 22, 2026
19 checks passed
@nobe4
nobe4 deleted the prefetch-timeout branch September 22, 2026 17:08
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.

4 participants