Skip to content

fix(ci): authenticate JetBrains OpenAPI codegen GitHub API calls - #12603

Merged
kirillk merged 1 commit into
mainfrom
fix-jetbrains-ci-gh-token
Jul 28, 2026
Merged

fix(ci): authenticate JetBrains OpenAPI codegen GitHub API calls#12603
kirillk merged 1 commit into
mainfrom
fix-jetbrains-ci-gh-token

Conversation

@kirillk

@kirillk kirillk commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What

Pass GITHUB_TOKEN to the "Run JetBrains unit tests" step in test-jetbrains.yml.

Why

The :backend:generateOpenApiSpec Gradle task (a codegen prerequisite for compiling the backend module and its serialization tests) fetches pinned Kilo CLI release metadata from the GitHub REST API to resolve the release asset digest. The task authenticates via GH_TOKEN/GITHUB_TOKEN, but the workflow step never exposed one, so the calls ran unauthenticated against GitHub's 60 requests/hour per-IP limit.

On shared Blacksmith runners that budget is consumed across the concurrent matrix jobs, so the build intermittently fails with:

> Task :backend:generateOpenApiSpec FAILED
Caused by: GradleException: GitHub API rate limit exceeded while fetching pinned Kilo CLI
release metadata (limit=60 remaining=0 used=60 ...)

Exposing secrets.GITHUB_TOKEN moves these calls to the authenticated, repo-scoped 1000/hour limit, which is per-token rather than per-IP and eliminates the shared-runner contention. test-ci.ts spawns Gradle with the inherited environment, so no further plumbing is needed. permissions: contents: read is already sufficient to read public release metadata.

The generateOpenApiSpec Gradle task fetches pinned Kilo CLI release
metadata from the GitHub REST API to generate the backend OpenAPI
client. The test-jetbrains workflow did not expose a token to this
step, so the calls were unauthenticated and subject to the 60/hour
per-IP limit. On shared Blacksmith runners that budget is exhausted
across concurrent jobs, intermittently failing the build with
'API rate limit exceeded'.

Pass GITHUB_TOKEN to the test step so the task uses the authenticated
(1000/hour repo-scoped) limit.
@kilo-code-bot

kilo-code-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • .github/workflows/test-jetbrains.yml

Reviewed by claude-sonnet-5 · Input: 12 · Output: 2K · Cached: 207.1K

Review guidance: REVIEW.md from base branch main

@kirillk
kirillk enabled auto-merge July 28, 2026 14:22
@kirillk
kirillk requested a review from marius-kilocode July 28, 2026 15:26
@kirillk
kirillk merged commit f844790 into main Jul 28, 2026
52 of 56 checks passed
@kirillk
kirillk deleted the fix-jetbrains-ci-gh-token branch July 28, 2026 19:16
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…oken

fix(ci): authenticate JetBrains OpenAPI codegen GitHub API calls
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