Fix 403 on databricks labs install lsql by passing GITHUB_TOKEN#4857
Merged
Conversation
|
✅ 2/2 passed, 1 flaky, 22s total Flaky tests:
Running from acceptance #9023 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4857 +/- ##
=======================================
Coverage 87.77% 87.77%
=======================================
Files 123 123
Lines 17569 17569
Branches 3713 3713
=======================================
Hits 15422 15422
Misses 1458 1458
Partials 689 689 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
4 tasks
2 tasks
a0x8o
pushed a commit
to alexxx-db/ucx
that referenced
this pull request
Jun 24, 2026
…rickslabs#4865) ## Summary The `Install LSQL` step in `push.yml` intermittently fails with: ``` Error: version: versions: refresh: github request failed: 403 Forbidden GET https://api.github.com/repos/databrickslabs/lsql/releases ``` `databricks labs install` fetches both the release list **and** the source zipball from `api.github.com` **anonymously** — the CLI's `cmd/labs/github` client uses `http.DefaultClient` with no `Authorization` header and reads no `GITHUB_TOKEN`/`GH_TOKEN` on any version (verified against `v0.292.0` and `main`). So it hits GitHub's 60 req/hr unauthenticated rate limit, which is shared across GitHub Actions runner IPs. PR databrickslabs#4857 added `GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}` to the step, but that variable is silently ignored by the CLI — it was a no-op, and the run only went green because it happened to land in a window with rate-limit budget. ## Fix Pre-fetch the release list and source archive with authenticated `gh` (5,000 req/hr), seed the CLI's local cache (`~/.databricks/labs/lsql/cache`) and lib dir (`~/.databricks/labs/lsql/lib`), then run `databricks labs install lsql --offline` so the CLI makes **no** GitHub API calls at all. ## Test plan - [x] Verified locally end-to-end: seed cache + unpack lib + `install --offline` produces a working `lsql` plugin (`databricks labs installed` lists `lsql v0.17.0`) and `databricks labs lsql fmt` runs with no diff. - [ ] CI `build` / `fmt` job passes the `Install LSQL` step. This pull request and its description were written by Isaac.
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.
Summary
databricks labs install lsqlwas returning a 403 in CI because the GitHub token was not being passed to the environment during the install step.GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}to theenvblock of the relevant CI job inpush.yml.Test plan
lsql fmtstep in CI no longer fails with a 403 ondatabricks labs install lsql