Skip to content

ci: make the latest stable Dapr runtime version lookup reliable - #1732

Open
marcduiker wants to merge 1 commit into
dapr:masterfrom
marcduiker:fix-latest-stable-version-lookup
Open

marcduiker wants to merge 1 commit into
dapr:masterfrom
marcduiker:fix-latest-stable-version-lookup

Conversation

@marcduiker

Copy link
Copy Markdown
Contributor

Description

The KinD and self-hosted E2E workflows find the latest stable Dapr runtime version by listing https://api.github.com/repos/dapr/dapr/releases?per_page=100, a change from #1720. That response includes every release body and asset list (~17 MB), and it intermittently comes back without any tag_name lines. Because of curl -s and export X=$(...), the step still succeeds and writes an empty DAPR_RUNTIME_LATEST_STABLE_VERSION.

The non-HA tests that install without --runtime-version then fail, for example in #1730:

Error: Should be empty, but was map[operator: placement: sentry: sidecar:]
--- FAIL: TestKubernetesInstallwithoutRuntimeVersionFlag/install_
common.go:395: failed to parse runtime version Invalid Semantic Version
panic: runtime error: invalid memory address or nil pointer dereference

Every KinD run since #1720 has had one or two legs with Found (empty), on master, release-1.19 and PR branches. A failure only shows up when the empty value lands on a non-HA leg.

Changes

  • Look up the version with git ls-remote --tags --refs https://github.com/dapr/dapr 'v*', which returns only tag names and doesn't count against the API rate limit. It still takes the highest tag without a pre-release suffix, so the GA-day behavior from Run e2e and upgrade tests against Dapr runtime 1.19.0 #1720 is kept.
  • Fail the step when no version is found instead of exporting an empty value.
  • Use t.Fatal instead of t.Error when the runtime version can't be parsed in StatusTestOnInstallUpgrade, so a bad version fails the test cleanly instead of panicking on a nil *semver.Version and aborting the rest of the package.

Checklist

  • Code compiles correctly (go vet -tags e2e,template ./tests/e2e/common/)
  • New lookup verified locally (returns 1.19.0)

🤖 Generated with Claude Code

The lookup listed /repos/dapr/dapr/releases?per_page=100, a ~17 MB
response that intermittently came back without tag names. curl -s and
the export masked the failure, so DAPR_RUNTIME_LATEST_STABLE_VERSION was
set to an empty string and the latest-version e2e tests failed with
"Invalid Semantic Version" and a nil pointer panic.

List the tags with git ls-remote instead, fail the step when no version
is found, and stop the status test with t.Fatal when the runtime version
cannot be parsed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Marc Duiker <4191277+marcduiker@users.noreply.github.com>
@marcduiker
marcduiker requested review from a team as code owners October 22, 2026 16:55
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.

1 participant