-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All changes together without offline #20504
All changes together without offline #20504
Conversation
@cstamas I wanted to remove go offline for some time as it was causing spurious failures in unexpected scenarios. Thanks for working on this! We want to stay on the latest Maven to be able to move to 4.0.0 when it's out. |
Problem on master is:
|
All fine in CI In the meantime Provisio got PR as well jvanzyl/provisio#65 |
|
8518a91
to
0373da0
Compare
@wendigo hope you can release proviso as well (I left a comment to be done before merge), and then with both updated will sync to master. |
0373da0
to
ce3ff03
Compare
Updated PR, @wendigo pls ping if provisio new release done and merged, Thanks! (or just done, we can updated it as part of this PR even) |
ce3ff03
to
5bda71a
Compare
Removed central prefixes, basically we are back to "allow all for central" (as I see we do not care for 'leaking reqs' toward Central, which is OK). |
5bda71a
to
e4ac503
Compare
Updated PR, now latest trino-maven-plugin and proviso used. |
e4ac503
to
9e04442
Compare
@nineinchnick ptal |
|
||
-Daether.syncContext.named.factory=file-lock | ||
-Daether.syncContext.named.nameMapper=file-hgav | ||
-Daether.syncContext.named.retry=5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find any reference docs for these properties, does this mean downloads will be retried?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, can you add it in a comment in this file? I see aether.connector.http.retryHandler.count
has a default value of 3
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these retries always available in Maven?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Maven 3.9.x, with introduction of locking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Resolver 2 this page is generated and contains more data, like "since" and "source": https://maven.apache.org/resolver-archives/resolver-2.0.0-alpha-7/configuration.html
BUT, do not use this page are reference for Resolver 1.x (Maven 3.x) as there has been renamed property keys! Still, if you can match the property (unchanged since 1.x or figure out what was renamed from) you can figure out "since".
.mvn/maven.config
Outdated
-Daether.syncContext.named.factory=file-lock | ||
-Daether.syncContext.named.nameMapper=file-hgav | ||
-Daether.syncContext.named.retry=5 | ||
-Daether.syncContext.named.time=30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the unit of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aether.syncContext.named.time.unit
by default is TimeUnit.SECONDS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aether.syncContext.named.time
already has a default of 30
, remove it or add the unit too to make it easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, I'm very happy to remove the download-maven-dependencies.sh
script. This unblocks some other work. Thanks again!
Last plugin that needs some love:
|
Pushed two more commits:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % some unrelated changes to undo
.github/actions/setup/action.yml
Outdated
@@ -3,16 +3,13 @@ description: "Verify checked out commits and setup Java" | |||
inputs: | |||
java-version: | |||
description: "Java version to setup" | |||
default: 21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert, irrelevant change
.github/actions/setup/action.yml
Outdated
cache: | ||
description: "Cache Maven repo (true/false/restore)" | ||
default: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert, irrelevant change
.github/workflows/ci.yml
Outdated
runs-on: ubuntu-latest | ||
needs: build-test-matrix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert, irrelevant change
.github/workflows/ci.yml
Outdated
@@ -937,6 +940,8 @@ jobs: | |||
echo "matrix=$(cat matrix.json)" >> $GITHUB_OUTPUT | |||
|
|||
pt: | |||
needs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert, irrelevant change
mvnw
Outdated
@@ -21,288 +21,219 @@ | |||
# ---------------------------------------------------------------------------- | |||
# Apache Maven Wrapper startup batch script, version 3.2.0 | |||
# | |||
# Required ENV vars: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this has changed? It's unrelated, please undo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maven Wrapper has several "flavors", and I personally prefer "only-script", see here https://maven.apache.org/wrapper/#usage-without-binary-jar
Naturally, all of those flavors have different mvnw/mvnw.cmd scripts. The "only-script" simply delegates to distro mvn/mvn.cmd script, and hence, supports full feature set that selected distro supports. The currently used wrapper is the "bin" one (has also a JAR file checked in, this PR removes that) that has several shortcomings (like https://issues.apache.org/jira/browse/MWRAPPER-110 etc).
Hence, in short: this PR changes Maven Wrapper type from "bin" to "only-script" and that has an additional "cost" of actual changes in mvn/mvnw.cmd scripts (as unlike in bin, they just delegate).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you extract this to a separate commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We tend to split changes into smaller, atomic commits (and we test that each commit separately compiles) and keep commit messages in sync with the actual commit content.
@cstamas please squash commits 1 and 3 together. 2 can be a separate one |
0559cc9
to
51416d1
Compare
Created #20504 for mvnw |
51416d1
to
5ba934f
Compare
Changes: * GH actions: remove "offline" stuff, no need to "prime local repository" either (go-offline and related removed) * removed takari-local-repository, instead using RRF + file locking + BF collector * mvnw changed to "script-only"
5ba934f
to
56a94ee
Compare
@cstamas mvnw merged |
@@ -97,7 +97,8 @@ jobs: | |||
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }} | |||
- uses: ./.github/actions/setup | |||
with: | |||
cleanup-node: true | |||
cache: 'restore' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like no job populates the cache anymore, all uses of ./.github/actions/setup
are done with cache: restore
.
@@ -18,14 +18,13 @@ env: | |||
# An envar that signals to tests we are executing in the CI environment | |||
CONTINUOUS_INTEGRATION: true | |||
# allow overriding Maven command | |||
MAVEN: ./mvnw --offline | |||
# maven.wagon.rto is in millis, defaults to 30m | |||
MAVEN_OPTS: "-Xmx512M -XX:+ExitOnOutOfMemoryError -Dmaven.wagon.rto=60000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why -Xmx512M -XX:+ExitOnOutOfMemoryError
was removed?
is this related to removal of the go-offline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MAVEN_GIB: "-P gib -Dgib.referenceBranch=refs/remotes/origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.event.repository.default_branch }}" | ||
MAVEN_TEST: "-B --strict-checksums -Dmaven.source.skip=true -Dair.check.skip-all --fail-at-end -P gib -Dgib.referenceBranch=refs/remotes/origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.event.repository.default_branch }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is --strict-checksums
no longer necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes from #20495 but removed "offline".
Changes: