Skip to content

feat(gallery): publish signed OCI fallbacks - #12182

Open
localai-org-maint-bot wants to merge 1 commit into
masterfrom
cron/gallery-oci-fallback
Open

localai-org-maint-bot wants to merge 1 commit into
masterfrom
cron/gallery-oci-fallback

Conversation

@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

Description

Publish signed OCI copies of the official model and backend galleries. LocalAI tries these copies after the index server and GitHub fail. The model artifact includes repository-local base configurations, so those files remain available during a GitHub outage.

Follow-up to #12167, requested by @mudler in #12167 (comment).

Notes for Reviewers

The new workflow publishes to quay.io/go-skynet/local-ai-backends using the existing registry credentials. It signs each digest before updating the gallery-models or gallery-backends tag. The separate artifact_verification policy preserves backend image verification behavior. Existing custom gallery lists remain unchanged.

Validation:

  • go test ./core/config ./core/gallery ./scripts/build/gallery -count=1
  • go vet ./core/config ./core/gallery ./scripts/build/gallery
  • Both real indexes package successfully: 72 model-gallery files and one backend index.
  • Workflow YAML parses; git diff --check passes.

Registry publication was not exercised locally: ORAS and cosign are unavailable. Full lint could not run because this environment lacks make and a runnable golangci-lint. No existing CI runs were inspected or restarted.

Signed commits

  • Yes, I signed my commits.
  • Documentation updated (docs/content/) for user-facing changes, or not applicable

Publish both official gallery indexes with their local base configs so
an outage of the HTTP and GitHub sources can fall back to Quay.

Keep artifact signing policies separate from backend image policies,
and expose each moving gallery tag only after its digest is signed.

Assisted-by: Codex:gpt-6
if source != "gallery" && source != "backend" {
return fmt.Errorf("unsupported gallery directory %q", source)
}
body, err := os.ReadFile(filepath.Join(root, source, "index.yaml"))
if source != "gallery" && source != "backend" {
return fmt.Errorf("unsupported gallery directory %q", source)
}
body, err := os.ReadFile(filepath.Join(root, source, "index.yaml"))
if err := yaml.Unmarshal(body, &doc); err != nil {
return err
}
if err := os.MkdirAll(output, 0755); err != nil {
if err := yaml.Unmarshal(body, &doc); err != nil {
return err
}
if err := os.MkdirAll(output, 0755); err != nil {
if !filepath.IsLocal(path) {
return fmt.Errorf("base config escapes repository: %q", path)
}
config, err := os.ReadFile(filepath.Join(root, path))
return err
}
dest := filepath.Join(output, path)
if err := os.MkdirAll(filepath.Dir(dest), 0755); err != nil {
if err := os.MkdirAll(filepath.Dir(dest), 0755); err != nil {
return err
}
if err := os.WriteFile(dest, config, 0644); err != nil {
if err := os.MkdirAll(filepath.Dir(dest), 0755); err != nil {
return err
}
if err := os.WriteFile(dest, config, 0644); err != nil {
if err != nil {
return err
}
return os.WriteFile(filepath.Join(output, "index.yaml"), body, 0644)
if err != nil {
return err
}
return os.WriteFile(filepath.Join(output, "index.yaml"), body, 0644)

This branch has not been deployed

No deployments
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