Skip to content

feat: simplify build registry image references#3243

Open
traeli wants to merge 2 commits into
getarcaneapp:mainfrom
traeli:build-registry-references
Open

feat: simplify build registry image references#3243
traeli wants to merge 2 commits into
getarcaneapp:mainfrom
traeli:build-registry-references

Conversation

@traeli

@traeli traeli commented Jul 11, 2026

Copy link
Copy Markdown

Checklist

  • This PR is not opened from my fork’s main branch
  • All new user-facing strings are translated via Paraglide (m.*())

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

  • Persist repository names for configured container registries, including manager-to-agent synchronization.
  • Add registry migration support for SQLite and PostgreSQL.
  • Build full push references from the selected registry, repository name, and tag.
  • Validate configured repository names as Docker reference paths.

Testing Done

  • Manual: created registry repository names and successfully pushed an image.
  • pnpm -C frontend check
  • go 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:

  • Persist and sync repository names for container registries.
  • Add SQLite and PostgreSQL migrations for repository_names.
  • Replace free-form push tags with registry, repository, and tag fields in the build UI.
  • Validate repository names as Docker reference paths.

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

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex reproduced the stale repository submission scenario using a focused harness against the image build path.
  • The harness captured a POST to /api/environments/env-repro/images/build containing the tag registry.example.com/stale-removed-repo:v1.
  • The execution completed with no repository-required or invalid-repository toast errors, indicating the stale value was accepted for submission.
  • T-Rex noted that its local artifact references were not uploaded as part of this verification.

View all artifacts

T-Rex Ran code and verified through T-Rex

Fix All in Codex Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
frontend/src/routes/(app)/images/builds/+page.svelte:862-873
**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.

Reviews (1): Last reviewed commit: "feat: simplify build registry image refe..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@traeli traeli requested a review from a team July 11, 2026 11:31
Comment on lines +862 to +873
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}`];

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.

P1 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).

View artifacts

T-Rex 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.

Fix in Codex Fix in Claude Code

@kmendell

Copy link
Copy Markdown
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants