Skip to content

Fix 403 on databricks labs install lsql by passing GITHUB_TOKEN#4857

Merged
pritishpai merged 1 commit into
mainfrom
fix/lsql-install-403-github-token
Jun 4, 2026
Merged

Fix 403 on databricks labs install lsql by passing GITHUB_TOKEN#4857
pritishpai merged 1 commit into
mainfrom
fix/lsql-install-403-github-token

Conversation

@pritishpai

@pritishpai pritishpai commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • databricks labs install lsql was returning a 403 in CI because the GitHub token was not being passed to the environment during the install step.
  • Adds GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} to the env block of the relevant CI job in push.yml.

Test plan

  • Confirm the lsql fmt step in CI no longer fails with a 403 on databricks labs install lsql

@pritishpai pritishpai requested a review from a team as a code owner June 4, 2026 20:09
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

✅ 2/2 passed, 1 flaky, 22s total

Flaky tests:

  • 🤪 test_make_ucx_group (10.636s)

Running from acceptance #9023

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.77%. Comparing base (7363f04) to head (adfd72e).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pritishpai pritishpai enabled auto-merge June 4, 2026 20:14

@FastLee FastLee 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.

Perfect!

@pritishpai pritishpai added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit 1c197c7 Jun 4, 2026
9 checks passed
@pritishpai pritishpai deleted the fix/lsql-install-403-github-token branch June 4, 2026 20:22
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.
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.

2 participants