[ 
https://issues.apache.org/jira/browse/FLINK-33301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17779085#comment-17779085
 ] 

Matthias Pohl commented on FLINK-33301:
---------------------------------------

I see where you're coming from. I feel like the check has a reasonable output 
to let the release manager immediately know what's wrong. There are no 
consequences for the release because the release manager could just adapt 
his/her configuration accordingly based on the error message and keep going 
(i.e. no need to go through code to understand what's the issue imho). But you 
could add the following call earlier on in the release documentation if you 
want to still do it:
{code}
$ mvn -q -Prelease -pl flink-annotations validate
{code}

It will generate the following output (if the wrong Maven and Java version is 
used):
{code} 
[ERROR] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed 
with message:
Detected Maven Version: 3.6.3 is not in the allowed range [3.8.6,3.8.6].
[ERROR] Rule 1: org.apache.maven.plugins.enforcer.RequireJavaVersion failed 
with message:
Detected JDK Version: 11.0.20 is not in the allowed range [1.8.0,1.8.1).
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-enforcer-plugin:3.1.0:enforce (enforce-maven) on 
project flink-annotations: Some Enforcer rules have failed. Look above for 
specific messages explaining why the rule failed. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
{code}

I am hesitant to do that because it adds one more location for documentation 
that doesn't bring much value to the process. But I understand that it's less 
distracting for the release manager if the process works flawlessly without 
interruptions.

> Add Java and Maven version checks in the bash script of Flink release process
> -----------------------------------------------------------------------------
>
>                 Key: FLINK-33301
>                 URL: https://issues.apache.org/jira/browse/FLINK-33301
>             Project: Flink
>          Issue Type: Bug
>          Components: Release System
>    Affects Versions: 1.18.0, 1.19.0
>            Reporter: Jing Ge
>            Assignee: Jing Ge
>            Priority: Minor
>              Labels: pull-request-available
>
> During the release, Flink requires specific version of Java and Maven[1]. It 
> makes sense to check those versions at the very beginning of some bash 
> scripts to let it fail fast and therefore improve the efficiency.
>  
> [1][https://lists.apache.org/thread/fbdl2w6wjmwk55y94ml91bpnhmh4rnm0|https://lists.apache.org/thread/fbdl2w6wjmwk55y94ml91bpnhmh4rnm0]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to