-
Notifications
You must be signed in to change notification settings - Fork 133
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
[MRELEASE-1154] [REGRESSION] MRELEASE-1109 breaks release of Maven Su… #229
Conversation
…refire This reverts commit 9e0713b (MRELEASE-1109). This closes #229
* All Maven properties allowed to be referenced in parent versions via expressions | ||
* @see <a href="https://maven.apache.org/maven-ci-friendly.html">CI-Friendly Versions</a> | ||
*/ | ||
private static final List<String> CI_FRIENDLY_PROPERTIES = Arrays.asList("revision", "sha1", "changelist"); |
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.
Be aware that the list of supported properties is extensible
} | ||
} | ||
} else { | ||
if (CI_FRIENDLY_PROPERTIES.contains(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.
More than one property is supported here!
@laeubi You know that this is a revert? |
Yes I just wanted to point out problematic things in the current (now reverted) implementation that shows it is either incomplete i not even wrong in its current form. |
Any further insights what exactly causes the issue? https://issues.apache.org/jira/browse/MRELEASE-1154 does not even contain the full stack trace.... |
Just try to release Surefire, it will immediately fail. |
This is definitely open to discussion, but I'm thinking right now is that friendly should be static after the file models have been read. So CI-friendly versions can be handled by a transformer that would be called between the file model being read and the file model being validated. @michael-o could you briefly describe the two alternatives here ? |
It all started with: https://issues.apache.org/jira/browse/MRELEASE-1109 which causes https://issues.apache.org/jira/browse/MRELEASE-1151 and led to https://issues.apache.org/jira/browse/MRELEASE-1153. Now, I have discovered yet another regression https://issues.apache.org/jira/browse/MRELEASE-1154 which requires https://issues.apache.org/jira/browse/MRELEASE-1109 to reverted altogether because I was not able to release Maven Surefire. The alternative in #230 provided by @kwin simply warns about non-resolvable properties. I am not really sure whether this is the right way. I know for sure that the revert will restore the previous behavior, but will also the incomplete CI friendly support. I prefer no support rather than incomplete one. |
Tycho version plugin supports updating such properties with a little restriction that only one of them can be updated (usually the last part) that has to be a Number by default. e.g. if |
What's the use case for using multiple placeholders such as |
If you want to have multi part version where you can change each part individually see https://maven.apache.org/maven-ci-friendly.html --> "f you like to have more flexibility you can use a combination of the different properties like this" And project properties itself are also not allowed to contain any other things but need to be defined either in the parent or directly in the pom.
Not really at runtime, but can be set "from the outside" as for Jenkins so if you have a CI/CD-Pipeline that you don't need to change versions all time (in the SCM) but still can make sure they are unique to a build.
See above the benefit is that one can have multipart versions and each part can be given on the commandline and takes precedence over everything else regardless of lookup-order. |
I found some blogs that describe some usual use cases:
|
There is lots of issues mixed here in the discussion. Although MRELEASE-1109 only supports single expressions this can be extended innsome follow up PR. However I fail to see how not supporting even simple ci-friendly versions is better than supporting only simple versions. The regression regarding unresolveable properties is fixed by #230. I am happy to process any constructive feedback to #230. Just reverting is IMHO the worst solution. |
I'll get back to this next week. |
The alternative has been merged now. |
…refire
This reverts commit 9e0713b (MRELEASE-1109).
This closes #229
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MRELEASE-XXX] - Fixes bug in ApproximateQuantiles
,where you replace
MRELEASE-XXX
with the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean verify -Prun-its
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.