Skip to content

Conversation

@dweiss
Copy link
Contributor

@dweiss dweiss commented Jan 6, 2026

Those intermittent resolution errors on github runners are hard to work around. Let's see if we can use
google's mirrors instead (on github only) since we're running jenkins jobs separately (using maven central).

@dweiss dweiss added this to the 11.0.0 milestone Jan 6, 2026
@dweiss dweiss linked an issue Jan 6, 2026 that may be closed by this pull request
@dweiss dweiss added the skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check. label Jan 6, 2026
@prudhvigodithi
Copy link
Contributor

From https://docs.github.com/en/actions/reference/workflows-and-actions/variables I see the GITHUB_ACTIONS is always set to true when GitHub Actions is running the workflow.

project.getRepositories().mavenCentral();
// use google's maven central mirror first on github runners.
// https://github.com/apache/lucene/issues/15541
if (project.getProviders().environmentVariable("GITHUB_ACTIONS").isPresent()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: can we update the logic similar to apply from: file("declare-repositories.gradle") ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the way it should be done but we can't do the same in declare-repositories.gradle because it's used from contexts where there are no access to providers. So we use what we have access to in declare-repositories.gradle but do it "properly" here.

@dweiss
Copy link
Contributor Author

dweiss commented Jan 6, 2026

It says: "The name of the action currently running, or the id of a step." Should be sufficient to detect github workflows (not any CI - just github).

@prudhvigodithi
Copy link
Contributor

Overall LGTM. We can observe the nightly runs with this change.

@dweiss dweiss merged commit 662d6ec into apache:main Jan 6, 2026
12 checks passed
@dweiss dweiss deleted the google-maven-central-mirror branch January 6, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:build-infra skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Builds on github reporting http 429

2 participants