sticky cache enabled

hey! i have just deployed my latest commit but railway throws the pnpm lock file outdated error. i have tried re-installing my node_modules and it works perfectly fine and the stdout shows that the lock file is up to date. i have ci/cd setup on my development branch which deploys the code to the development branch. there wasn't any error while deploying to that branch. in the build logs of the main (aka the production) branch, it shows "sticky cache is enabled". i have never seen such a log, is there any way to fix it?
16 Replies
Percy
Percy2y ago
Project ID: d5eccacc-fc95-4f68-90bc-f8f04565d014
Percy
Percy2y ago
No search results found.
⚠️ experimental feature
Mukesh
MukeshOP2y ago
project id: d5eccacc-fc95-4f68-90bc-f8f04565d014
Finn
Finn2y ago
What happens when you run npm ci locally
Mukesh
MukeshOP2y ago
there isn't any error the error only occurs on the production branch but on the development branch
Finn
Finn2y ago
I'm confused. can you show me the output of npm ci
Mukesh
MukeshOP2y ago
gimme a second
Mukesh
MukeshOP2y ago
i have a github action which deploys the pr to the development branch on railway. if i check the status of that deployment rn, it shows no errors. when i've merged the pr, the github action will deploy it to main branch. the deployment to main branch threw the lock file outdated error.
Mukesh
MukeshOP2y ago
it is pretty weird issue. i'e re-deploying it multiple times no luck
Finn
Finn2y ago
Idk can't help much without seeing logs
Mukesh
MukeshOP2y ago
https://gist.github.com/0xMukesh/5e1ca27328bf07fe08dafbe0e849e20c here are the logs here is the docker file btw
FROM node:16 as builder
WORKDIR /app
RUN yarn global add [email protected]
COPY . ./
RUN turbo prune --scope=server --docker

FROM node:16 as installer
WORKDIR /app
RUN yarn global add pnpm

COPY --from=builder /app/out/full/.gitignore ./.gitignore
COPY --from=builder /app/out/full/turbo.json ./turbo.json
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=builder /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
RUN pnpm fetch

COPY --from=builder /app/out/full/ .
RUN pnpm install --no-frozen-lockfile --ignore-scripts
RUN pnpm build:server

FROM node:16 AS runner
WORKDIR /app

RUN addgroup --system --gid 1001 app
RUN adduser --system --uid 1001 app
USER app
COPY --from=installer /app .

CMD ["node", "apps/server/dist/index.js"]
FROM node:16 as builder
WORKDIR /app
RUN yarn global add [email protected]
COPY . ./
RUN turbo prune --scope=server --docker

FROM node:16 as installer
WORKDIR /app
RUN yarn global add pnpm

COPY --from=builder /app/out/full/.gitignore ./.gitignore
COPY --from=builder /app/out/full/turbo.json ./turbo.json
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=builder /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
RUN pnpm fetch

COPY --from=builder /app/out/full/ .
RUN pnpm install --no-frozen-lockfile --ignore-scripts
RUN pnpm build:server

FROM node:16 AS runner
WORKDIR /app

RUN addgroup --system --gid 1001 app
RUN adduser --system --uid 1001 app
USER app
COPY --from=installer /app .

CMD ["node", "apps/server/dist/index.js"]
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Mukesh
MukeshOP2y ago
ah well that is obv. but i don't understand why it "only" occurs on the production branch and not on development branch? the code is the same on both the branches
Finn
Finn2y ago
why are you installing pnpm with yarn lol yeah idk why its erroring im asuming the lock file is outdated but you say its not
Mukesh
MukeshOP2y ago
lmao it is not by default in github actions
Finn
Finn2y ago
you can use corepack enable pnpm instead
Want results from more Discord servers?
Add your server