Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

releases set-commits <commit> --auto --ignore-missing fails with error: could not find repository at '.'; class=Repository (6); code=NotFound (-3) #2157

Open
1 of 8 tasks
felangel opened this issue Sep 17, 2024 · 7 comments

Comments

@felangel
Copy link

CLI Version

2.36.1

Operating System and Architecture

  • macOS (arm64)
  • macOS (x86_64)
  • Linux (i686)
  • Linux (x86_64)
  • Linux (armv7)
  • Linux (aarch64)
  • Windows (i686)
  • Windows (x86_64)

Operating System Version

debian:12

Link to reproduction repository

No response

CLI Command

sentry-cli releases set-commits --auto --ignore-missing

Exact Reproduction Steps

  1. Create a new remix project (ours is in a mono repo using turbo under apps/my-app)
  2. Initialize sentry npx @sentry/wizard@latest -i remix --url https://sentry.io
  3. Create a Dockerfile
FROM node:20-bookworm-slim as base

RUN apt-get update && apt-get install -y fuse3 openssl ca-certificates python3 make g++

ENV NODE_ENV=production
ENV SENTRY_ORG="my-org"
ENV SENTRY_PROJECT="my-project"
ENV SENTRY_LOG_LEVEL="debug"

WORKDIR /app
ADD package.json .

FROM base AS deps
ADD package-lock.json .
RUN npm install --production=false

FROM deps AS build

ARG COMMIT_SHA
ENV COMMIT_SHA=$COMMIT_SHA

ADD . .

RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN \
    SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) npm run build

FROM deps AS prod-deps
RUN npm prune --production

FROM base AS prod
COPY --from=prod-deps /app/node_modules ./node_modules
COPY --from=build /app/public ./public
COPY --from=build /app/build ./build

EXPOSE 3000
CMD ["npm", "start"]
  1. Write the sentry auth token to .sentry_auth.txt
  2. Build via docker build --build-arg COMMIT_SHA=<COMMIT> --secret id=SENTRY_AUTH_TOKEN,src=.sentry_auth.txt .

Additional Context

vite.config.ts

import { glob } from 'glob';
import { vitePlugin as remix } from '@remix-run/dev';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { sentryVitePlugin } from '@sentry/vite-plugin';

const MODE = process.env.NODE_ENV;

export default defineConfig({
  plugins: [
    remix({
      future: {
        v3_fetcherPersist: true,
        v3_relativeSplatPath: true,
        v3_throwAbortReason: true,
      },
    }),
    tsconfigPaths(),
    process.env.SENTRY_AUTH_TOKEN
      ? sentryVitePlugin({
          debug: true,
          disable: MODE !== 'production',
          authToken: process.env.SENTRY_AUTH_TOKEN,
          org: process.env.SENTRY_ORG,
          project: process.env.SENTRY_PROJECT,
          release: {
            name: process.env.COMMIT_SHA,
            setCommits: {
              auto: true,
              ignoreMissing: true,
            }
          },
          sourcemaps: {
            filesToDeleteAfterUpload: await glob([
              './build/**/*.map',
              '.server-build/**/*.map',
            ]),
          },
        })
      : null,
  ],
  build: {
    sourcemap: true,
  },
});

package.json

