Skip to content

ci: use blobless checkout for lint jobs - #15365

Merged
lqiu96 merged 1 commit into
mainfrom
ci/blobless-checkout-lint
Dec 2, 2026
Merged

lqiu96 merged 1 commit into
mainfrom
ci/blobless-checkout-lint

Conversation

@lqiu96

@lqiu96 lqiu96 commented Dec 1, 2026

Copy link
Copy Markdown
Member

Add filter: blob:none alongside fetch-depth: 0 on the lint job inside 8 workflows (ci.yaml, java-bigquery-jdbc-ci.yaml, java-firestore-ci.yaml, java-pubsub-ci.yaml, java-shared-config-ci.yaml, java-shared-config-downstream-maven-plugins.yaml, java-spanner-jdbc-ci.yaml, and java-storage-nio-ci.yaml).

Why filter: blob:none is needed

  • The lint job runs .kokoro/build.sh (JOB_TYPE=lint), which calls git diff --name-only "${BASE_SHA}...${HEAD_SHA}" to find changed .java files. That three-dot diff requires the git merge base, which is why these 8 lint jobs set fetch-depth: 0 (all other jobs in these workflows use default shallow fetch-depth: 1).
  • Plain fetch-depth: 0 downloads the full git history including every historical file blob ever committed in the monorepo, causing lint checkouts to take 109s to 144s compared to ~25s for shallow fetch-depth: 1 jobs.
  • Adding filter: blob:none performs a blobless partial clone: Git downloads the complete commit and tree graph (so git diff --name-only BASE_SHA...HEAD_SHA still resolves the exact merge base across any branch age) while downloading file blobs only for the checked-out HEAD commit, skipping gigabytes of historical file contents.

@lqiu96
lqiu96 added this pull request to stack #15366 December 1, 2026 23:15
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@lqiu96
lqiu96 force-pushed the ci/blobless-checkout-lint branch from 5e759e5 to 5254895 Compare December 2, 2026 16:27
@lqiu96
lqiu96 requested a review from jinseopkim0 December 2, 2026 16:28
@lqiu96
lqiu96 marked this pull request as ready for review December 2, 2026 16:28
@lqiu96
lqiu96 requested a review from a team as a code owner December 2, 2026 16:28
@lqiu96
lqiu96 enabled stacked auto-merge (squash) December 2, 2026 16:28
@lqiu96
lqiu96 force-pushed the ci/blobless-checkout-lint branch from 5254895 to 3e83771 Compare December 2, 2026 18:04
@lqiu96
lqiu96 disabled stacked auto-merge December 2, 2026 18:47
Base automatically changed from ci/add-job-timeouts to main December 2, 2026 19:04
@lqiu96
lqiu96 requested a review from a team as a code owner December 2, 2026 19:04
@lqiu96
lqiu96 force-pushed the ci/blobless-checkout-lint branch from 3e83771 to 7d18af5 Compare December 2, 2026 19:04
@lqiu96
lqiu96 enabled stacked auto-merge (squash) December 2, 2026 19:07
stacked auto-merge was automatically disabled December 2, 2026 19:08

Replaced by a newer auto-merge request

@lqiu96
lqiu96 enabled stacked auto-merge (squash) December 2, 2026 19:08
stacked auto-merge was automatically disabled December 2, 2026 20:21

Auto-merge was disabled for another pull request in the stack

@lqiu96
lqiu96 merged commit 3d273cb into main Dec 2, 2026
203 checks passed
@lqiu96
lqiu96 deleted the ci/blobless-checkout-lint branch December 2, 2026 20:21
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