Commit f625881
authored
ci: reduce checkout history footprint in PR workflows (#27221)
* ci: reduce checkout history footprint in PR workflows
Optimize actions/checkout usage to avoid downloading the full repo blob
history on every PR run. The repo is large, so cloning everything just
to run tests wastes minutes of CI time per job.
- py-operator-build-test.yml: drop fetch-depth: 0 (no history needed)
- openmetadata-service-unit-tests.yml: drop fetch-depth: 0 (Sonar is
explicitly skipped via -Dsonar.skip=true); shallow-fetch PR base ref
- airflow-apis-tests.yml, py-tests.yml, yarn-coverage.yml: add
filter: blob:none to Sonar jobs so commits/trees remain available
for blame while blobs are fetched lazily on demand
- ui-checkstyle.yml: add filter: blob:none to all jobs that rely on
tj-actions/changed-files (needs commit/tree metadata, not blobs)
* ci: drop fetch-depth: 0 from jobs that don't walk history
Follow-up audit after the initial pass. Four jobs were still declaring
fetch-depth: 0 (plus filter: blob:none in two cases) without actually
needing any history beyond HEAD.
ui-checkstyle.yml
- i18n-sync: runs 'yarn i18n' then 'git status --porcelain'. git status
compares the working tree to HEAD; no history walk. Default depth 1
is sufficient.
- app-docs: same pattern with 'yarn generate:app-docs'.
py-sonarcloud-nightly.yml
- py-unit-tests: only uploads a coverage artifact, no Sonar invocation.
- py-integration-tests: same.
- py-combine-coverage: does run SonarSource/sonarqube-scan-action, so
it genuinely needs the commit graph — added filter: blob:none for
parity with the PR Sonar jobs.
* ci: remove unused 'Fetch PR base branch' step from service unit tests
Copilot review flagged that the step was using --depth=1 while the main
checkout is also shallow, which would break any merge-base operation.
On investigation, nothing downstream actually uses the base ref: the
only command that runs after the checkout is 'mvn ... -Dsonar.skip=true',
which has no git dependency. The step was preserved defensively in the
previous commit, but it's dead code — cleanest fix is to delete it.1 parent e410dc2 commit f625881
7 files changed
Lines changed: 12 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 77 | | |
83 | 78 | | |
84 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
113 | | - | |
114 | 112 | | |
115 | 113 | | |
116 | 114 | | |
| |||
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
| 155 | + | |
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| |||
377 | 379 | | |
378 | 380 | | |
379 | 381 | | |
380 | | - | |
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
464 | | - | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| 549 | + | |
549 | 550 | | |
550 | 551 | | |
551 | 552 | | |
| |||
654 | 655 | | |
655 | 656 | | |
656 | 657 | | |
| 658 | + | |
657 | 659 | | |
658 | 660 | | |
659 | 661 | | |
| |||
755 | 757 | | |
756 | 758 | | |
757 | 759 | | |
| 760 | + | |
758 | 761 | | |
759 | 762 | | |
760 | 763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
0 commit comments