Repository navigation
ci(addons): publish every add-on to one repository - #12881
Merged
Merged
Conversation
All add-ons now publish to ADDON_OCI_REPOSITORY as tags of one repository. Each tag starts with the add-on id: <id>-sha-<short sha> for a commit, <id>-<version> for a release, <id>-development and <id>-latest for the channel aliases. The publish step, the alias promotion and the catalog renderer add the prefix, so the per-add-on repository step of the workflow is gone. A new addonpkg target command prints the reference an add-on publishes to without a network request. The workflow policy now refuses a derived repository. The host parser already reads a tag reference and a repository with a nested path, so both the new form and the old per-repository form install. A test covers each. The artifact fields in gallery/addons/index.yaml were changed by hand to the tag form. The digests are unchanged and stay until the add-ons are published again. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decision
All add-ons publish to one OCI repository,
quay.io/go-skynet/local-ai-addons(the value ofADDON_OCI_REPOSITORY). Each add-on is a set of tags in it, prefixed with its id:<id>-sha-<short sha>for a commit,<id>-<version>for a release,<id>-developmentand<id>-latestfor the channel aliases. Example:oci://quay.io/go-skynet/local-ai-addons:fine-tuning-sha-99d1dca2c869.Before this change, Tables published to the variable and every other add-on to
<namespace>/<id>, which did not match the index.What changed
.github/workflows/addons-package.yml: the per-add-on repository step is removed from publish and promote. Both jobs read the variable as it is. The fail-closed check stays and also checks that the value has a namespace and a name. Publish prints the target first. Promote passes--addon. The header comment describes the single repository.pkg/addons/packaging/registry.go,catalog.go,run.go: the immutable tag, the alias tags and the catalog artifact get the<id>-prefix. Newaddonpkg targetcommand prints the reference of one add-on without a network request. The tag validation still checks the unprefixed tag.pkg/addons/packaging/policy.go: the workflow policy now refuses a derived repository and requires the variable.gallery/addons/index.yaml: theartifactfield of the seven entries is in the tag form. No digest changed. There is no way to regenerate the index here (the generator,addonpkg catalog, needs the merged layouts of a real publish), so the field was edited by hand.name.ParseReference, so it acceptsoci://<repo>:<tag>and a repository with a nested path. The old per-repository form is still accepted.docs/content/features/addons.md,gallery/addons/README.md.pkg/addons/packaging/packaging_test.go,core/services/addons/packages/install_test.go.Publish targets (local run of
addonpkg target, tagsha-99d1dca2c869)Tests
go test ./pkg/addons/packaging: 134 of 134 specs pass. They cover the push and retry against a local registry, the promotion of aliases under the prefix, the catalog artifact of all seven add-ons, thetargetoutput for all seven add-ons, and the workflow policy (including mutations that bring back a derived repository).go test ./core/services/addons/packages: 25 of 25 pass. Two new specs install from the shared-repository tag form and from the old per-repository form.go test ./core/services/addons/catalog: 71 of 71 pass.addonpkg policyaccepts the workflow.Not run
scripts/addons/package_test.sh(needs the UI build dependencies) andtests/addons/packaging(needs the generated gRPC stubs).Follow-up
Publish every add-on again from master, then update the digests (and the versions) in
gallery/addons/index.yamlfrom the workflow output.