feat: simplify build registry image references#3243
Conversation
| if (!repositoryName) { | ||
| toast.error(m.build_push_repository_required()); | ||
| isBuilding = false; | ||
| return; | ||
| } | ||
| if (!tag) { | ||
| toast.error(m.build_push_tag_required()); | ||
| isBuilding = false; | ||
| return; | ||
| } | ||
| const host = normalizeRegistryHost(reg.url); | ||
| tags = [`${host}/${repositoryName}:${tag}`]; |
There was a problem hiding this comment.
Stale Repository Value Submits
When the selected registry's configured repositories change while the form is open, repositoryName can keep an old string because the select binding does not enforce option membership. This submit path only checks that the string is non-empty, so it can push ${host}/${repositoryName}:${tag} for a repository that is no longer configured for the selected registry.
Artifacts
Repro: focused harness source executing stale repository submit path
- Contains supporting evidence from the run (text/javascript; charset=utf-8).
Repro: command output showing stale repository tag POSTed
- Keeps the command output available without making the summary code-heavy.
Repro: intercepted build POST JSON with stale repository tag
- Contains supporting evidence from the run (application/json; charset=utf-8).
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/routes/(app)/images/builds/+page.svelte
Line: 862-873
Comment:
**Stale Repository Value Submits**
When the selected registry's configured repositories change while the form is open, `repositoryName` can keep an old string because the select binding does not enforce option membership. This submit path only checks that the string is non-empty, so it can push `${host}/${repositoryName}:${tag}` for a repository that is no longer configured for the selected registry.
How can I resolve this? If you propose a fix, please make it concise.|
The e2e test will have to be fixed, ill try to look later but i need to pull and test this as well i havent had time yet. |
Checklist
mainbranchm.*())What This PR Implements
Improves the image build form when pushing to a registry. Users select a configured registry and repository name, then enter the version tag. Repository names are configured with each registry, while the existing Build API and non-push tag flow remain unchanged.
Fixes:
N/A — focused UX enhancement.
Changes Made
Testing Done
pnpm -C frontend checkgo test -tags=exclude_frontend,buildables ./...(backend)go test ./...(shared types)AI Tool Used (if applicable)
AI Tool: Codex
Assistance Level: Significant
A human reviewed the change and performed the manual image-push verification.
Additional Context
Maintainers may modify this branch.
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
This PR adds configured repository names to the registry-backed image push flow. The main changes are:
repository_names.Confidence Score: 4/5
The changed build push flow needs a submit-time repository membership check.
Backend persistence, migrations, and sync handling are consistent with the new field, but the build form can keep a stale repository string after registry options change.
frontend/src/routes/(app)/images/builds/+page.svelte
What T-Rex did
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat: simplify build registry image refe..." | Re-trigger Greptile