Skip to content

Run fork integration's GitHub API jobs on allowlisted runners - #1101

Merged
david-siqi-liu merged 2 commits into
mainfrom
david/ci-fork-integration-protected-runner
Oct 12, 2026
Merged

david-siqi-liu merged 2 commits into
mainfrom
david/ci-fork-integration-protected-runner

Conversation

@david-siqi-liu

@david-siqi-liu david-siqi-liu commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

After this PR, /integration-test works on fork PRs. Its three small jobs (authorize, non-member reply, result report) run on databricks-protected-runner-group, the same runners ug-review.yml and the user-journey gate already use.

Before and after

/integration-test comment:

  • Before: the authorize job fails right away with HTTP 403 ("the databricks organization has an IP allow list enabled"). GitHub-hosted ubuntu-latest runners are not on the org allow list, so their GitHub API calls are rejected. Nothing replies on the PR and no status is posted. First seen on Memoize Databricks CLI tokens per process and skip impossible --no-browser re-auth #1017.
  • After: the jobs run on allowlisted runners, so the command posts the Fork integration status, runs Integration on the pinned commit, and reports back.

Reading the PR head in the authorize step:

  • Before: gh api piped into a standalone jq.
  • After: one gh api --jq call. The protected runner uses a custom image (ubuntu-22-04-crowdstrike-image) that does not guarantee a jq binary, and gh has jq built in.

Testing

  • tests/test_integration_contract.py (72 passed). The fake gh in the authorize-script test answers only the exact --jq query the step sends, so changing that expression fails 6 cases. A new test fails if any fork-integration job loses the protected runner group or its linux-ubuntu-latest label (a misspelled label fails it), goes back to ubuntu-latest, or calls a bare jq.
  • Read-only probe on databricks-protected-runner-group (scratch branch, since deleted): gh 2.102.0 is installed, and the exact gh api --jq line read Memoize Databricks CLI tokens per process and skip impossible --no-browser re-auth #1017's head (f2db89b, yaoharry/unity-gateway) through the IP allow list with the job token.
  • The rest of the chain is unchanged and already proven. The failed Memoize Databricks CLI tokens per process and skip impossible --no-browser re-auth #1017 run shows the member gate admits a MEMBER comment. The integration call grants the same permissions as ci.yml's. A fork head commit is fetchable by SHA from this repo. Windows JFrog OIDC accepts the refs/heads/main subject that issue_comment runs get, as every main push run shows.
  • issue_comment workflows only run from the default branch, so the end-to-end check is commenting /integration-test on Memoize Databricks CLI tokens per process and skip impossible --no-browser re-auth #1017 after this merges.

This pull request and its description were written by Isaac.

The databricks org IP allow list rejects GitHub API calls from GitHub-hosted
runners, so `/integration-test` failed with HTTP 403 in the authorize job
before anything ran. Move the authorize, reject, and report jobs to
databricks-protected-runner-group, as ug-review and the user-journey gate
already do, and read the PR through `gh api --jq` because that runner image
does not guarantee a jq binary.

Co-authored-by: Isaac <no-reply@databricks.com>
The fake gh now answers only the exact --jq query the authorize step sends, so changing that expression fails the test instead of passing on canned output. The runner test also checks the linux-ubuntu-latest label, since a misspelled label would leave the jobs queued.

Co-authored-by: Isaac <no-reply@databricks.com>
@david-siqi-liu
david-siqi-liu added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit e1e38d4 Oct 12, 2026
145 of 152 checks passed
@david-siqi-liu
david-siqi-liu deleted the david/ci-fork-integration-protected-runner branch October 12, 2026 18:59
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