Repository navigation
fix(cli): Skip a missing directory in sourcemap upload --allow-empty - #2216
Open
sentry-junior[bot] wants to merge 3 commits into
Open
sentry-junior[bot] wants to merge 3 commits into
sentry-junior[bot] wants to merge 3 commits into
Conversation
|
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.
Contributor
|
This PR has had no activity for 3 days. It closes in 2 days unless someone pushes, comments, or adds the |
4 of 21 tasks
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> Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
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> Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
A missing glob base is skipped like a missing directory. A path that is a file, or one whose stat fails with anything but ENOENT (here ENOTDIR), still fails with the flag. Without the flag, a missing directory fails with the exact "does not exist" message. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
fix/cli-sourcemap-upload-missing-dir-allow-empty
branch
from
November 26, 2026 11:02
49d5463 to
78c72e7
Compare
Contributor
Author
|
Changes since the last review:
|
This branch was successfully 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. CI users moving from sentry-cli v3 hit the same thing: v3 expands each path as a glob, so a path that doesn't exist matches nothing and is skipped.Rule:
--allow-empty, a missing directory (or a missing glob base, likemissing/**) is treated like an empty one. Nothing is uploaded, the output names the directory, and the command exits 0. Org and project aren't needed. The SDK returns{ filesUploaded: 0 }, so the plugin's existing "nothing uploaded" warning covers missing and empty outputs together.Directory '<dir>' does not exist.(exit 21). v4 stays strict by default on purpose, to catch a typoed path.ENOENTcounts as missing. A path that is a file, or one whosestatfails any other way (EACCES,ENOTDIR), still fails even with the flag.Before (main)
After
Part of the v3 sourcemap parity work in #1965.
via @betegon, @BYK.
--
View Session [Sentry]