Skip to content

fix(frontend): drive VITE_APP_SENTRY_ENV from DEPLOYMENT_TYPE#4678

Merged
jog1t merged 1 commit intomainfrom
claude/fix-production-deployment-nawoM
Apr 18, 2026
Merged

fix(frontend): drive VITE_APP_SENTRY_ENV from DEPLOYMENT_TYPE#4678
jog1t merged 1 commit intomainfrom
claude/fix-production-deployment-nawoM

Conversation

@jog1t
Copy link
Copy Markdown
Contributor

@jog1t jog1t commented Apr 18, 2026

RAILWAY_ENVIRONMENT_NAME was not declared as ARG in the Dockerfiles, so
it was never available at build time and VITE_APP_SENTRY_ENV always
baked in 'staging' regardless of the target environment.

RAILWAY_ENVIRONMENT_NAME was not declared as ARG in the Dockerfiles, so
it was never available at build time and VITE_APP_SENTRY_ENV always
baked in 'staging' regardless of the target environment.
@railway-app
Copy link
Copy Markdown

railway-app bot commented Apr 18, 2026

🚅 Deployed to the rivet-pr-4678 environment in rivet-frontend

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web Apr 18, 2026 at 1:42 am
frontend-cloud 😴 Sleeping (View Logs) Web Apr 18, 2026 at 1:40 am
frontend-inspector 😴 Sleeping (View Logs) Web Apr 18, 2026 at 1:39 am
mcp-hub ✅ Success (View Logs) Web Apr 18, 2026 at 1:30 am
ladle ❌ Build Failed (View Logs) Web Apr 18, 2026 at 1:29 am
kitchen-sink ❌ Build Failed (View Logs) Web Apr 18, 2026 at 1:29 am

@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4678 April 18, 2026 01:28 Destroyed
@claude
Copy link
Copy Markdown

claude bot commented Apr 18, 2026

Code Review

Overview

This PR fixes a build-time bug where VITE_APP_SENTRY_ENV was always baked in as staging in both cloud.Dockerfile and inspector.Dockerfile. The root cause was that RAILWAY_ENVIRONMENT_NAME was never declared as an ARG, so the :-staging fallback always triggered. The fix switches the source to DEPLOYMENT_TYPE, which is properly declared as ARG DEPLOYMENT_TYPE="staging" in both Dockerfiles.

Analysis

Correctness: The fix is correct. Both Dockerfiles declare ARG DEPLOYMENT_TYPE="staging", so VITE_APP_SENTRY_ENV=${DEPLOYMENT_TYPE} will now receive the actual build-arg value, falling back to "staging" only when it is genuinely not supplied.

Consistency: The ENV DEPLOYMENT_TYPE=${DEPLOYMENT_TYPE} line immediately below already consumed the same ARG, so this change makes VITE_APP_SENTRY_ENV and DEPLOYMENT_TYPE always agree.

No regressions: Removing the undeclared, platform-specific RAILWAY_ENVIRONMENT_NAME reference cleans up a silently broken variable. Default behavior remains staging.

Suggestions

  • If any Railway build pipeline was passing --build-arg RAILWAY_ENVIRONMENT_NAME=... expecting it to have an effect, those args are now dead and should be cleaned up in CI configs to avoid confusion.
  • The fix is correct as written; no further changes are needed.

Verdict

Small, correct, low-risk bugfix. Approve.

@github-actions
Copy link
Copy Markdown
Contributor

Preview packages published to npm

Install with:

npm install rivetkit@pr-4678

All packages published as 0.0.0-pr.4678.a4d58ee with tag pr-4678.

Engine binary is shipped via @rivetkit/engine-cli on linux-x64-musl, linux-arm64-musl, darwin-x64, and darwin-arm64. Windows users should use the release installer or set RIVET_ENGINE_BINARY.

Docker images:

docker pull rivetdev/engine:slim-a4d58ee
docker pull rivetdev/engine:full-a4d58ee
Individual packages
npm install rivetkit@pr-4678
npm install @rivetkit/react@pr-4678
npm install @rivetkit/rivetkit-native@pr-4678
npm install @rivetkit/sqlite-wasm@pr-4678
npm install @rivetkit/workflow-engine@pr-4678

@jog1t jog1t merged commit 2fe8937 into main Apr 18, 2026
25 of 32 checks passed
@jog1t jog1t deleted the claude/fix-production-deployment-nawoM branch April 18, 2026 12:11
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