Repository navigation
perf(sourcemaps): upload source maps concurrently - #861
Open
xavier-greenline wants to merge 6 commits into
Open
xavier-greenline wants to merge 6 commits into
xavier-greenline wants to merge 6 commits into
Conversation
Upload up to 8 files at once instead of one at a time. After the first failed upload, no new uploads start and the command returns that error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ld-ahartmann
approved these changes
Oct 16, 2026
ld-ahartmann
left a comment
Contributor
There was a problem hiding this comment.
neat! I agree the concurrency flag can be left out
Author
|
Thanks @ld-ahartmann. I've merged the latest main into the branch. How do you want to proceed? |
Contributor
|
hey @xavier-greenline ill take this one from here! |
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.
Requirements
Related issues
Closes #860
Describe the solution you've provided
errgroup, limited to 8 uploads at a time.golang.org/x/syncmoves from an indirect to a direct dependency.Describe alternatives you've considered
Left for maintainers to decide:
--concurrencyflag, where 1 restores sequential uploads. I left it out to keep the change small, though the timings insourcemaps uploadsends files one at a time #860 show the limit matters..next/serverupload from about 60 s to 37 s, but 8 is safer for shared CI runners and for presigned-URL rate limits we cannot see.Additional context
The
[LaunchDarkly] Uploaded …lines now print in completion order rather than directory walk order.Note
Overview
sourcemaps uploadnow PUTs each file to its presigned URL in parallel (up to 8 at a time) viagolang.org/x/sync/errgroup, replacing the previous one-by-one loop. A newuploadFileshelper owns that orchestration; the command still fails on the first upload error and does not start new work after a failure (in-flight uploads may finish).Tests cover that concurrency stays above 1 and at or below the cap, and that a 403 stops before every file is attempted.
golang.org/x/syncis a direct module dependency. Progress lines[LaunchDarkly] Uploaded …may appear in completion order instead of walk order.Reviewed by Cursor Bugbot for commit e32b56b. Bugbot is set up for automated code reviews on this repo. Configure here.