Fix GitHub repo list failing to load on slow installations#4811
Merged
Conversation
|
The change is a 6-line operational fix: adds Security Review ✅
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4811 +/- ##
=======================================
- Coverage 90.3% 90.2% -0.1%
=======================================
Files 442 442
Lines 22543 22543
=======================================
- Hits 20350 20337 -13
- Misses 2193 2206 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
stuartc
approved these changes
May 29, 2026
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.
Description
Fixes a captured error on
/projects/:id/settingswhere the GitHub sync section fails to load repos list when one of a user's GitHub installations takes >5s to return its repos.By default,
Task.async_streamhas a timeout of5 secs, this PR bumps it up to30 secsCloses #4810
Validation steps
mix test test/lightning_web/live/project_live_test.exs:4132Process.sleep(5005)insidethe
Task.async_streamcallback inlib/lightning_web/live/project_live/github_sync_component.exonmainand open the project settings page — the GitHub section shows the
failure state. With this fix the section loads (slow installations are
dropped).
Stream.filter(&match?({:ok, _}, &1))was meant to drop failed tasks but only works underon_timeout: :kill_task. This PR sets that, plus a 30s per-task timeout, so slow installations are dropped and the rest of the user's installations and repos still render.Additional notes for the reviewer
in a test would make it slow and flaky. The existing 30-test version-control
suite covers the happy path.
maybe_fetch_remaining_repos) already usestimeout: :infinity, so a single installation's full repo fetch can easilyexceed 5s. 30s on the outer task is a generous but bounded upper limit.
AI Usage
Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):
You can read more details in our
Responsible AI Policy
Pre-submission checklist
/reviewwith Claude Code)
(e.g.,
:owner,:admin,:editor,:viewer)