Skip to content

chore: Fetch latest version from the image registry and not from github#1615

Open
acroca wants to merge 2 commits intodapr:masterfrom
acroca:versions-from-image-registry
Open

chore: Fetch latest version from the image registry and not from github#1615
acroca wants to merge 2 commits intodapr:masterfrom
acroca:versions-from-image-registry

Conversation

@acroca
Copy link
Copy Markdown
Member

@acroca acroca commented Mar 30, 2026

Close: #1575

When providing --image-registry the CLI still makes http requests to github to figure out latest versions.

In this PR I make it fetch the versions from the image tags from the image registry directly.

@acroca
Copy link
Copy Markdown
Member Author

acroca commented Mar 30, 2026

Waiting for #1613 to upgrade Go and golangci-lint

@acroca acroca force-pushed the versions-from-image-registry branch from af55e87 to c4ff54c Compare April 1, 2026 11:49
Signed-off-by: Albert Callarisa <albert@diagrid.io>
@acroca acroca force-pushed the versions-from-image-registry branch from c4ff54c to 6439f14 Compare April 1, 2026 11:50
@acroca acroca marked this pull request as ready for review April 1, 2026 13:27
@acroca acroca requested review from a team as code owners April 1, 2026 13:27
@JoshVanL JoshVanL requested a review from Copilot April 1, 2026 13:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes how the CLI determines the “latest” Dapr runtime/dashboard versions, switching from GitHub/Helm-based lookups to querying container image tags directly from a registry (especially when --image-registry is provided), aiming to avoid GitHub network calls.

Changes:

  • Replace GitHub/Helm version discovery with registry tag listing via go-containerregistry.
  • Update standalone + Kubernetes init flows to use registry-derived latest versions.
  • Update unit/e2e tests and add new dependency (go-containerregistry) plus module tidy updates.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pkg/version/version.go Implements latest-version resolution by listing image tags from a registry; adds default image refs + helpers.
pkg/standalone/standalone.go Uses registry-derived latest versions for standalone init when latest is requested.
pkg/kubernetes/kubernetes.go Uses registry-derived latest versions for Helm installs, respecting ImageRegistryURI.
pkg/version/version_test.go Replaces GitHub/Helm tests with an in-memory OCI registry-based test suite.
tests/e2e/standalone/init_test.go Updates e2e expectations for “no version specified” flows to use the new latest-version lookup.
go.mod / go.sum Adds go-containerregistry and updates a set of (some unrelated) dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Albert Callarisa <albert@diagrid.io>
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.

--image-registry during dapr init not fully offline

2 participants