Repository navigation
Fix AI tools fallback and embed resolved skills releases - #7162
Open
simonfaltum wants to merge 5 commits into
Open
simonfaltum wants to merge 5 commits into
simonfaltum wants to merge 5 commits into
Conversation
Collaborator
Integration test reportCommit: 065fd66
Top 3 slowest tests (at least 2 minutes):
|
…uild-skills-pin # Conflicts: # internal/build/cli-compat.json # libs/aitools/installer/installer_test.go # libs/clicompat/clicompat_test.go
- Write overlay paths relative to the build directory so symlinked checkouts still embed the resolved manifest. - Keep "latest" when the build-time lookup fails, add a timeout to the gh call, and report the failure in the GitHub Actions job summary, since GoReleaser hides hook output. - Resolve the embedded skills fallback from the newest pinned range below "latest" and remove AgentSkillsFallbackVersion. - Record the plugin version as unknown when the latest release can't be resolved, instead of recording the fallback. - Replace the libs-level command test with an acceptance test for aitools list and a cmd/aitools test for plugin installs. Both stub the release API through DATABRICKS_SKILLS_API_URL. Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=1 unreleased=0 coverage=0 failing=0
TestAccept/cmd/aitools/list-release-rate-limited: branch ✅ | main (66fce77) ❌ | latest (v1.22.0) ❌main (66fce77): latest (v1.22.0): |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CLI 1.22 resolves the skills version with an unauthenticated call to GitHub's releases API. When GitHub rate limits that call,
aitools listand plugin installation fail, and the VS Code agent picker ends up empty (failing CI).The CLI already has an embedded fallback for this, but those two commands didn't use it. The fallback was also a hand-maintained constant (
0.2.30) that drifts behind the real releases.Changes
Before: a rate-limited release lookup made
aitools listand plugin installs fail, and the embedded fallback was a compiled constant.Now:
aitools listfalls back to the embedded skills version, plugin installs succeed and record the plugin version as unknown, and release builds embed the skills release that is latest at build time..github/scripts/pin-cli-compat.pyresolves"skills": "latest"with one authenticatedgh apicall and writes the result to a Go build overlay under.databricks/cli-compat/. GoReleaser and thebuild,snapshotandsnapshot-releasetasks build with that overlay. The checked-incli-compat.jsonstays unchanged.skills_resolved_from_latest: true, so the CLI still tracks latest at runtime and keeps its downgrade checks. The concrete version is only used as the fallback."latest"stays in the manifest and the script warns. GoReleaser hides hook output, so release builds also write the warning to the GitHub Actions job summary."latest"(failed lookup or a plaingo build), the fallback is the newest pinned range below it, as if the"latest"rows weren't there. This replacesAgentSkillsFallbackVersion.aitools listusesGetSkillsRefWithFallback. Plugin installs don't need a skills version (the agent's marketplace picks it), so a failed lookup records the plugin version as unknown and keeps the existingstate.Release.1.23.0. CLI1.22.xstays pinned to0.2.32(Pin CLI 1.22 skills to v0.2.32 #7159), since those binaries don't have the fallback.DATABRICKS_SKILLS_API_URLoverrides the GitHub API base URL so tests can stub the release lookup.Test plan
./task checks,./task lint-q,./task fmt-q,./task doctestlibs/clicompat,libs/aitools/...,cmd/aitoolsandinternal/build(the first three also with the build overlay applied)acceptance/cmd/aitools/list-release-rate-limited: a 403 from the release API still lists skills at0.2.32, with the full agent listgh, non-zero exit, timeout, invalid tags) leave"latest"in place, relative overlay pathsghmissing on Python 3.9: the build continues and the warning reaches stderr and the job summaryThis PR was written by Codex.
This pull request and its description were written by Isaac.