Repository navigation
fix(cli): Skip a missing directory in sourcemap upload --allow-empty - #2216
Open
sentry-junior[bot] wants to merge 2 commits into
Open
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
Bundler plugins upload each build output in turn with allowEmpty. A build output that does not exist threw and stopped the outputs after it. --allow-empty now treats a missing directory like an empty one: it uploads nothing, names the directory, and exits 0. Without the flag, a missing directory still fails. Co-Authored-By: bete <28983162+betegon@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 16baa37. Configure here.
existsSync is false for any stat failure, so an inaccessible path was skipped under --allow-empty instead of failing. Co-Authored-By: bete <28983162+betegon@users.noreply.github.com>
This branch was previously deployed
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.

The bundler plugins call
sourcemap uploadonce per build output and passallowEmpty(getsentry/sentry-javascript#26092). An empty output is skipped, but an output that doesn't exist still throws. That stops the loop, so the outputs after it never upload.Rule:
--allow-empty, a missing directory (or glob base) is treated like an empty one. Nothing is uploaded, the output names the directory, and the command exits 0. The SDK returns{ filesUploaded: 0 }, so the plugin's existing "nothing uploaded" warning covers missing and empty outputs together.Before (0.49.0)
After
On releases up to 0.47 there were about 15k "Directory … does not exist" issue events. They stop at 0.48 only because #1606 silences
directoryvalidation errors, and released versions don't tag the failing field on the silenced metric. The failure still reproduces on 0.49.0, as shown above.via @betegon.
--
View Session [Sentry]