Repository navigation
[flaky-ci] Recover corrupt cached Android SDK archives - #12886
Conversation
A cached Android SDK ZIP can fail CRC validation after its SHA-256 stamp has been saved. This left every retry extracting the same damaged file. On extraction failure, compare the archive with its pinned SHA-256. Discard a mismatched ZIP and its stamp so the existing CI task retry fetches a clean copy. Leave archives intact for non-corruption errors. Start a new cache namespace to replace the poisoned immutable cache, while retaining a v1 restore fallback for unaffected downloads. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved moderate issues affect corruption recovery coverage and retry behavior.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This PR improves recovery from corrupt cached Android SDK archives and rotates the Azure Pipelines cache namespace.
Changes:
- Validates and removes corrupt archives and stamps after failed extraction.
- Moves caching to
v2withv1fallback restoration. - Updates cache-safety documentation.
| File | Summary | Final comments |
|---|---|---|
src/androidsdk/androidsdk.targets |
Adds archive hash validation and cleanup after extraction failures. | Moderate: Cleanup is skipped when extraction succeeds but final source.properties validation fails. |
build-tools/automation/yaml-templates/cache-android-archives.yaml |
Updates cache keys and recovery documentation. | Moderate: Recovery does not cover other cached consumers. Nit: Clarify archive verification and sidecar usage. |
|
/review |
|
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
✅ LGTM
Findings: 0 errors · 0 warnings · 1 suggestion
The extraction failure is captured without masking the original tool output, checksum mismatches remove both the poisoned archive and its validation stamp, and matching archives are preserved for unrelated failures. The cache namespace transition retains reuse while allowing corrected contents to be promoted. CI build 1608350 and all 45 reported checks completed successfully.
The remaining suggestion is to preserve the manually validated corruption scenarios as automated regression coverage.
Generated by Android PR Reviewer for #12886 · copilot · gpt56 · 65.8 AIC · ⌖ 11.1 AIC · ⊞ 25.9K
Comment /review to run again

Why
Build 1607097 repeatedly failed extracting
docs-24_r01.zipbecause the cached archive had a bad CRC. Its cached SHA-256 validation stamp let the download target skip rechecking the archive, so each retry extracted the same damaged file.What changed
v1restore fallback so unaffected downloads can be reused and promoted tov2after a successful run.Validation
No issue filed; this addresses the linked CI failure.