← Back to Pull requests

ci: maven cache diet; static checks re-homed; pre-pull and retries purged #20734

Closed
unknown closed this pull request without merging on Oct 29, 2026 07:24 UTC
View on GitHub
unknown unknown commented on Oct 26, 2026 16:39 UTC
Author

⚙️ Summary

Smaller Maven cache, fewer cold starts, dead retries removed, static checks moved to the workflow whose path filter fits their inputs.

| Area | Change | Effect |
|---|---|---|
| 💾 cache | purge org/apache/druid before save | −0.45 to −2.6 GB per saving job |
| 💾 cache | drop awssdk:bundle from embedded-tests | −683.6 MB (41 % of ~/.m2) |
| 📊 cache | dir_manifest: ~/.m2 before / build / after + 💤 dormant | cache growth and unused weight measurable |
| 🔗 repos | one Central ID, one Confluent ID, prefix discovery off | no duplicate lookups, no failed fetches |
| 🐳 images | Testcontainers pre-pull removed | −1:20 per unit-test shard |
| 🧹 retries | parent-POM retry removed | 0 rescues ever |
| 🧭 checks | code checks → ci.yml (filtered); packaging + RAT + web → static-checks.yml (always) | no duplicates, RAT never skipped |

💾 Maven cache

🔑 setup-java key = hash of /pom.xml + .mvn/wrapper/maven-wrapper.properties + .mvn/extensions.xml, no restore-keys → any pom bump starts cold. 10 GB quota shared with PR caches.
🗑️ rm -rf ~/.m2/repository/org/apache/druid before the post-job save → SNAPSHOT output stays out → smaller caches → more variants fit → fewer cold downloads → fewer Central 429s.
✂️ embedded-tests: awssdk:bundle (test scope, re-added in #19273, no rationale) removed. The module uses only s3, sts, kinesis, all already direct test deps.
📊 .github/scripts/dir_manifest [-a <marker>] <dir> <out> [<prev>]: path<TAB>size manifest; logs ➕ added / ➖ removed / Σ MB. Output: target/ci-debug/m2-{before,build,after}.txt, uploaded with job artifacts.
💤 -a <marker> → m2-build-dormant.txt: restored files never read (atime) since the marker. The marker is touched right after restore.
After tar -x, atime = ctime → under relatime, the first read advances atime → one read counts.
0 accessed files in every job → mount is noatime → numbers void.

<details><summary>📈 Hit rate on master (64 commits, 1338 job logs)</summary>

| Outcome | Jobs |
|---|---:|
| ✅ hit | 638 (56 %) |
| ❌ maven cache is not found | 502 (44 %) |

A miss = cold download (➕ 13301 files Σ 1664.7 MB, job). 25 commits missed:
18 → key file changed (dependabot bursts; 10-24 09:44–09:49: 5 commits, 5 keys).
4 → raced a key still being saved (1–3 min).
3 → eviction: 587e781a, cfcc8202, 45681539 re-saved an identical, previously used key.

Master holds no full ~/.m2 cache, only maven-wrapper (0.01 GB).
</details>

<details><summary>📈 Purge (run <a href="https://github.com/apache/druid/actions/runs/40662998337">40662998337</a>)</summary>

| Job | After build | After purge | org/apache/druid |
|---|---:|---:|---:|
| packaging-check | 4391.3 MB | 1811.7 MB | 2579.6 MB |
| web-checks | 3392.5 MB | 1765.9 MB | 1626.6 MB |
| openrewrite | 2311.8 MB | 1862.2 MB | 449.6 MB |
| static-checks-maven | 2236.9 MB | 1787.3 MB | 449.6 MB |
| strict-compilation | 1664.7 MB | 1664.7 MB | 0 |

First job to finish is the saver; the rest get Unable to reserve cache … another job may be creating this cache. The 3.19 GB cache of #20657 came from web-checks.
</details>

<details><summary>📈 awssdk bundle (run <a href="https://github.com/apache/druid/actions/runs/40673592530/job/122766240030">40673592530</a>, QTest 3/4)</summary>

~/.m2: 1669 MB, 13,435 files (1393 MB compressed, ~14 s restore).

| MB | What |
|---:|---|
| 683.6 | software/amazon/awssdk/bundle/2.55.6/bundle-2.55.6.jar |
| 79.4 | rest of software/amazon |
| 294.4 | org/apache (Hadoop 122.9) |
| 66.8 | org/graalvm |

Source: hadoop-aws:3.5.0 declares bundle at compile scope. hdfs-storage, iceberg, deltalake, quidem-ut exclude it; only embedded-tests re-added it.
No S3A / hadoop-aws / S3FileIO in embedded-tests. HdfsToS3ParallelIndexTest writes via druid-s3-extensions.
dependency:analyze-only (embedded-tests -am, test scope) → no used-undeclared.
✅ After removal: S3, Kinesis, Iceberg, Hdfs↔S3, IngestionSmoke → 0 failures. bundle in 0 of 39 manifests. PR cache 1461 → 925 MB.
</details>

<details><summary>📈 Dormant (run <a href="https://github.com/apache/druid/actions/runs/40690096502">40690096502</a>, cache hit, 1066 MB restored)</summary>

| Job | 💤 dormant |
|---|---:|
| openrewrite | 7877 files · 87.1 MB |
| QTest 1/4 | 8007 files · 106.1 MB |
| QTest 3/4 | 8007 files · 106.1 MB |

Only 8–10 % dormant. By count mostly sidecars (openrewrite: 3813 .sha1, 0.1 MB); 115 jars = 26 MB.
Largest in openrewrite: node-24.21.0-linux-x64.tar.gz 55.4 MB + npm-11.19.0.tar.gz 2.9 MB. openrewrite skips the console; web-checks and packaging need them.
→ Dormant is per job. Pruning one job's set strips what others use; only files dormant in every job are safe to drop.
</details>

🔗 Maven repositories

pom.xml: repository + pluginRepository ID maven.org → central, trailing / dropped → overrides the Super-POM central → Central listed once.
avro-extensions, protobuf-extensions, quidem-ut: module-level confluent removed. Same URL as root cflt-public; two IDs → _remote.repositories mismatch → HTTP re-verify (cached from a remote repository ID that is unavailable).
.mvn/maven.config: -Daether.remoteRepositoryFilter.prefixes=false. Resolver 2.x otherwise fetches /.meta/prefixes.txt from every declared repo.
✅ help:effective-pom (protobuf-extensions, quidem-ut) → repos central, cflt-public (+ datasets); pluginRepos central.

<details><summary>📈 Failed <code>prefixes.txt</code> fetches (1338 master job logs)</summary>

| Repo | Fails | Error |
|---|---:|---|
| jvnet-nexus-releases | 2340 | (certificate_expired) PKIX path validation failed |
| jvnet-nexus-snapshots | 2274 | (certificate_expired) PKIX path validation failed |
| central.maven.org | 1575 | Name or service not known |
| repo.maven.apache.org | 10 | HTTP Status: 429 |

A 429 on that fetch → ~30 s stall (log).
</details>

<details><summary>📈 Central queried under two IDs</summary>

Same log: /.meta/prefixes.txt fetched from maven.org and central, 31 s apart. One host, two requests.
Order was maven.org → cflt-public → Super-POM central → an artifact missing everywhere hits Central twice; both count toward the rate limit.
Per cold job (largest unit-test job): ~2400 poms (13–15k files), 4 not-found (resolver-status.properties: bsh, freemarker, oro, xml-resolver), 17 Confluent files.
→ ~4–8 extra requests vs ~13k downloads. Real, not the 429 driver; cold downloads are.
</details>

<details><summary>⚖️ Prefix filter stays off</summary>

| | On | Off |
|---|---|---|
| Central probes for non-Central artifacts (~17 Confluent + 4 not-found) | skipped | ~21 × 404 per cold job |
| prefixes.txt fetches | 1 per repo per cold job; 429 → ~30 s stall | none |
| dead repos (maven.java.net expired cert, central.maven.org NXDOMAIN) | fetch fails → filter abstains → no gain; 4.6 fails/job | silent |
| wrong denial (Prefix … NOT allowed) | possible; verifyDenied since resolver 2.0.21 | none |

~20 requests vs ~13k downloads either way → off: no stalls, no noise, no wrong denials.
</details>

🐳 Testcontainers pre-pull removed

Step gone, with its hard-coded 9-image list and 3-attempt retry.
Origin #19464 / #19465 claimed "4–12× more headroom" for the 60 s LatchableEmitter wait. Code says otherwise:
EmbeddedClusterTestBase (PER_CLASS) → @BeforeAll cluster.start() → container.start() blocks until pulled, before the first test.
Every 60 s latch comes later (test methods, @AfterEach waitUntilPublishedRecordsAreIngested). #19464 failures were Druid server restarts; no re-pull.
Cost: 9 shards × 9 images, ~1:20 per shard (S job: 11:36:05 → 11:37:26); each image used in 1–2 shards. Now pulled on demand, only where used.
The list had drifted: apache/kafka:4.2.0 pulled, 4.3.0 used.

<details><summary>📈 Retry and Kafka latch timeouts (1338 master job logs)</summary>

Retry: 701 jobs, fired once (azurite 503, QTest 3/4, no Azurite use) → 0 rescues that mattered.
KafkaIndexFaultToleranceTest: 0 timeouts. Other Kafka latch timeouts with pre-pull: EmbeddedDimensionValueSetShardSpecTest 10 s ×8, KafkaClusterMetricsTest 60 s, EmbeddedKafkaSupervisorTest 10 s. All after cluster.start() → not image-related.
</details>

🧹 Parent-POM retry removed

"Resolve Apache parent POM": 3 attempts, 10 s apart.

<details><summary>📈 Firings (1338 master job logs)</summary>

| Jobs | Fired | Rescued |
|---:|---:|---:|
| 1022 | 2: 429 ×3, (absent) ×2 | 0 |
</details>

🧭 Static checks re-homed

| Job | Workflow | Reads |
|---|---|---|
| static-checks-maven, strict-compilation, openrewrite | ci.yml (filtered) | Java, poms, codestyle/ |
| packaging-check, web-checks | static-checks.yml (unfiltered) | docs, website, web-console, distribution/bin, whole tree |

📦 packaging-check:
checkstyle / pmd / forbiddenapis / animal-sniffer skipped by name; lifecycle-bound, already run by static-checks-maven.
Not -Pskip-static-checks: it would also skip javadoc, the cyclonedx SBOM and git.version (source release).
-Prat in-build; safe only without -T (apache-rat-plugin 0.17+, RAT-553; see #20527).
License checks covered: setup_generate_license.sh, generate-licenses-report, test-check-licenses, check-licenses (distribution/pom.xml, apache-release).
📜 static-checks-maven: root apache-rat:check -Prat, single-threaded; also covers benchmarks (excluded from packaging by -pl).
🚫 -T1C out of every CI build (packaging, static-checks-maven, strict-compilation, openrewrite, docker-tests). Interleaved output → unreadable logs, hidden root causes; -pl scoping is the better lever. The Dockerfile keeps it; CI builds the image with BUILD_FROM_SOURCE=false.
🧾 -Dcyclonedx.skip on static-checks-maven + openrewrite installs; no SBOM needed there, packaging keeps it. makeBom = biggest goal in packaging (270 s serial, ~3.5 s × 78 modules): plugin 2.9.3 (latest) resolves the full verbose tree, test scope included, before filtering (druid-embedded-tests: 10.4 s for 9 components).
🧽 mvn clean out of the worker scripts: fresh checkout, and clean would wipe target/ci-debug.
📝 AGENTS.md: -T1C out of the test commands; garbled output, -pl is the lever.
🏷️ worker.yml steps renamed with icons. Moved jobs now report as unit tests / <job> / <job>.

<details><summary>📈 What the unified <code>paths-ignore</code> skips (master, 6 months)</summary>

113 of 964 commits (~12 %) touched only ignored paths: web-console 41, website 41, docs 14, empty dependabot squashes 10, distribution/bin 2, mixed 5. RAT, web-checks and packaging read all of them → unfiltered. Tests and Java checks read none.
</details>

⚠️ Open

🐢 -T1C off: packaging reactor install 10:11 → 13:27 (one cold run each; RAT added, code checks dropped). 20 min vs ~32 min critical path → PR wall time unchanged. static-checks-maven serial: est. ~32 min, level with critical path.
🔁 Local ~/.m2 entries tagged maven.org / confluent re-verify once, then re-tag.
🪞 settings.xml mirrors keyed on maven.org stop matching.
🕳️ RAT gap: ignored-path-only change inside benchmarks/.
🐳 Cold image pull now lands in @BeforeAll cluster.start(). #19464 logs expired (90-day retention); verdict rests on code. Watch ci-stability for Kafka/embedded flakes.
🗝️ Follow-up: setup-java cache → actions/cache/restore + save (as cron-job-its.yml) for restore-keys → pom bumps start warm (18 of 25 misses). Prune dormant only on fallback restore (cache-hit != 'true', cache-matched-key != ''); save only on build success (a failed build leaves nearly everything dormant). Saver is still the first finisher.

🤖 Generated with Claude Code

Diff: 650 lines (+487 / -163) across 8 files Reviewer: amaechler Review duration: 3765m
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
0.52
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.388
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #20734"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 52% (MEDIUM) · Higher = larger blast radius
52%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 20.5% · Safe to merge
20.5%
Repository