Repository navigation
ci(tests): download Maven Central artifacts from Google's mirror - #7015
Merged
Merged
Conversation
Maven Central rate-limits the CI runners (HTTP 429). The analysis job failed to resolve the unit test classpath, and the unit tests failed to download Robolectric's Android 9 jar for AppTasksBeforeAndroid10Test. - Gradle tries Google's mirror of Maven Central before Maven Central. The dependency verification checks every artifact's checksum and signature, whichever repository serves it. - Robolectric downloads its Android SDK jars from the same mirror and checks them against their SHA-512. - The Robolectric cache key names the SDK levels the tests run on. The key only named the Robolectric version, so the cache saved before the first SDK 28 test never held its jar, and every run downloaded it. A cache is only saved once it has a jar for every level, since a key that exists is never saved again. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Contributor
Android Gradle Plugin 9.5.0 (c8a8297) adds the MissingExplicitUriGrant check, which flags three intents already on master that pass a file URI without the URI grant flags: the photo and video capture intents in ChatActivity and the one in PickImage. The analysis job compares against this file, so every pull request has failed with "warning count increased" since the update. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Contributor
📱 QA build
The QA build installs alongside a released Nextcloud app, so you can keep Downloading the file requires a GitHub account, so open this link on the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Maven Central rate-limits the CI runners (HTTP 429), which breaks two jobs on master and every PR based on it:
AppTasksBeforeAndroid10Testfails withinitializationError(MavenArtifactFetcher,IOException), because Robolectric can't download its Android 9 (SDK 28) jar. The Robolectric cache is keyed by the Robolectric version only. It was saved on 15 Oct, before the first SDK 28 test came in on 2 Nov, and a cache whose key exists is never saved again, so every run downloads that jar.generateGplayDebugUnitTestLintModelfails to download Robolectric'snativeruntime-dist-compatjar ("Received status code 429 from server: Too Many Requests"). That workflow is synced from android-config and has no Gradle cache, so the fix has to be on the Gradle side.Changes:
build.gradle: Gradle tries Google's mirror of Maven Central (maven-central.storage-download.googleapis.com) before Maven Central. The dependency verification ingradle/verification-metadata.xmlchecks every artifact's checksum and PGP signature, whichever repository serves it. Maven Central stays as the fallback for artifacts the mirror doesn't have yet.app/build.gradle.kts: Robolectric downloads its Android SDK jars from the same mirror (robolectric.dependency.repo.url) and validates their SHA-512.scripts/analysis/lint-results.txt: the lint baseline goes from 14 to 17 warnings. Android Gradle Plugin 9.5.0 (c8a8297) added theMissingExplicitUriGrantcheck, which flags three intents already on master that pass a file URI withoutFLAG_GRANT_READ_URI_PERMISSION/FLAG_GRANT_WRITE_URI_PERMISSION: photo and video capture inChatActivityand the one inPickImage. The analysis job compares against this file, so every PR fails with "warning count increased" until it changes. Fixing the three intents is tracked in Camera capture intents lack explicit URI grant flags (lint MissingExplicitUriGrant, AGP 9.5.0) #7017.unit-tests.yml: the cache key names the SDK levels the tests run on (robolectric-sdks-Linux-4.17-28-33), so a test on a new level gets a new cache. A cache is only saved once it holds a jar for every level, so a failed download can't save an incomplete one under the new key.Verified: with this commit, #6977 passed both unit tests and analysis (commit
8b97998d8), which had failed before. Locally, the unit test classpath resolves through the mirror with--refresh-dependenciesand verification passing, and Robolectric re-downloads the SDK 28 jar from the mirror byte-identical to the one from Maven Central.🖼️ Screenshots
AppTasksBeforeAndroid10Test > initializationError FAILED🚧 TODO
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)