BuildKit layer cache permanently frozen — identical image digest across all deployments despite source changes
Anonymous
PROOP

a month ago

Hello,

Service ID: 20184990-ec8d-4c98-9d14-4b25851dd608

Project ID: f9158b9c-0d60-4886-8068-501c8c4725e2

Builder: production-builderv3-us-west1-nf4h

Railpack version: 0.23.0

Deployment method: railway up (CLI only, no Git, no GitHub)

The problem

A source change to server.ts is confirmed present in the local file. Railway receives the updated snapshot, runs npm run build, and tsc executes. Yet the deployed server continues to serve the old compiled output.

The evidence in sequence

For many consecutive deployments, the final image digest was identical:

sha256:bd12b175769d7b382023af7bc8553c19f611bcef1b7b0e0937a9f92ca36d3111

After changing the service region from US West to US East, the last deployment produced a genuinely new digest:

sha256:0661ec055af48dbe0d3054cc83ab52865af8d8dce9d3119cd53a931534df0a26

The build log confirmed tsc executed: > lucid-backend@1.0.0 build > tsc. Yet /health still returns the old response, confirming the deployed container does not reflect the compiled source.

The snapshot hash has been consistent across all deploys: sha256:9613258a68750195d0b2498ac682d8ec81d27f628465949357e288cd648c8c88 — confirming Railway receives the correct updated files every time.

Everything tried — all failed

NO_CACHE=1 as a service variable

RAILPACK_NO_CACHE=1 as a service variable

RAILPACK_DISABLE_CACHES=* as a service variable

Version bump in package.json

Echo cache-buster string injected into the build script

Watch Paths set to server.ts in the dashboard

railway.toml added with watchPatterns: ["server.ts", "package.json", "nixpacks.toml"]

Region changed from US West to US East

What we need

Railway is receiving the correct source, building a fresh image, and reporting a new digest — but the deployed container is not running the compiled output of that fresh build. We need Railway to identify what is happening between the fresh build and the container startup that causes the old output to be served.

Thank you!


NOTE: We added a deliberate TypeScript syntax error to server.ts. Railway reported 'no changes detected in watch paths, build will skip' and successfully deployed the unchanged cached image. Railway is not reading server.ts at all.
Solved$10 Bounty

0 Replies

Status changed to Open Railway about 1 month ago


Status changed to Solved Anonymous about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...