Skip to content

feat(properties): name docker tags in the per-repository property search - #470

Merged
M0Rf30 merged 1 commit into
openartifact:mainfrom
orcamedia:feat/property-search-docker-names
Nov 11, 2026
Merged

M0Rf30 merged 1 commit into
openartifact:mainfrom
orcamedia:feat/property-search-docker-names

Conversation

@orcamedia

Copy link
Copy Markdown
Contributor

GET /api/v1/repositories/{repo}/artifacts/search (and oa props search) now names docker tags, as it already names files. Companion to #469, which makes the global prop: search match tags. The two PRs are independent; both make the same one-line edit to properties.md, so either merge order is clean.

Change

  • Query: SearchByProperty (queries/properties.sql) now also resolves an id against the live docker_tags of the same repository. The UUID cast is computed once in the subquery, and both lookups use it on their primary keys. The case-insensitive ~* match this query already used is unchanged.
  • Naming: a tag is named the way the package listing names it (catalog_branches.go dockerBranch): the repository name plus /image when the image is not empty, the tag as version, and docker as format.
  • Why the tag columns are separate: the query returns tag_repository, tag_image and tag_name next to the package columns, and PropertyStore.SearchByProperty combines them in Go. A COALESCE in SQL would make sqlc type the fields as non-null strings.
  • Docs:
    • The OpenAPI PropertySearchArtifact descriptions, properties.md (search results, CLI table) and an Unreleased upgrade note are updated.
    • docs/reference and the web client are regenerated.

Tests

TestSearchByPropertyNamesDockerTags stores properties in a docker repository under four ids:

  • a root-image tag, which resolves to name props-d, version latest, format docker;
  • a nested-image tag, which resolves to name props-d/team/app, version 1.0;
  • a deleted tag, which stays unresolved;
  • a file id of another repository, which stays unresolved.

Checks

  • golangci-lint run passes, with and without -tags integration.
  • go test -short passes for internal/{database,api,oacli}.
  • -tags integration -run TestSearchByProperty ./internal/database passes.
  • make generate shows no drift, and make docs-check and make deadcode pass.

🤖 Generated with Claude Code

GET /api/v1/repositories/{repo}/artifacts/search resolved an id only
against package_files, so the id the web UI stores a docker image's
properties under (the tag's listing id, docker_tags.id) came back with
artifact_id alone. Resolve it against the live tags of the same
repository too, and name it as the package listing does: the repository
name plus the image path, the tag as version, format docker. oa props
search shows the name.

The query returns the tag columns next to the package columns (a
COALESCE would make sqlc type them non-null); the UUID cast is computed
once and serves both primary-key lookups.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@M0Rf30
M0Rf30 force-pushed the feat/property-search-docker-names branch from f9c73e2 to 81bc045 Compare November 11, 2026 17:27
@M0Rf30
M0Rf30 merged commit 2a4593c into openartifact:main Nov 11, 2026
23 checks passed
@orcamedia
orcamedia deleted the feat/property-search-docker-names branch November 11, 2026 18:00
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