Skip to content

Route Maven through Moderne Artifactory cache to avoid HTTP 429#1096

Merged
Jenson3210 merged 3 commits into
mainfrom
jenson3210/route-maven-through-moderne-cache
May 13, 2026
Merged

Route Maven through Moderne Artifactory cache to avoid HTTP 429#1096
Jenson3210 merged 3 commits into
mainfrom
jenson3210/route-maven-through-moderne-cache

Conversation

@Jenson3210
Copy link
Copy Markdown
Contributor

Summary

  • CI failed today with https://repo.maven.apache.org/maven2: HTTP 429 — Maven Central is rate-limiting parallel test resolution.
  • Inline the same mirror configuration that moderneinc/rewrite-java-security uses successfully today: route all Maven resolution through https://artifactory.moderne.ninja/artifactory/moderne-cache-3/ via s4u/maven-settings-action, and set REWRITE_GRADLE_MIRROR_* env vars on the Gradle build / publish steps.
  • Replaces the thin call into openrewrite/gh-automation's reusable ci-gradle.yml / publish-gradle.yml with their composite actions invoked inline — the bypass pattern the reusable workflow explicitly recommends for consumers that need a mirror.
  • Validated by the pilot PR moderneinc/rewrite-dropwizard#14, which built green in 4m16s with no 429s.

Test plan

  • PR CI passes
  • Build logs show s4u/maven-settings-action step ran
  • No HTTP 429 lines in build logs

Maven Central has started rate-limiting parallel test resolution
(HTTP 429), failing CI across recipe repos. Inline the same mirror
configuration used by moderneinc/rewrite-java-security: route
`mirrorOf: "*"` through artifactory.moderne.ninja's moderne-cache-3
via s4u/maven-settings-action, and set REWRITE_GRADLE_MIRROR_* on
the build/publish steps so Gradle resolution goes through the cache
too.

This replaces the call into openrewrite/gh-automation's reusable
ci-gradle.yml / publish-gradle.yml workflows with their composite
actions called inline, which is the bypass pattern the reusable
workflow explicitly recommends for consumers that need a mirror.
timtebeek added 2 commits May 13, 2026 10:38
The five other JSpecify recipes in this file pin to 1.0.0; this one
used `latest.release`, which now resolves to `1.0.0.redhat-00001`
through the Moderne Artifactory cache mirror, breaking
JSpecifyBestPracticesTest.
@Jenson3210 Jenson3210 merged commit f56a1ea into main May 13, 2026
1 check passed
@Jenson3210 Jenson3210 deleted the jenson3210/route-maven-through-moderne-cache branch May 13, 2026 23:39
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite May 13, 2026
timtebeek added a commit that referenced this pull request May 15, 2026
…1101)

`classpathFromResources("sun.internal.new")` uses
`Pattern.compile(artifactName + ".*")` to match against artifact-version
strings in both `META-INF/rewrite/classpath.tsv.gz` type tables and
JAR files under `META-INF/rewrite/classpath/`. Since `.` is a regex
wildcard, the prefix `sun.internal.new` can match unrelated artifacts,
and the static `TypeTable.classesDirByArtifact` cache can cause the
local JAR fallback to be skipped depending on test ordering and what
type tables happen to be on the runtime classpath.

After #1096 routed Maven resolution through Moderne's Artifactory
cache mirror, the four type-attribution-sensitive `IBMSemeruTest`
cases started failing on every scheduled CI run with "LST contains
missing or invalid type information". Loading the JAR directly via
`classpath(Collection<Path>)` and a `getResource` lookup bypasses
both the regex matching and the shared static cache, so the IBM
JSSE stub classes are always available to the parser.

Fixes #1100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants