Repository navigation
release-build: inject the latest skills release as the build-time fallback - #8218
Conversation
…lback Split out of #8202 at review. The workflow reads the version the skills release workflow records on its main branch, checks that the release's manifest is served, and passes it to goreleaser, which sets internal/build.agentSkillsFallbackVersion with -ldflags -X. Fails open. Co-authored-by: Isaac <no-reply@databricks.com>
There was a problem hiding this comment.
Automated review at 5a5a381. Each finding was verified against the code.
No blocking issues found. 1 non-blocking comment(s) and 1 question(s) below.
This PR adds a release-build step that reads the current skills release from the skills repo's main branch, and passes it to goreleaser as an -X override for internal/build.agentSkillsFallbackVersion. If either fetch fails, the build continues without it. The fail-open handling and the no-op on the current tree behave as the description says. The remaining problem is rebuilding an existing tag: the step always picks up today's latest skills release, so the same tag can produce binaries with different embedded fallbacks.
Questions
- At this commit the
-Xtargetinternal/build.agentSkillsFallbackVersiondoesn't exist.internal/build/clicompat.goonly has the constAgentSkillsFallbackVersion, so the new network step in the signing job has no effect, and a typo in the name would also fail silently. The behavior on empty input (-X ...=overwrites any initializer with "") also depends on how #8202 declares the variable. Should this land together with #8202 so the name and the empty-value handling can be checked in one place, or is there a reason to keep them separate? (non-blocking)
✅ Integration test reportCommit: a873eaa
Top 3 slowest tests (at least 2 minutes):
|
rugpanov
left a comment
There was a problem hiding this comment.
Automated review. No blocking findings.
Risk: LOW. The change touches only the release-build workflow and the goreleaser ldflags. The new step fails open, and the -X target does not exist on main, so binaries do not change until #8202 lands. After that, the value is used only on the TrackLatest fallback path, and a revert of the step removes it.
Already reported by review-oss-bot: the tag rebuild point (#8218 (comment)) and the merge-order question with #8202. I agree with both and do not repeat them.
CI: 5 checks are pending (task test on windows and macos, Integration Tests). The failed review check (workflow "CLI PR review") is a failure of the dispatch wrapper, not of this PR.
[nit] PR description: .agents/skills/pr-checklist/SKILL.md asks for the headings ## Changes, ## Why, ## Tests, in that order. This body uses ## Why, ## Changes, ## Test plan. Reorder the sections and rename ## Test plan to ## Tests.
The step is safe to merge: it fails open, it validates the version string, and it is a no-op until #8202 lands. The inline comments are not blocking.
Read the latest GitHub release with the workflow token instead of the version file, which can name a release without a tag. Skip the step for rebuilds of older tags. Warn in the run summary when nothing is embedded, and check that the built source declares the variable the goreleaser flag names, since the linker ignores -X for a missing symbol. Co-authored-by: Isaac <no-reply@databricks.com>
Why
Split out of #8202 at review, so each risk can be reviewed on its own. When a CLI tracks the latest skills release but cannot look it up, it falls back to the newest release it knows. The compatibility manifest's pin is one of those releases; this PR adds the release that was the latest when the binary was built, so every weekly CLI release moves the fallback forward without a manual pin bump.
Changes
Before, release binaries knew no skills release beyond the manifest. Now the release-build workflow resolves the current skills release and bakes it into the binary.
release-build.ymlreadsmetaplugin/version.meta.jsonfrom the skills repo's main branch, checks that the release'smanifest.jsonis served (the skills workflow records the version before it pushes the tag), and exports the version..goreleaser.yamlpasses it tointernal/build.agentSkillsFallbackVersionwith-ldflags -X.Safe in any merge order. The variable lands with #8202. Until then, and when the workflow builds an older tag, the linker ignores
-Xfor a variable the source does not declare. Verified by building current main with the flag set.Test plan
go build -ldflags "-X github.com/databricks/cli/internal/build.agentSkillsFallbackVersion=0.2.56" .on main succeeds./task checksLatest skills release: x.y.z, or the fail-open messageThis pull request and its description were written by Isaac.