Skip to content

fix(supervisor): copy retry-prisma-generate.mjs into the image build#4157

Merged
d-cs merged 2 commits into
mainfrom
fix/supervisor-generate-retry-script
Jul 5, 2026
Merged

fix(supervisor): copy retry-prisma-generate.mjs into the image build#4157
d-cs merged 2 commits into
mainfrom
fix/supervisor-generate-retry-script

Conversation

@d-cs

@d-cs d-cs commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

What

Adds the missing COPY scripts/retry-prisma-generate.mjs to the supervisor Containerfile builder stage, before RUN pnpm run generate.

Why

The generate scripts in internal-packages/database and internal-packages/run-ops-database shell out to scripts/retry-prisma-generate.mjs. The supervisor build never copied that file into the image, so pnpm run generate failed:

@internal/run-ops-database:generate: Error: Cannot find module '/app/scripts/retry-prisma-generate.mjs'

This is the same failure class as #4156 (webapp Dockerfile). The supervisor Containerfile is the only other build file that runs pnpm run generate — the coordinator / docker-provider / kubernetes-provider Containerfiles don't, so this completes the fix.

Verification

Local docker build of the supervisor Containerfile builder target — result appended below once the build completes.

🤖 Generated with Claude Code

The database packages' `generate` scripts shell out to
`scripts/retry-prisma-generate.mjs`, but the supervisor Containerfile
never copied it into the builder stage, so `pnpm run generate` fails
with `Cannot find module '/app/scripts/retry-prisma-generate.mjs'`.

Same fix as #4156 (webapp Dockerfile); the supervisor Containerfile is
the other build that runs `pnpm run generate`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6420863

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@d-cs d-cs self-assigned this Jul 5, 2026
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This change adds a single COPY instruction in the supervisor Containerfile's builder stage to include the scripts/retry-prisma-generate.mjs file in the built image, which was previously missing.

Changes

Compact Summary

Area Change
apps/supervisor/Containerfile Added COPY --chown=node:node instruction for scripts/retry-prisma-generate.mjs in the builder stage

Sequence Diagram(s)

Not applicable; this change is a single Dockerfile COPY instruction addition with no observable runtime flow.

Estimated code review effort: 1 (trivial)

Related issues: None specified.

Related PRs: None specified.

Suggested labels: none

Suggested reviewers: none

Poem

A rabbit hopped through builder's stage,
Found one script missing from the page,
With COPY's paw it fixed the mess,
retry-prisma now says yes,
A tiny hop, a build made whole,
Docker joy fills rabbit's soul.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description does not follow the required template and omits the issue reference, checklist, testing steps, changelog, and screenshots sections. Rewrite the description using the repo template, including Closes #, checklist items, testing details, a changelog summary, and screenshots or placeholders.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately describes the main change to the supervisor Containerfile.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/supervisor-generate-retry-script

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@d-cs d-cs marked this pull request as ready for review July 5, 2026 09:42
@d-cs d-cs enabled auto-merge (squash) July 5, 2026 09:43

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@d-cs d-cs merged commit 8257499 into main Jul 5, 2026
23 checks passed
@d-cs d-cs deleted the fix/supervisor-generate-retry-script branch July 5, 2026 09:46
@d-cs

d-cs commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator Author

Verified locally: docker build --target builder -f apps/supervisor/Containerfile . completes clean (exit 0), image exported.

  • pnpm run generate now runs successfully — the step that failed in the publish run with Cannot find module '/app/scripts/retry-prisma-generate.mjs'. Previously it died at generate in ~1.3s; the build now proceeds all the way through install → build → pnpm deploy → image export.
  • The ssh2 node-gyp warnings in the log are an optional crypto binding that's expected to skip on this platform ("Failed to build optional crypto binding" → build continues) — pre-existing and unrelated to this change.

Ready for review.

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