{
  "private": true,
  "sideEffects": false,
  "type": "module",
  "scripts": {
    "build": "remix vite:build",
    "dev": "remix vite:dev --port 3000",
    "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
    "start": "remix-serve ./build/server/index.js",
    "typecheck": "tsc",
    "format": "prettier --write .",
    "format:check": "prettier --check .",
    "test": "vitest"
  },
  "eslintIgnore": [
    "/node_modules",
    "/build",
    "/public/build"
  ],
  "dependencies": {
    "@remix-run/node": "^2.12.0",
    "@remix-run/react": "^2.12.0",
    "@remix-run/serve": "^2.12.0",
    "@sentry/remix": "^8.30.0",
    "apexcharts": "^3.48.0",
    "currency.js": "^2.0.4",
    "decimal.js": "^10.4.3",
    "glob": "^11.0.0",
    "highlight.js": "^11.9.0",
    "isbot": "^5.1.3",
    "react": "^18.2.0",
    "react-apexcharts": "^1.4.1",
    "react-dom": "^18.2.0",
    "rehype-highlight": "^7.0.0",
    "rehype-raw": "^7.0.0",
    "rehype-stringify": "^10.0.0",
    "remark-gfm": "^4.0.0",
    "remark-parse": "^11.0.0",
    "remark-rehype": "^11.1.0",
    "remix-auth": "^3.4.0",
    "remix-auth-google": "^2.0.0",
    "remix-auth-microsoft": "^2.0.0",
    "remix-redis-session": "^0.0.12",
    "remix-typedjson": "^0.4.1",
    "remix-utils": "^7.5.0",
    "stripe": "^14.23.0",
    "unified": "^11.0.4"
  },
  "devDependencies": {
    "@remix-run/dev": "^2.12.0",
    "@remix-run/eslint-config": "^2.12.0",
    "@remix-run/testing": "^2.12.0",
    "@sentry/vite-plugin": "^2.22.4",
    "@tailwindcss/typography": "^0.5.12",
    "@testing-library/jest-dom": "^6.4.2",
    "@testing-library/react": "^14.2.2",
    "@types/react": "^18.2.20",
    "@types/react-dom": "^18.2.7",
    "@vitejs/plugin-react": "^4.3.1",
    "@vitest/coverage-v8": "^2.0.5",
    "autoprefixer": "^10.4.19",
    "daisyui": "^3.9.2",
    "eslint": "^8.57.0",
    "eslint-config-prettier": "^9.1.0",
    "eslint-import-resolver-typescript": "^3.6.1",
    "eslint-plugin-import": "^2.28.1",
    "eslint-plugin-jsx-a11y": "^6.7.1",
    "eslint-plugin-react": "^7.33.2",
    "eslint-plugin-react-hooks": "^4.6.0",
    "jsdom": "^25.0.0",
    "postcss": "^8.4.38",
    "prettier": "^3.2.5",
    "prettier-plugin-tailwindcss": "^0.5.13",
    "tailwindcss": "^3.4.4",
    "typescript": "^5.4.3",
    "vite": "^5.1.0",
    "vite-tsconfig-paths": "^4.2.1",
    "vitest": "^2.0.5"
  },
  "optionalDependencies": {
    "@rollup/rollup-linux-x64-gnu": "^4.21.2"
  },
  "engines": {
    "node": ">=20.0.0"
  }
}

Expected Results

I expect the build to succeed and successfully upload source maps and commit information to sentry.

Actual Results

Build fails with error:

#14 21.72 [sentry-debug-id-upload-plugin] Command failed: /app/node_modules/@sentry/cli-linux-x64/bin/sentry-cli releases set-commits f091b72ff095031fc517da5133c11505bc4e21b5 --auto --ignore-missing
#14 21.72 error: could not find repository at '.'; class=Repository (6); code=NotFound (-3)
#14 21.72 

Additional Context

The build succeeds if we remove setCommits from the build step:

import { glob } from 'glob';
import { vitePlugin as remix } from '@remix-run/dev';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { sentryVitePlugin } from '@sentry/vite-plugin';

const MODE = process.env.NODE_ENV;

export default defineConfig({
  plugins: [
    remix({
      future: {
        v3_fetcherPersist: true,
        v3_relativeSplatPath: true,
        v3_throwAbortReason: true,
      },
    }),
    tsconfigPaths(),
    process.env.SENTRY_AUTH_TOKEN
      ? sentryVitePlugin({
          debug: true,
          disable: MODE !== 'production',
          authToken: process.env.SENTRY_AUTH_TOKEN,
          org: process.env.SENTRY_ORG,
          project: process.env.SENTRY_PROJECT,
          release: {
            name: process.env.COMMIT_SHA,
-          setCommits: {
-            auto: true,
-            ignoreMissing: true,
-          },
          },
          sourcemaps: {
            filesToDeleteAfterUpload: await glob([
              './build/**/*.map',
              '.server-build/**/*.map',
            ]),
          },
        })
      : null,
  ],
  build: {
    sourcemap: true,
  },
});

Logs

