Skip to content

Railway Deployment #98cab2 fix: copy bun.lock in links.Dockerfile#353

Open
railway-app[bot] wants to merge 1 commit intomainfrom
railway/fix-deploy-98cab2
Open

Railway Deployment #98cab2 fix: copy bun.lock in links.Dockerfile#353
railway-app[bot] wants to merge 1 commit intomainfrom
railway/fix-deploy-98cab2

Conversation

@railway-app
Copy link

@railway-app railway-app bot commented Mar 20, 2026

Problem

The Link Tracking service build fails during bun install --ignore-scripts because the lockfile is never copied into the Docker build context. Without it, bun resolves all dependency versions from scratch and attempts to install @ai-sdk/provider-utils@4.0.21, a version that does not exist in the registry.

Solution

Added COPY bun.lock bun.lock to links.Dockerfile before the bun install step. With the lockfile present, bun uses pinned versions for all dependencies instead of re-resolving them, avoiding the missing version error.

Changes

  • Modified links.Dockerfile

Context

  • Deployment: #98cab2
  • Failed commit: e3f50fa

Generated by Railway

@vercel
Copy link

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard Ready Ready Preview, Comment Mar 20, 2026 7:26pm
databuddy-links Ready Ready Preview, Comment Mar 20, 2026 7:26pm
documentation Ready Ready Preview, Comment Mar 20, 2026 7:26pm

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 20, 2026

Greptile Summary

This PR fixes a broken Docker build for the Link Tracking service by copying bun.lock into the build context before running bun install, ensuring pinned dependency versions are used instead of re-resolving them from scratch.

  • Fix is correct: Adding COPY bun.lock bun.lock before bun install --ignore-scripts on line 12 matches the approach already used in api.Dockerfile and resolves the missing @ai-sdk/provider-utils@4.0.21 version error.
  • basket.Dockerfile and uptime.Dockerfile have the same gap: Both services use identical install patterns without copying bun.lock, making them susceptible to the same class of build failure in the future.
  • .dockerignore does not exclude bun.lock, so the copied file will be available in the build context as expected.

Confidence Score: 4/5

  • Safe to merge — the fix is minimal, correct, and directly addresses the build failure.
  • The change is a single-line, well-understood fix consistent with how other Dockerfiles in the repo handle lockfile copying. Minor concern that basket.Dockerfile and uptime.Dockerfile have the same unresolved gap, but that does not affect the correctness of this PR.
  • No files in this PR require special attention, but basket.Dockerfile and uptime.Dockerfile (not part of this PR) should receive the same fix.

Important Files Changed

Filename Overview
links.Dockerfile Adds COPY bun.lock bun.lock before bun install to ensure pinned dependency versions are used — correctly fixes the build failure described in the PR. The pattern is consistent with api.Dockerfile.

Sequence Diagram

sequenceDiagram
    participant Host as Build Context (Host)
    participant Docker as Docker Build (links.Dockerfile)
    participant Bun as bun install

    Host->>Docker: COPY package.json
    Host->>Docker: COPY bun.lock (NEW)
    Host->>Docker: COPY apps/links/package.json
    Host->>Docker: COPY packages/*/package.json
    Host->>Docker: COPY packages/
    Docker->>Bun: bun install --ignore-scripts
    Note over Bun: Uses pinned versions from bun.lock<br/>(previously: re-resolved versions, failing on @ai-sdk/provider-utils@4.0.21)
    Bun-->>Docker: ✅ Dependencies installed
    Docker->>Docker: bun build --compile → /app/server
    Docker->>Docker: COPY --from=build /app/server (distroless stage)
Loading

Last reviewed commit: "fix: copy bun.lock i..."

WORKDIR /app

COPY package.json package.json
COPY bun.lock bun.lock
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Same fix missing in basket.Dockerfile and uptime.Dockerfile

basket.Dockerfile and uptime.Dockerfile have the exact same structure — they copy package.json files, then run bun install --ignore-scripts — but neither copies bun.lock before the install step. This means both services are vulnerable to the same dependency resolution failure that triggered this PR.

  • basket.Dockerfile (line 11): RUN bun install --ignore-scripts with no bun.lock copied
  • uptime.Dockerfile (line 11): RUN bun install --ignore-scripts with no bun.lock copied

Both should get the same COPY bun.lock bun.lock line added before their respective bun install calls to ensure pinned dependency versions are used.

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.

1 participant