Skip to content

release-build: inject the latest skills release as the build-time fallback - #8218

Merged
simonfaltum merged 2 commits into
mainfrom
simonfaltum/skills-fallback-build-injection
Nov 30, 2026
Merged

simonfaltum merged 2 commits into
mainfrom
simonfaltum/skills-fallback-build-injection

Conversation

@simonfaltum

Copy link
Copy Markdown
Member

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.

  • A new step in release-build.yml reads metaplugin/version.meta.json from the skills repo's main branch, checks that the release's manifest.json is served (the skills workflow records the version before it pushes the tag), and exports the version.
  • .goreleaser.yaml passes it to internal/build.agentSkillsFallbackVersion with -ldflags -X.
  • Fails open: when either fetch fails, nothing is injected and the binary falls back to the manifest pin.

Safe in any merge order. The variable lands with #8202. Until then, and when the workflow builds an older tag, the linker ignores -X for 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 checks
  • Next release-build run logs Latest skills release: x.y.z, or the fail-open message

This pull request and its description were written by Isaac.

…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>

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

  1. At this commit the -X target internal/build.agentSkillsFallbackVersion doesn't exist. internal/build/clicompat.go only has the const AgentSkillsFallbackVersion, 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)

Comment thread .github/workflows/release-build.yml Resolved
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: a873eaa

Run: 46469415007

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 88 6 1:51
💚​ aws-windows-latest-4core-16gb 1 88 6 2:37
💚​ azure linux-2core-8gb 1 88 6 1:58
💚​ azure-windows-latest-4core-16gb 1 88 6 3:21
💚​ gcp linux-2core-8gb 1 88 6 1:55
💚​ gcp-windows-latest-4core-16gb 1 88 6 3:21
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:19 azure-windows-latest-4core-16gb TestAccept
3:19 gcp-windows-latest-4core-16gb TestAccept
2:36 aws-windows-latest-4core-16gb TestAccept

@rugpanov rugpanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread .github/workflows/release-build.yml Resolved
Comment thread .goreleaser.yaml Resolved
Comment thread .github/workflows/release-build.yml Resolved
Comment thread .github/workflows/release-build.yml Resolved
Comment thread .goreleaser.yaml Resolved
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>
@simonfaltum
simonfaltum added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit ecde47c Nov 30, 2026
28 checks passed
@simonfaltum
simonfaltum deleted the simonfaltum/skills-fallback-build-injection branch November 30, 2026 17:39
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.

3 participants