ci: automate sandbox image push and SANDBOX_IMAGE_URI pin - #317
ci: automate sandbox image push and SANDBOX_IMAGE_URI pin#317bhaveshpatel640 wants to merge 9 commits into
Conversation
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a810950. Configure here.
| ) | ||
| PY | ||
|
|
||
| - run: bash scripts/changeset-sandbox-image.sh |
There was a problem hiding this comment.
No-op pin bumps package
Medium Severity
The pin job always rewrites sandboxImage.ts and runs changeset-sandbox-image.sh, which always creates a new changeset. On workflow_dispatch when SANDBOX_IMAGE_URI already matches, create-pull-request still opens a changeset-only PR, so merging yields a patch bump of @truefoundry/trueforge-core with no image pin change.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a810950. Configure here.
| group: push-sandbox-image | ||
| cancel-in-progress: false | ||
| group: push-sandbox-image-${{ github.event_name }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
There was a problem hiding this comment.
Push and dispatch race
Medium Severity
Concurrency keys on github.event_name, so a push to main and a workflow_dispatch on main do not share a group. Both can build, push, and update the pin PR at once; whichever pin job finishes last wins, and that can leave SANDBOX_IMAGE_URI pointing at an older SHA than the newest successful push.
Reviewed by Cursor Bugbot for commit a810950. Configure here.


ci: automate sandbox image push and SANDBOX_IMAGE_URI pin
Note
Medium Risk
The pin job writes source and opens PRs with elevated
contents/pull-requestspermissions; mistakes could publish wrong image URIs into@truefoundry/trueforge-core, though URI validation limits injection risk.Overview
Automates the sandbox image release loop so changes under
packages/trueforge-core/scripts/sandbox/**no longer rely on manual dispatch-only builds.On pull requests, a
verifyjob only runsdocker build(no registry push). On main and dispatch, the existing Artifactory push still runs, with concurrency scoped per event/ref and PR runs allowed to cancel in-progress.After a successful push on main, a new
pinjob rewritespackages/trueforge-core/src/core/sandbox/sandboxImage.tswithSANDBOX_IMAGE_URIfortrueforge-sandbox:<sha>, runsscripts/changeset-sandbox-image.shto add a@truefoundry/trueforge-corepatch changeset, and opens a bot PR (release-sandbox-image) sorelease.ymlcan publish the pin. The URI is validated with a strict regex before writing.RELEASING.md documents the sandbox image in the release table and versioning row (tag = full commit SHA).
Reviewed by Cursor Bugbot for commit a810950. Bugbot is set up for automated code reviews on this repo. Configure here.