#14 [build 2/2] RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN     SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) npm run build
#14 10.42 ✓ 424 modules transformed.
#14 11.26 rendering chunks...
#14 12.03 computing gzip size...
#14 12.05 [sentry-vite-plugin] Debug: Waiting for dependencies on generated files to be freed before deleting...
#14 12.07 [sentry-vite-plugin] Debug: No `sourcemaps.assets` option provided, falling back to uploading detected build artifacts.
#14 12.50   DEBUG   2024-09-16 16:14:25.085797949 +00:00 < x-served-by: frontend-default-5dc7d755bf-v2pbj
#14 12.50   DEBUG   2024-09-16 16:14:25.085811744 +00:00 < strict-transport-security: max-age=31536000; includeSubDomains; preload
#14 12.50   DEBUG   2024-09-16 16:14:25.085823857 +00:00 < via: 1.1 google
#14 12.50   DEBUG   2024-09-16 16:14:25.085836321 +00:00 < Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
#14 12.50   DEBUG   2024-09-16 16:14:25.085850768 +00:00 < Transfer-Encoding: chunked
#14 12.50   DEBUG   2024-09-16 16:14:25.085983136 +00:00 response status: 200
#14 12.50   DEBUG   2024-09-16 16:14:25.087058661 +00:00 body: [***"id":"1316149","name":"shorebirdtech/_web","url":"https://github.com/shorebirdtech/_web","provider":***"id":"integrations:github","name":"GitHub"***,"status":"active","dateCreated":"2024-09-16T16:06:41.005881Z","integrationId":"256818","externalSlug":"shorebirdtech/_web","externalId":"660342431"***]
#14 12.50   INFO    2024-09-16 16:14:25.087197502 +00:00 Resolving HEAD (shorebirdtech/_web@HEAD)
#14 12.50 error: could not find repository at '.'; class=Repository (6); code=NotFound (-3)
#14 12.50   DEBUG   2024-09-16 16:14:25.087390513 +00:00 skipping update nagger because session is not attended
#14 12.50 
#14 12.50     at genericNodeError (node:internal/errors:984:15)
#14 12.50     at wrappedFn (node:internal/errors:538:14)
#14 12.50     at ChildProcess.exithandler (node:child_process:422:12)
#14 12.50     at ChildProcess.emit (node:events:519:28)
#14 12.50     at maybeClose (node:internal/child_process:1105:16)
#14 12.50     at ChildProcess._handle.onexit (node:internal/child_process:305:5) ***
#14 12.50   code: 'PLUGIN_ERROR',
#14 12.50   killed: false,
#14 12.50   signal: null,
#14 12.50   cmd: '/app/node_modules/@sentry/cli-linux-x64/bin/sentry-cli releases set-commits df69193aabb3f376dc592c9905c3e1fa0df48392 --auto --ignore-missing',
#14 12.50   pluginCode: 1,
#14 12.50   plugin: 'sentry-debug-id-upload-plugin',
#14 12.50   hook: 'writeBundle'
#14 12.50 ***
#14 12.51 > Adding source map references
#14 12.56   DEBUG   2024-09-16 16:14:25.212299922 +00:00 request GET https://sentry.io/api/0/projects/shorebird-t5/console/releases/df69193aabb3f376dc592c9905c3e1fa0df48392/files/?cursor=&checksum=019bdae60acddade4b0f26479f020d5580ed1390&checksum=02d3864b7638e7319416e231abe307e22527df2d&checksum=0378bf07b00f3fd133b4b86801bcab972cb9fcdf&checksum=08d57bd6a0665ea046ed4ba92d6fa1c78c48d911&checksum=0c2b958e6be62ffb4210fec451896bebb390bef9&checksum=0d3794f4d3644f111f0213e85434df010f2838e2&checksum=0d7a307f8a164c3c376f833d3d9d3248a6118f7b&checksum=0edfdc98db79b688bba84377418267666b85f3f0&checksum=10b7a96e18c75b19d0c9a23a16c354674549a0be&checksum=16d778b698b885899caadf60cc2584cec8cf1126&checksum=18aaa15cdd480091c8b3cee5999637118cd21bdf&checksum=1c6781b2a866f83c4ad29d4e03e71a5ff6657e15&checksum=1e8ebb621a81b9c1f0c987d49107364014ba94f1&checksum=22bb4f63f64ece08f5f7c6083a688ae75216d76d&checksum=23d9625cb224dad70031fc38ca667b8cde85a0f7&checksum=27b765929f1016bc6077305268d5009e6e38b7ea&checksum=2ac6e5f005a76125aeb0290000f3ffea09c9239f&checksum=2de4b6999ffa40396bf95646446b400c9c4d77e2&checksum=3260de2bd9e1922aeb3925b7771967caf2ececbc&checksum=3976cf2e4ce9db751c2835f5bf5a7ebb9cc88467&checksum=3bcf054f98c3f318c2949b2fc27c04370bdde86b&checksum=3db463ba29619a80b075614e6b3143e7a6a800f2&checksum=46771d1877396b457b5df29dd8808d10520b8bb3&checksum=4997f0bc9d32384ec99ba3ce16eb7ecb949a443b&checksum=4ab21b4ca9f4cc9cf0093af03c4684a5ca0cee15&checksum=4ba27b789214a52fcadb3af7c55dbad4336878cc&checksum=4f9127710e394c8a32cd4c97d27885d9685655a8&checksum=53980d9a31e28948200c122644df049e6aa8c268&checksum=56ab3e0e25ebf1af42b34e87691a6620c708fac9&checksum=5c700389181fda7ecad184a92e61adf68b4b9012&checksum=63c43d56e71c53eb87eaeca43aa633c773c80c3c&checksum=6458fe199afdd4dc10b40d6bb3a261dec17dd910&checksum=646328e3e5e9868efd402a13f4480dabcdb6f370&checksum=69a598df86bac060586d32798954c4a99fc288c7&checksum=6b79399c95c619d570013d1dbdb699ea9f34edee&checksum=6c37511c3fcb7afe69f03c91ac575405b71f892c&checksum=6d7971b820fe4ad77b99f19fbefb6fa1464d0548&checksum=713aa11efdaaf2b7e6b1a11ec4bbe40362572666&checksum=733156a31ef0ed2ef3e52955035ab215bd6bff24&checksum=764f4f53899cf1489907de35ab062e9e1304caa9&checksum=783a7ba22fad1142780ef06152ad9c1f65c6ca0c&checksum=7d274f8425feaaed196bb4ea2a1cdfc3d8c8632c&checksum=7d33dac56d367015fd802cfa7ea3f3e0e9a51bde&checksum=7fc985e5a623fddb78c950219de53ea2d5658681&checksum=8021f8f76f397a925cf03aa897d39525cc4afa4f&checksum=8982f671f3a1099633c9bd09e83e1fb7dfd09541&checksum=8dd6bc5be8d3eb826b796275c3bfaa56a761babb&checksum=97a365771f67271078e9fc66e8aab1446059fcfc&checksum=9b5ee5cfdec81acb160666a0a25230f6927e2285&checksum=9bc84f2ace7f0e99f931a18ca0f138faf9c3ece8&checksum=9dcc6891fecbed786aaaff06b63d9c3fffa5b37c&checksum=9de340c3d19326a6e63aa086f02da00e0c83e7d5&checksum=a5f127de322f41fe491961a3bc017a55596eddca&checksum=a78944d1bf36c0c4f8893243c35cc70620aae8d1&checksum=bca859499682f38194b8e9ecd5a91b7dc815d29d&checksum=bfb17b639b31a31829357b30fbefe505626cce67&checksum=c1c100116c17b99f376a4a7737bd692de93d622a&checksum=c1f25808ce381b20b67b09d508bfee96eb16740a&checksum=c28f9d454749eeb6448c19f3474999a2f9c98d38&checksum=c464ac0af06d5ca62eb916a3eeffb8eb4006d4bf&checksum=c853632e4c6adc6732a9c49e68c9fbf889f1b3a4&checksum=c8d0d7e94fa6f1fcc5dd45e0467cd20f4b8e4dbe&checksum=c92b52b755031b23a2de42d693671f11ce65fba8&checksum=caa1a7a0fbae93e6d0db1e1ebe7504e1e9b70a0b&checksum=cb5532caa96739e5a5eb1bccc4747502b1c7f1ab&checksum=ce6703fde7cb624aa4a6f99278e37454dbb80950&checksum=d27da3f5cfef941ab9bd67e[807](https://github.com/shorebirdtech/_web/actions/runs/10887555963/job/30210810836#step:6:808)f4c1b0f56fff16&checksum=d48fdaab87c38d9d70057a7a043dbcb6d7a5b613&checksum=dc6092c95bd5326cbc5fef4b62af61e576b07b4f&checksum=dcddedacb13ebd97e045e4b6046763920aa5d1c3&checksum=de983cc3b5f13882ba27adf0d60a589cdfc40918&checksum=e352f15755ac38218f540b3ef0cbcc3b9fa22eae&checksum=e5c0ac2eba675ef4ee5a2074810e3091324b6a65&checksum=e95d4317c7ec119ec52a39c2d712c11a324565ed&checksum=eb6ba2119eea464858d277560ee31542091fbc6e&checksum=f2be335818ccd1cce28557ce373ed79e5b2cdc7a&checksum=f98a81b82f7f02e07a7daaf6d42b671537a99285&checksum=fb0c57f4a87e5ed4eaaa59d464b942e0fb0f4205&checksum=fbfc38aa77a4a495a91244a70191b06143d01d8a&checksum=ff80a3207d8ef5226c044a838302ee9cd0d2d13b
#14 12.56   DEBUG   2024-09-16 16:14:25.213001937 +00:00 pipeline: vite-plugin/2.22.4
#14 12.56   DEBUG   2024-09-16 16:14:25.213522403 +00:00 using token authentication
#14 12.56   DEBUG   2024-09-16 16:14:25.214030074 +00:00 retry number 0, max retries: 0
#14 12.56   DEBUG   2024-09-16 16:14:25.215034026 +00:00 > GET /api/0/projects/shorebird-t5/console/releases/df69193aabb3f376dc592c9905c3e1fa0df48392/files/?cursor=&checksum=019bdae60acddade4b0f26479f020d5580ed1390&checksum=02d3864b7638e7319416e231abe307e22527df2d&checksum=0378bf07b00f3fd133b4b86801bcab972cb9fcdf&checksum=08d57bd6a0665ea046ed4ba92d6fa1c78c48d911&checksum=0c2b958e6be62ffb4210fec451896bebb390bef9&checksum=0d3794f4d3644f111f0213e85434df010f2838e2&checksum=0d7a307f8a164c3c376f833d3d9d3248a6118f7b&checksum=0edfdc98db79b688bba84377418267666b85f3f0&checksum=10b7a96e18c75b19d0c9a23a16c354674549a0be&checksum=16d778b698b885899caadf60cc2584cec8cf1126&checksum=18aaa15cdd480091c8b3cee5999637118cd21bdf&checksum=1c6781b2a866f83c4ad29d4e03e71a5ff6657e15&checksum=1e8ebb621a81b9c1f0c987d49107364014ba94f1&checksum=22bb4f63f64ece08f5f7c6083a688ae75216d76d&checksum=23d9625cb224dad70031fc38ca667b8cde85a0f7&checksum=27b765929f1016bc6077305268d5009e6e38b7ea&checksum=2ac6e5f005a76125aeb0290000f3ffea09c9239f&checksum=2de4b6999ffa40396bf95646446b400c9c4d77e2&checksum=3260de2bd9e1922aeb3925b7771967caf2ececbc&checksum=3976cf2e4ce9db751c2835f5bf5a7ebb9cc88467&checksum=3bcf054f98c3f318c2949b2fc27c04370bdde86b&checksum=3db463ba29619a80b075614e6b3143e7a6a800f2&checksum=46771d1877396b457b5df29dd8[808](https://github.com/shorebirdtech/_web/actions/runs/10887555963/job/30210810836#step:6:809)d10520b8bb3&checksum=4997f0bc9d32384ec99ba3ce16eb7ecb949a443b&checksum=4ab21b4ca9f4cc9cf0093af03c4684a5ca0cee15&checksum=4ba27b789214a52fcadb3af7c55dbad4336878cc&checksum=4f9127710e394c8a32cd4c97d27885d9685655a8&checksum=53980d9a31e28948200c122644df049e6aa8c268&checksum=56ab3e0e25ebf1af42b34e87691a6620c708fac9&checksum=5c700389181fda7ecad184a92e61adf68b4b9012&checksum=63c43d56e71c53eb87eaeca43aa633c773c80c3c&checksum=6458fe199afdd4dc10b40d6bb3a261dec17dd910&checksum=646328e3e5e9868efd402a13f4480dabcdb6f370&checksum=69a598df86bac060586d32798954c4a99fc288c7&checksum=6b79399c95c619d570013d1dbdb699ea9f34edee&checksum=6c37511c3fcb7afe69f03c91ac575405b71f892c&checksum=6d7971b820fe4ad77b99f19fbefb6fa1464d0548&checksum=713aa11efdaaf2b7e6b1a11ec4bbe40362572666&checksum=733156a31ef0ed2ef3e52955035ab215bd6bff24&checksum=764f4f53899cf1489907de35ab062e9e1304caa9&checksum=783a7ba22fad1142780ef06152ad9c1f65c6ca0c&checksum=7d274f8425feaaed196bb4ea2a1cdfc3d8c8632c&checksum=7d33dac56d367015fd802cfa7ea3f3e0e9a51bde&checksum=7fc985e5a623fddb78c950219de53ea2d5658681&checksum=8021f8f76f397a925cf03aa897d39525cc4afa4f&checksum=8982f671f3a1099633c9bd09e83e1fb7dfd09541&checksum=8dd6bc5be8d3eb826b796275c3bfaa56a761babb&checksum=97a365771f67271078e9fc66e8aab1446059fcfc&checksum=9b5ee5cfdec81acb160666a0a25230f6927e2285&checksum=9bc84f2ace7f0e99f931a18ca0f138faf9c3ece8&checksum=9dcc6891fecbed786aaaff06b63d9c3fffa5b37c&checksum=9de340c3d19326a6e63aa086f02da00e0c83e7d5&checksum=a5f127de322f41fe491961a3bc017a55596eddca&checksum=a78944d1bf36c0c4f8893243c35cc70620aae8d1&checksum=bca859499682f38194b8e9ecd5a91b7dc815d29d&checksum=bfb17b639b31a31829357b30fbefe505626cce67&checksum=c1c100116c17b99f376a4a7737bd692de93d622a&checksum=c1f25808ce381b20b67b09d508bfee96eb16740a&checksum=c28f9d454749eeb6448c19f3474999a2f9c98d38&checksum=c464ac0af06d5ca62eb916a3eeffb8eb4006d4bf&checksum=c853632e4c6adc6732a9c49e68c9fbf889f1b3a4&checksum=c8d0d7e94fa6f1fcc5dd45e0467cd20f4b8e4dbe&checksum=c92b52b755031b23a2de42d693671f11ce65fba8&checksum=caa1a7a0fbae93e6d0db1e1ebe7504e1e9b70a0b&checksum=cb5532caa96739e5a5eb1bccc4747502b1c7f1ab&checksum=ce6703fde7cb624aa4a6f99278e37454dbb[809](https://github.com/shorebirdtech/_web/actions/runs/10887555963/job/30210810836#step:6:810)50&checksum=d27da3f5cfef941ab9bd67e807f4c1b0f56fff16&checksum=d48fdaab87c38d9d70057a7a043dbcb6d7a5b613&checksum=dc6092c95bd5326cbc5fef4b62af61e576b07b4f&checksum=dcddedacb13ebd97e045e4b6046763920aa5d1c3&checksum=de983cc3b5f13882ba27adf0d60a589cdfc40918&checksum=e352f15755ac38218f540b3ef0cbcc3b9fa22eae&checksum=e5c0ac2eba675ef4ee5a2074[810](https://github.com/shorebirdtech/_web/actions/runs/10887555963/job/30210810836#step:6:811)e3091324b6a65&checksum=e95d4317c7ec119ec52a39c2d712c11a324565ed&checksum=eb6ba2119eea464858d277560ee31542091fbc6e&checksum=f2be335818ccd1cce28557ce373ed79e5b2cdc7a&checksum=f98a81b82f7f02e07a7daaf6d42b671537a99285&checksum=fb0c57f4a87e5ed4eaaa59d464b942e0fb0f4205&checksum=fbfc38aa77a4a495a91244a70191b06143d01d8a&checksum=ff80a3207d8ef5226c044a838302ee9cd0d2d13b HTTP/1.1
#14 12.56   DEBUG   2024-09-16 16:14:25.215688903 +00:00 > Host: sentry.io
#14 12.56   DEBUG   2024-09-16 16:14:25.216198318 +00:00 > Accept: */*
#14 12.56   DEBUG   2024-09-16 16:14:25.216708784 +00:00 > Connection: TE
#14 12.56   DEBUG   2024-09-16 16:14:25.217233117 +00:00 > TE: gzip
#14 12.56   DEBUG   2024-09-16 16:14:25.217750467 +00:00 > sentry-trace:3515e7aba9534[811](https://github.com/shorebirdtech/_web/actions/runs/10887555963/job/30210810836#step:6:812)8e8a9c48b3484978-a5e2b2bbddd25dde-1
#14 12.56   DEBUG   2024-09-16 16:14:25.218246797 +00:00 > baggage:undefined
#14 12.56   DEBUG   2024-09-16 16:14:25.218258840 +00:00 > User-Agent: sentry-cli/2.36.1 vite-plugin/2.22.4
#14 12.56   DEBUG   2024-09-16 16:14:25.218296641 +00:00 > Authorization: ***
#14 ERROR: process "/bin/sh -c SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) npm run build" did not complete successfully: exit code: 1
------
 > [build 2/2] RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN     SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) npm run build:
12.56   DEBUG   2024-09-16 16:14:25.214030074 +00:00 retry number 0, max retries: 0
12.56   DEBUG   2024-09-16 16:14:25.215034026 +00:00 > GET /api/0/projects/shorebird-t5/console/releases/df69193aabb3f376dc592c9905c3e1fa0df48392/files/?cursor=&checksum=019bdae60acddade4b0f26479f020d5580ed1390&checksum=02d3864b7638e7319416e231abe307e22527df2d&checksum=0378bf07b00f3fd133b4b86801bcab972cb9fcdf&checksum=08d57bd6a0665ea046ed4ba92d6fa1c78c48d911&checksum=0c2b958e6be62ffb4210fec451896bebb390bef9&checksum=0d3794f4d3644f111f0213e85434df010f2838e2&checksum=0d7a307f8a164c3c376f833d3d9d3248a6118f7b&checksum=0edfdc98db79b688bba84377418267666b85f3f0&checksum=10b7a96e18c75b19d0c9a23a16c354674549a0be&checksum=16d778b698b885899caadf60cc2584cec8cf1126&checksum=18aaa15cdd480091c8b3cee5999637118cd21bdf&checksum=1c6781b2a866f83c4ad29d4e03e71a5ff6657e15&checksum=1e8ebb621a81b9c1f0c987d49107364014ba94f1&checksum=22bb4f63f64ece08f5f7c6083a688ae75216d76d&checksum=23d9625cb224dad70031fc38ca667b8cde85a0f7&checksum=27b765929f1016bc6077305268d5009e6e38b7ea&checksum=2ac6e5f005a76125aeb0290000f3ffea09c9239f&checksum=2de4b6999ffa40396bf95646446b400c9c4d77e2&checksum=3260de2bd9e1922aeb3925b7771967caf2ececbc&checksum=3976cf2e4ce9db751c2835f5bf5a7ebb9cc88467&checksum=3bcf054f98c3f318c2949b2fc27c04370bdde86b&checksum=3db463ba29619a80b075614e6b3143e7a6a800f2&checksum=46771d1877396b457b5df29dd8808d10520b8bb3&checksum=4997f0bc9d32384ec99ba3ce16eb7ecb949a443b&checksum=4ab21b4ca9f4cc9cf0093af03c4684a5ca0cee15&checksum=4ba27b789214a52fcadb3af7c55dbad4336878cc&checksum=4f9127710e394c8a32cd4c97d27885d9685655a8&checksum=53980d9a31e28948200c122644df049e6aa8c268&checksum=56ab3e0e25ebf1af42b34e87691a6620c708fac9&checksum=5c700389181fda7ecad184a92e61adf68b4b9012&checksum=63c43d56e71c53eb87eaeca43aa633c773c80c3c&checksum=6458fe199afdd4dc10b40d6bb3a261dec17dd910&checksum=646328e3e5e9868efd402a13f4480dabcdb6f370&checksum=69a598df86bac060586d32798954c4a99fc288c7&checksum=6b79399c95c619d570013d1dbdb699ea9f34edee&checksum=6c37511c3fcb7afe69f03c91ac575405b71f892c&checksum=6d7971b820fe4ad77b99f19fbefb6fa1464d0548&checksum=713aa11efdaaf2b7e6b1a11ec4bbe40362572666&checksum=733156a31ef0ed2ef3e52955035ab215bd6bff24&checksum=764f4f53899cf1489907de35ab062e9e1304caa9&checksum=783a7ba22fad1142780ef06152ad9c1f65c6ca0c&checksum=7d274f8425feaaed196bb4ea2a1cdfc3d8c8632c&checksum=7d33dac56d367015fd802cfa7ea3f3e0e9a51bde&checksum=7fc985e5a623fddb78c950219de53ea2d5658681&checksum=8021f8f76f397a925cf03aa897d39525cc4afa4f&checksum=8982f671f3a1099633c9bd09e83e1fb7dfd09541&checksum=8dd6bc5be8d3eb826b796275c3bfaa56a761babb&checksum=97a365771f67271078e9fc66e8aab1446059fcfc&checksum=9b5ee5cfdec81acb160666a0a25230f6927e2285&checksum=9bc84f2ace7f0e99f931a18ca0f138faf9c3ece8&checksum=9dcc6891fecbed786aaaff06b63d9c3fffa5b37c&checksum=9de340c3d19326a6e63aa086f02da00e0c83e7d5&checksum=a5f127de322f41fe491961a3bc017a55596eddca&checksum=a78944d1bf36c0c4f8893243c35cc70620aae8d1&checksum=bca859499682f38194b8e9ecd5a91b7dc[815](https://github.com/shorebirdtech/_web/actions/runs/10887555963/job/30210810836#step:6:816)d29d&checksum=bfb17b639b31a31829357b30fbefe505626cce67&checksum=c1c100116c17b99f376a4a7737bd692de93d622a&checksum=c1f25808ce381b20b67b09d508bfee96eb16740a&checksum=c28f9d454749eeb6448c19f3474999a2f9c98d38&checksum=c464ac0af06d5ca62eb916a3eeffb8eb4006d4bf&checksum=c853632e4c6adc6732a9c49e68c9fbf889f1b3a4&checksum=c8d0d7e94fa6f1fcc5dd45e0467cd20f4b8e4dbe&checksum=c92b52b755031b23a2de42d693671f11ce65fba8&checksum=caa1a7a0fbae93e6d0db1e1ebe7504e1e9b70a0b&checksum=cb5532caa96739e5a5eb1bccc4747502b1c7f1ab&checksum=ce6703fde7cb624aa4a6f99278e37454dbb80950&checksum=d27da3f5cfef941ab9bd67e807f4c1b0f56fff16&checksum=d48fdaab87c38d9d70057a7a043dbcb6d7a5b613&checksum=dc6092c95bd5326cbc5fef4b62af61e576b07b4f&checksum=dcddedacb13ebd97e045e4b6046763920aa5d1c3&checksum=de983cc3b5f13882ba27adf0d60a589cdfc40918&checksum=e352f15755ac38218f540b3ef0cbcc3b9fa22eae&checksum=e5c0ac2eba675ef4ee5a2074810e3091324b6a65&checksum=e95d4317c7ec119ec52a39c2d712c11a324565ed&checksum=eb6ba2119eea464858d277560ee31542091fbc6e&checksum=f2be335[818](https://github.com/shorebirdtech/_web/actions/runs/10887555963/job/30210810836#step:6:819)ccd1cce28557ce373ed79e5b2cdc7a&checksum=f98a81b82f7f02e07a7daaf6d42b671537a99285&checksum=fb0c57f4a87e5ed4eaaa59d464b942e0fb0f4205&checksum=fbfc38aa77a4a495a91244a70191b06143d01d8a&checksum=ff80a3207d8ef5226c044a838302ee9cd0d2d13b HTTP/1.1
12.56   DEBUG   2024-09-16 16:14:25.215688903 +00:00 > Host: sentry.io
12.56   DEBUG   2024-09-16 16:14:25.216198318 +00:00 > Accept: */*
12.56   DEBUG   2024-09-16 16:14:25.216708784 +00:00 > Connection: TE
12.56   DEBUG   2024-09-16 16:14:25.217233117 +00:00 > TE: gzip
12.56   DEBUG   2024-09-16 16:14:25.217750467 +00:00 > sentry-trace:3515e7aba95348118e8a9c48b3484978-a5e2b2bbddd25dde-1
12.56   DEBUG   2024-09-16 16:14:25.21[824](https://github.com/shorebirdtech/_web/actions/runs/10887555963/job/30210810836#step:6:825)6797 +00:00 > baggage:undefined
12.56   DEBUG   2024-09-16 16:14:25.218258840 +00:00 > User-Agent: sentry-cli/2.36.1 vite-plugin/2.22.4
12.56   DEBUG   2024-09-16 16:14:25.218296641 +00:00 > Authorization: ***
------
Dockerfile:24
--------------------
  23 |     
  24 | >>> RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN \
  25 | >>>     SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) npm run build
  26 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) npm run build" did not complete successfully: exit code: 1
@lforst
Copy link
Member

lforst commented Sep 17, 2024

Hi, the release.setCommits.auto option only works if you are inside a git repository. @szokeasaurusrex can we improve the error message?

@szokeasaurusrex
Copy link
Member

@lforst I'm pretty sure we're just printing the error generated by the library here. We can likely format it better

@felangel
Copy link
Author

felangel commented Sep 17, 2024

Hi, the release.setCommits.auto option only works if you are inside a git repository. @szokeasaurusrex can we improve the error message?

This used to work in the context of a docker build and suddenly stopped working after we renamed the repository. See https://github.com/kentcdodds/kentcdodds.com/blob/34014471facce523e1401299431ac4a5d0bd1943/Dockerfile#L57 for an open source example of a very similar setup.

We also tried setting auto to false and manually specifying the commit but it also fails with the same error.

@lforst
Copy link
Member

lforst commented Sep 18, 2024

@felangel I don't entirely see how the kentcdodds repo is similar. They're not collecting commit data for Sentry as far as I can see. My guess is that you used to copy your .git folder into the docker vm, and now you're not doing that anymore.

@felangel
Copy link
Author

@felangel I don't entirely see how the kentcdodds repo is similar. They're not collecting commit data for Sentry as far as I can see. My guess is that you used to copy your .git folder into the docker vm, and now you're not doing that anymore.

They’re also using the vite plugin and specifying setCommits to auto: https://github.com/kentcdodds/kentcdodds.com/blob/34014471facce523e1401299431ac4a5d0bd1943/vite.config.ts#L49

Our Dockerfile hasn’t changed unfortunately but I’ll take a closer look at the container in a few minutes. I can also try to make a minimal reproduction sample later today, thanks!

@felangel
Copy link
Author

@lforst the likely culprit seems to be the fact that we moved to a monorepo with multiple apps which means the directory we build from no longer contains a .git folder. Do you have any recommendations around how to set commits from a monorepo using Docker? Thanks!

@lforst
Copy link
Member

lforst commented Sep 19, 2024

@felangel The vite plugin needs to run inside a git folder to be able to associate commits. It is an abstraction around Sentry CLI.

You can work around this restriction by using Sentry CLI and associating the commits after the fact: https://docs.sentry.io/product/releases/associate-commits/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants