Skip to content

fix(docker): include root-level sentry configs in build context#170

Merged
NIXKnight merged 1 commit into
mainfrom
fix/dockerignore-sentry-configs
Jul 2, 2026
Merged

fix(docker): include root-level sentry configs in build context#170
NIXKnight merged 1 commit into
mainfrom
fix/dockerignore-sentry-configs

Conversation

@NIXKnight

Copy link
Copy Markdown
Member

Summary

Fixes the failed container image build for release v1.3.2 by re-including the root-level Sentry config files in the Docker build context.

Error: Turbopack build failed with 2 errors:
./src/instrumentation.ts:5:11  Module not found: Can't resolve '../sentry.server.config'
./src/instrumentation.ts:9:11  Module not found: Can't resolve '../sentry.edge.config'

Root cause

  • .dockerignore lines 19–20 contain blanket *.ts / *.tsx rules. .dockerignore patterns are root-anchored (unlike .gitignore), so they exclude top-level files only; src/ is unaffected.
  • The v1.3.2 Sentry integration added the first root-level .ts files required by the production build: sentry.server.config.ts and sentry.edge.config.ts, imported by src/instrumentation.ts.
  • Both files were excluded from the build context, so module resolution failed during next build. Releases ≤ v1.3.1 were unaffected because no root-level .ts file was needed at build time.

Changes

  • .dockerignore: append negation patterns to re-include the two files:
!sentry.server.config.ts
!sentry.edge.config.ts

Verification

  • Probe docker build copying the two files from the build context: fails on current main, succeeds with this change.

Notes

  • Re-running the failed v1.3.2 workflow rebuilds the same commit (32cbd41) and fails again; the fix applies from the next release cut after merge.

- blanket *.ts/*.tsx rules in .dockerignore are root-anchored and excluded sentry.server.config.ts and sentry.edge.config.ts, breaking npm run build inside the v1.3.2 image
- append negation patterns so the docker build context retains both files
@NIXKnight NIXKnight merged commit 873d6ca into main Jul 2, 2026
@NIXKnight NIXKnight deleted the fix/dockerignore-sentry-configs branch July 2, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants