Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ internal object MuzzleMavenRepoUtils {
listOf(central)
} else {
val proxy = RemoteRepository.Builder("central-proxy", "default", mavenProxyUrl).build()
listOf(proxy, central)
// TODO: temporary hack for Maven Central rate limiting
listOf(proxy /*, central*/)
Comment thread
AlexeyKuznetsov-DD marked this conversation as resolved.
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.eclipse.aether.resolution.VersionRangeResolutionException
import org.eclipse.aether.resolution.VersionRangeResult
import org.eclipse.aether.util.version.GenericVersionScheme
import org.gradle.api.GradleException
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable
Expand Down Expand Up @@ -128,7 +129,9 @@ class MuzzleMavenRepoUtilsTest {
.containsExactly("central" to MAVEN_CENTRAL_URL)
}

// TODO: Re-enable after removing the temporary Maven Central rate limiting workaround.
@Test
@Disabled("Temporarily using the configured proxy without a Maven Central fallback")
@EnabledIfEnvironmentVariable(named = "MAVEN_REPOSITORY_PROXY", matches = ".*")
fun `defaultMuzzleRepos queries the configured proxy before Maven Central`() {
val proxyUrl = System.getenv("MAVEN_REPOSITORY_PROXY")
Expand Down
5 changes: 4 additions & 1 deletion gradle/repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ repositories {
allowInsecureProtocol = true
}
}
mavenCentral()
// TODO: temporary fix for Maven Central rate limiting
else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use one proxy source for Muzzle and Gradle

When a build uses -PmavenRepositoryProxy=... without also exporting MAVEN_REPOSITORY_PROXY, this new else removes Central from Gradle artifact resolution, while defaultMuzzleRepos() still sees a null environment variable and queries Central. If Central advertises a version the proxy has not mirrored, Muzzle plans a task for that version and Gradle can no longer resolve it—the metadata/artifact mismatch this change is intended to prevent. Source both decisions from the same configured value or pass the Gradle property into Muzzle.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is temporary workaround.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a temporary fix

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Property-only proxy leaves Muzzle on Maven Central

Muzzle can create compatibility tasks for versions that the configured proxy cannot resolve.

Assertion details
  • Input: Configure the proxy only with the Gradle property -PmavenRepositoryProxy, without MAVEN_REPOSITORY_PROXY.
  • Expected: Gradle dependency resolution and Muzzle version discovery must use the same configured proxy.
  • Actual: Gradle uses the configured proxy, but Muzzle reads only MAVEN_REPOSITORY_PROXY and still queries Maven Central.

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest · Open Bits AI session

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is temporary workaround

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a temporary fix

mavenCentral()
}
// add maven central repository for snapshot dependencies
maven {
content {
Expand Down
Loading