Skip to content

@sentry/vite-plugin 11: release.vcsRemote is ignored, and commits are matched through the origin remote whatever it names #26714

Closed

Description

@YevheniiKotyrlo

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/vite-plugin

SDK Version

11.16.0 (also 11.8.0, and develop at bd2d389)

Framework Version

Vite 8.3.5

Link to Sentry event

No response

Reproduction Example/SDK Setup

https://gist.github.com/YevheniiKotyrlo/d370f4072fb6f35c595d53f998b445cd

The plugin call the reproducer's app makes (url points at a local stand-in for the Sentry API; REPRO_VCS_REMOTE is upstream in two builds and unset in the third):

sentryVitePlugin({
  org: 'example-org',
  project: 'example-app',
  authToken: 'example-token',
  url: process.env.REPRO_SENTRY_URL,
  release: {
    name: 'example-app@1.0.0',
    ...(process.env.REPRO_VCS_REMOTE ? { vcsRemote: process.env.REPRO_VCS_REMOTE } : {}),
  },
  sourcemaps: { disable: true },
  telemetry: false,
  debug: true,
})

Steps to Reproduce

  1. In a git checkout with two remotes, origin (https://github.com/example-org/example-app.git) and upstream (https://github.com/example-org/upstream-app.git), add sentryVitePlugin as above.
  2. Build 3.1: run vite build with release.vcsRemote: 'upstream' while the Sentry organization has a repository for example-org/upstream-app only.
  3. Build 3.2: run vite build with release.vcsRemote: 'upstream' while the organization has repositories for both example-org/example-app and example-org/upstream-app.
  4. Build 3.3: run vite build with release.vcsRemote unset, the organization unchanged from build 3.2.
  5. Look at which repository each build links the release's commit through.

The gist runs these steps with no Sentry account: clone it and run node repro.mjs (git and npm on PATH; my runs used Node v26.12.1). It installs vite@8.3.5 and the latest @sentry/vite-plugin in a new temporary checkout, points url at a local stand-in that records every request and answers as sentry.io does (/repos/ filtered by query, a release update whose refs name a repository the organization lacks refused with 400), and makes the three builds. It exits 0 only when each build links HEAD through the repository of the remote its configuration names, and no other; 1 otherwise; 2 when a step fails. node repro.mjs 5.4.0 runs another version, and node repro.mjs @sentry/vite-plugin=file:/path/to/sentry-vite-plugin-11.16.0.tgz @sentry/bundler-plugins=file:/path/to/sentry-bundler-plugins-11.16.0.tgz @sentry/core=file:/path/to/sentry-core-11.16.0.tgz runs packages packed from a checkout.

Expected Result

Builds 3.1 and 3.2 link the release's HEAD through example-org/upstream-app, the repository of the remote release.vcsRemote names. Build 3.3, with vcsRemote unset, keeps linking it through example-org/example-app, the origin remote's repository. @sentry/vite-plugin 5.4.0 does both with the same options.

Actual Result

vcsRemote changes nothing: commits are matched through the origin remote. In build 3.1 nothing is linked; on 11.16.0 and develop, the error the plugin logs at debug level opens with No Sentry repository matching 'example-org/example-app' (from the 'origin' git remote). Builds 3.2 (vcsRemote: 'upstream') and 3.3 (vcsRemote unset) send the same update:

     PUT /api/0/organizations/example-org/releases/example-app%401.0.0/ refs=[example-org/example-app@HEAD] -> 200

On develop at bd2d389, with packages/core, packages/bundler-plugins and packages/vite-plugin built and packed from it, the gist's output ([…] marks words left out of its one debug line):

node v26.12.1, win32 x64, git version 2.56.0.windows.4

1. npm install vite@8.3.5 @sentry/vite-plugin@file:sentry-vite-plugin-11.16.0.tgz (overrides: @sentry/bundler-plugins@file:sentry-bundler-plugins-11.16.0.tgz, @sentry/core@file:sentry-core-11.16.0.tgz)
   installed: @sentry/vite-plugin 11.16.0, @sentry/bundler-plugins 11.16.0, sentry 0.50.0, vite 8.3.5

2. git init; git remote add origin https://github.com/example-org/example-app.git; git remote add upstream https://github.com/example-org/upstream-app.git; git commit
   HEAD 96f52372a3f65d0ddd17b58b22a661c9522f3e5f

3.1 vite build; vcsRemote 'upstream', only example-org/upstream-app
   vite build exited 0
   build output lines about commits, remotes or repositories: 
     [sentry-vite-plugin] Debug: An error occurred setting commits on release […]: w [SentryError]: No Sentry repository matching 'example-org/example-app' (from the 'origin' git remote).
     sentry release set-commits example-org/example-app@1.0.0 --local
     Note: Add the repository to Sentry through your source code integration: <stand-in>/settings/example-org/repos/
   requests to Sentry:
     GET /api/0/organizations/example-org/ -> 200
     POST /api/0/organizations/example-org/releases/ -> 201
     GET /api/0/organizations/example-org/releases/example-app%401.0.0/previous-with-commits/ -> 200
     GET /api/0/organizations/example-org/repos/ query=example-org/example-app -> 200
     GET /api/0/organizations/example-org/repos/ query=example-app -> 200
     GET /api/0/organizations/example-org/repos/ query=example app -> 200
     GET /api/0/organizations/example-org/repos/ -> 200
     PUT /api/0/organizations/example-org/releases/example-app%401.0.0/ dateReleased -> 200
   => nothing linked (expected: linked through example-org/upstream-app)

3.2 vite build; vcsRemote 'upstream', example-org/example-app and example-org/upstream-app
   vite build exited 0
   build output lines about commits, remotes or repositories: none
   requests to Sentry:
     GET /api/0/organizations/example-org/ -> 200
     POST /api/0/organizations/example-org/releases/ -> 201
     GET /api/0/organizations/example-org/releases/example-app%401.0.0/previous-with-commits/ -> 200
     GET /api/0/organizations/example-org/repos/ query=example-org/example-app -> 200
     PUT /api/0/organizations/example-org/releases/example-app%401.0.0/ refs=[example-org/example-app@HEAD] -> 200
     PUT /api/0/organizations/example-org/releases/example-app%401.0.0/ dateReleased -> 200
   => linked through example-org/example-app (expected: linked through example-org/upstream-app)

3.3 vite build; vcsRemote unset, example-org/example-app and example-org/upstream-app
   vite build exited 0
   build output lines about commits, remotes or repositories: none
   requests to Sentry:
     GET /api/0/organizations/example-org/ -> 200
     POST /api/0/organizations/example-org/releases/ -> 201
     GET /api/0/organizations/example-org/releases/example-app%401.0.0/previous-with-commits/ -> 200
     GET /api/0/organizations/example-org/repos/ query=example-org/example-app -> 200
     PUT /api/0/organizations/example-org/releases/example-app%401.0.0/ refs=[example-org/example-app@HEAD] -> 200
     PUT /api/0/organizations/example-org/releases/example-app%401.0.0/ dateReleased -> 200
   => linked through example-org/example-app (expected: linked through example-org/example-app)

Summary: @sentry/vite-plugin 11.16.0, @sentry/bundler-plugins 11.16.0, sentry 0.50.0, vite 8.3.5. vcsRemote 'upstream', only example-org/upstream-app: nothing linked; vcsRemote 'upstream', example-org/example-app and example-org/upstream-app: linked through example-org/example-app; vcsRemote unset, example-org/example-app and example-org/upstream-app: linked through example-org/example-app. Exit 1.

node repro.mjs (the 11.16.0 release) and node repro.mjs 11.8.0 end the same way:

Summary: @sentry/vite-plugin 11.16.0, @sentry/bundler-plugins 11.16.0, sentry 0.50.0, vite 8.3.5. vcsRemote 'upstream', only example-org/upstream-app: nothing linked; vcsRemote 'upstream', example-org/example-app and example-org/upstream-app: linked through example-org/example-app; vcsRemote unset, example-org/example-app and example-org/upstream-app: linked through example-org/example-app. Exit 1.
Summary: @sentry/vite-plugin 11.8.0, @sentry/bundler-plugins 11.8.0, sentry 0.45.0, vite 8.3.5. vcsRemote 'upstream', only example-org/upstream-app: nothing linked; vcsRemote 'upstream', example-org/example-app and example-org/upstream-app: linked through example-org/example-app; vcsRemote unset, example-org/example-app and example-org/upstream-app: linked through example-org/example-app. Exit 1.

node repro.mjs 5.4.0 (@sentry/vite-plugin 5.4.0, @sentry/bundler-plugins 10.78.0, @sentry/cli 2.58.6, vite 8.3.5) links each build through the repository its configuration names:

[…]
3.1 vite build; vcsRemote 'upstream', only example-org/upstream-app
   vite build exited 0
   build output lines about commits, remotes or repositories: none
   requests to Sentry:
     POST /api/0/projects/example-org/example-app/releases/ -> 201
     GET /api/0/organizations/example-org/repos/ -> 200
     POST /api/0/projects/example-org/example-app/releases/ -> 201
     PUT /api/0/organizations/example-org/releases/example-app@1.0.0/ refs=[example-org/upstream-app@HEAD] -> 200
     PUT /api/0/projects/example-org/example-app/releases/example-app@1.0.0/ dateReleased -> 200
   => linked through example-org/upstream-app (expected: linked through example-org/upstream-app)

3.2 vite build; vcsRemote 'upstream', example-org/example-app and example-org/upstream-app
   vite build exited 0
   build output lines about commits, remotes or repositories: none
   requests to Sentry:
     POST /api/0/projects/example-org/example-app/releases/ -> 201
     GET /api/0/organizations/example-org/repos/ -> 200
     POST /api/0/projects/example-org/example-app/releases/ -> 201
     PUT /api/0/organizations/example-org/releases/example-app@1.0.0/ refs=[example-org/upstream-app@HEAD] -> 200
     PUT /api/0/projects/example-org/example-app/releases/example-app@1.0.0/ dateReleased -> 200
   => linked through example-org/upstream-app (expected: linked through example-org/upstream-app)

3.3 vite build; vcsRemote unset, example-org/example-app and example-org/upstream-app
   vite build exited 0
   build output lines about commits, remotes or repositories: none
   requests to Sentry:
     POST /api/0/projects/example-org/example-app/releases/ -> 201
     GET /api/0/organizations/example-org/repos/ -> 200
     POST /api/0/projects/example-org/example-app/releases/ -> 201
     PUT /api/0/organizations/example-org/releases/example-app@1.0.0/ refs=[example-org/example-app@HEAD] -> 200
     PUT /api/0/projects/example-org/example-app/releases/example-app@1.0.0/ dateReleased -> 200
   => linked through example-org/example-app (expected: linked through example-org/example-app)

Summary: @sentry/vite-plugin 5.4.0, @sentry/bundler-plugins 10.78.0, @sentry/cli 2.58.6, vite 8.3.5. vcsRemote 'upstream', only example-org/upstream-app: linked through example-org/upstream-app; vcsRemote 'upstream', example-org/example-app and example-org/upstream-app: linked through example-org/upstream-app; vcsRemote unset, example-org/example-app and example-org/upstream-app: linked through example-org/example-app. Exit 0.

Additional Context

release.vcsRemote is still documented (

/**
* Version control system (VCS) remote name.
*
* This value can also be specified via the `SENTRY_VSC_REMOTE` environment variable.
*
* @default "origin"
*/
vcsRemote?: string;
and
/**
* Version control system (VCS) remote name.
*
* This value can also be specified via the `SENTRY_VSC_REMOTE` environment variable.
*
* @default "origin"
*/
vcsRemote?: string;
). The plugin normalizes it (
vcsRemote: userOptions.release?.vcsRemote ?? process.env['SENTRY_VSC_REMOTE'] ?? 'origin',
) and never hands it to the CLI (
await this.#sdk.release['set-commits']({
orgVersion: name,
auto: auto === true,
commit: commitSpec,
});
). A second place reads origin alone: on a Vercel build outside production, canAutoDetectRepository runs git remote get-url origin (
childProcess.execSync('git remote get-url origin', { stdio: 'ignore', windowsHide: true });
) and, when that fails and no CI variable names the repository, turns commit association off (
} else if (process.env['VERCEL'] && vercelEnv !== 'production' && !canAutoDetectRepository()) {
// Vercel's own builders have no git remote and no other CI variables, so `--auto` can only fail there.
// Builds that have either, such as `vercel build` in GitHub Actions, keep `--auto` below.
options.release.setCommits = false;
), whatever remote vcsRemote names.

Build 3.1's outcome, nothing linked and the cause logged only at debug level, is the one #26705 reports with vcsRemote unset.

Where it stands upstream:

The plugin still documents the option, so I'm asking for it to be honoured. One way is for the plugin to resolve the named remote's repository and HEAD and send them through the REPO@SHA form its manual mode already builds (

// Manual mode is expressed as `REPO@SHA` (optionally `REPO@PREV..SHA`).
const commitSpec =
repo && commit ? `${repo}@${previousCommit ? `${previousCommit}..${commit}` : commit}` : undefined;
). Another is for the CLI to take a remote. Until either lands, the option's docs could say it is not honoured, and the plugin could warn when it is set.

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Activity

  1. linear-code commented on Nov 20, 2026

    @linear-code
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Nov 20, 2026
  3. andreiborza commented on Nov 23, 2026

    @andreiborza
    Member

    Hi @YevheniiKotyrlo, thanks for filing this. We'll take a look.

  4. self-assigned this
    on Nov 23, 2026
  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Nov 23, 2026
  6. github-actions commented on Nov 23, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #26748, which was included in the 11.17.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions