-
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
Update maven wrapper 0.5.6
-> 3.1.0
#11387
Conversation
Please annotate flaky test failures. |
What are the changes between these version? |
@@ -199,6 +203,85 @@ if [ -z "$BASE_DIR" ]; then | |||
exit 1; | |||
fi | |||
|
|||
########################################################################################## | |||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
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 we bundle the jar as a part of this commit - do we still need to download them ? Or should we the jar that we have bundled ?
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.
No, we don't need to download a new jar.
From the first glance this is a dead code.
mvnw file is a dumb copy from
https://mvnrepository.com/artifact/org.apache.maven.wrapper/maven-wrapper-distribution/3.1.0
I don't think we want/need to tweak it.
I've updated commit message.
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 we point it to the source code location in github ?
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.
sure
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.
BTW how different is new maven-wrapper.jar from the one added in this PR - #9970
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've doublechecked, and seems this code is not that dead. I'll experiment with wrapperUrl
property.
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.
Ah, ok, it's still takes in effect only if the jar is not present.
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.
BTW how different is new maven-wrapper.jar from the one added in this PR - #9970
What are the changes between these version?
If I understand correctly the major thing is the donation of the maven wrapper to the apache foundation. Other changes were minor, but they could be quite subtle ones and it's cheaper to keep wrapper up to date.
apache/maven-wrapper@maven-wrapper-0.5.6...maven-wrapper-parent-3.1.0
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 we point it to the source code location in github ?
I've added a link to the gh repo to the commit message.
mvnw
file itself is generated during the build.
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ | ||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ | ||
"-Dmaven.home=${M2_HOME}" \ | ||
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ |
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.
nit: Can we move this to new 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.
No. #11387 (comment)
6c7c931
to
a2e1385
Compare
https://github.com/trinodb/trino/runs/5477229326?check_suite_focus=true
Let's wait for other builds: |
Please create a github issue for the flaky test and annotate it with |
a2e1385
to
ed09fbd
Compare
...lake/src/test/java/io/trino/plugin/deltalake/AbstractTestDeltaLakeCreateTableStatistics.java
Outdated
Show resolved
Hide resolved
@@ -199,6 +203,85 @@ if [ -z "$BASE_DIR" ]; then | |||
exit 1; | |||
fi | |||
|
|||
########################################################################################## | |||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
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.
Maybe we should remove the jar then?
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 don't have strong personal opinion.
If the maven-wrapper.jar is not present the version which should be downloaded is specified by wrapperUrl
in maven-wrapper.properties
.
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 is recommended by maven wrapper? We download maven anyway, so downloading one more jar is not a big deal.
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.
True, but I didn't find any best-practices regarding it.
The official documentation https://maven.apache.org/wrapper/ states
Usage without Binary JAR
By default, the Maven Wrapper JAR archive is added to the using project as small binary file .mvn/wrapper/maven-wrapper.jar. It is used to bootstrap the download and invocation of Maven from the wrapper shell scripts.
If your project is not allowed to contain binary files like this, you can configure your version control system to exclude checkin/commit of the wrapper jar.
If the JAR is not found to be available by the scripts they will attempt to download the file from the URL specified in .mvn/wrapper/maven-wrapper.properties under wrapperUrl and put it in place. The download is attempted via curl, wget and, as last resort, by compiling the ./mvn/wrapper/MavenWrapperDownloader.java file and executing the resulting class.
The mvnw
file itself has code
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
echo "Found .mvn/wrapper/maven-wrapper.jar"
else
...download...
Taking to the account all the above I'd say there is no such recommendation to remove maven-wrapper.jar
.
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.
Ok. Let's keep the verbose copy. It is part of the maven wrapper tool, so we should not change it. It is kind of accidental that it is bash.
mvnw copied from https://mvnrepository.com/artifact/org.apache.maven.wrapper/maven-wrapper-distribution/3.1.0 maven-wrapper.jar copied from https://mvnrepository.com/artifact/org.apache.maven.wrapper/maven-wrapper/3.1.0 Source code: https://github.com/apache/maven-wrapper `3.1.0` is the first version released after The Maven Wrapper has officially been released from the Apache Maven Project! `0.5.6` locations: https://github.com/takari/maven-wrapper https://mvnrepository.com/artifact/io.takari/maven-wrapper/0.5.6
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.
% comments
@@ -199,6 +203,85 @@ if [ -z "$BASE_DIR" ]; then | |||
exit 1; | |||
fi | |||
|
|||
########################################################################################## | |||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
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.
Ok. Let's keep the verbose copy. It is part of the maven wrapper tool, so we should not change it. It is kind of accidental that it is bash.
ed09fbd
to
1399ad6
Compare
@@ -12,9 +12,7 @@ jobs: | |||
- name: Checkout code | |||
uses: actions/checkout@v2 | |||
- name: Get milestone from pom.xml | |||
run: | | |||
.github/bin/retry ./mvnw -v |
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.
Retry here was to retry maven download in case of network issues.
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 don't believe this was the case here. It downloads only maven jar, without project dependencies.
Have you got an experience that maven jar download is not stable?
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.
Yes. That was a case in the past. Also "maven jar" consists of plenty of jars.
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.
Yes. That was a case in the past.
Interesting. We have much more artifacts to download from repo1.maven.org/maven2
and I could bet maven zip itself is not a bottle neck.
Also "maven jar" consists of plenty of jars.
But they are compressed to one file:
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
I'd leave these line removed If only you don't insist to revert a change.
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.
Assuming the network to be flaky is a better assumption that the other. Retries don't hurt, so we should keep it here IMO.
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.
2:1
.github/workflows/milestone.yml
Outdated
@@ -12,9 +12,7 @@ jobs: | |||
- name: Checkout code |
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.
Remove obsolete hotfix
-> this is very generic title, can you please have a bit more specific title?
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.
Do you mean commit message
or the title
itself of the commit message
?
If first, the title
is described in the body
of the commit message
.
if second - it's hard for me to find better laconic title.
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 mean the title of the commit message. I see it is described, but anyway better title would be good. Like Do not display maven version
.
BTW. Displaying maven version is also useful when diagnosing issues in CI.
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.
Do not display maven version
this is how
it was done, but not what
.
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've applied your comment.
8dc75e9
to
2fa6c29
Compare
All comments have been addressed. Please accept. |
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.
Do I understand correctly that mvnw doesn't log output when downloading if not present? (2nd commit).
LGTM % my confusion
Remove obsolete hotfix If maven is not downloaded for maven-wrapper, `./mvnw` downloads it with `org.apache.maven.wrapper.Installer`. `org.apache.maven.wrapper.Installer` in version `0.1.2-SNAPSHOT` which we had some day before (upgraded in 3e35fc4) logs to the standard output. The newest version of maven-wrapper.jar is `3.1.0` and it logs to log https://mvnrepository.com/artifact/org.apache.maven.wrapper/maven-wrapper To overcome this issue `./mvnw -v` construction was used to skip output before any actual `./mvnw` invocation which returned valuable text output.
2fa6c29
to
a079541
Compare
I've updated the commit message.
|
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.
Let me know, once CI is green.
mvnw copied from
https://mvnrepository.com/artifact/org.apache.maven.wrapper/maven-wrapper-distribution/3.1.0
maven-wrapper.jar copied from
https://mvnrepository.com/artifact/org.apache.maven.wrapper/maven-wrapper/3.1.0