Skip to content

ci: use blobless checkout for lint jobs - #103

Open
lqiu96 wants to merge 1 commit into
ci/add-job-timeoutsfrom
ci/blobless-checkout-lint
Open

lqiu96 wants to merge 1 commit into
ci/add-job-timeoutsfrom
ci/blobless-checkout-lint

Conversation

@lqiu96

@lqiu96 lqiu96 commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

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.

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.

1 participant