Skip to content
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

ZOOKEEPER-3797 Conflict between fatjar and full-build Maven profiles #1323

Closed
wants to merge 6 commits into from

Conversation

eolivelli
Copy link
Contributor

Enable fatjar module in full-build profile.
This is a fix only for branch-3.6, on master branch maven structure is changing, there is no need for this fix

@eolivelli
Copy link
Contributor Author

@symat @nkalmar @ctubbsii PTAL
I really want to unblock the 3.6.1 release as soon as possible
thanks in advance

This is the minimal fix I can image in order to make the 3.6.1 release.
We are changing Maven module structure in 3.7.0 so no need to complicate things in 3.6

Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Changes looks good. The question from my side it about version number. Why this branch has a version number 3.6.2-SNAPSHOT and targets for 3.6.1 release? Could you point it out to me the release progress?

@@ -258,6 +258,7 @@
<profile>
<id>full-build</id>
<modules>
<module>zookeeper-it</module>
Copy link
Member

Choose a reason for hiding this comment

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

What the reason of this change? It seems a change we should cheery pick for master.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because fatjar needs it.
master branch is differentf from branch-3.6

@eolivelli
Copy link
Contributor Author

we have now branch release-3.6.1 for 3.6.1 release.
This is our way.
We cut a release branch when we start the release process.
Then the release manager handles the release branch, but the main branch for 3.6 release version is open for new commits and it has 3.6.2-SNAPSHOT version

@eolivelli
Copy link
Contributor Author

thank you @tisonkun

@eolivelli
Copy link
Contributor Author

retest this please

@eolivelli
Copy link
Contributor Author

it looks like maven build does not start on CI
but the ANT build started but there is not ANT build.xml in branch-3.6

Copy link
Member

@ctubbsii ctubbsii left a comment

Choose a reason for hiding this comment

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

+1 to the changes so far, but you'll need to also include -Pfull-build in the <preparationGoals> and <completionGoals> for the maven-release-plugin configuration if you want to activate all modules for pom version updates during release:prepare. (See my similar changes on #1314 )

Note: if this PR gets applied before #1314, I'll update #1314 to align with whatever was decided in this PR.

@eolivelli
Copy link
Contributor Author

We are using preparationGoals only in order to fix c client files.

@ctubbsii
Copy link
Member

We are using preparationGoals only in order to fix c client files.

I'm not sure I understand this comment. maven-release-plugin updates the POM versions during release:prepare. Will release:prepare update the versions of all modules without specifying -Pfull-build in <preparationGoals>?

@eolivelli
Copy link
Contributor Author

AFAIK preparationGoals and completion goals are additional goals to execute in different steps of the procedure.

The current procedure works well and modifies the files on the c client that are not handled by Maven.

I think there is no need to change.
I will add a comment on your patch on the master branch

@ctubbsii
Copy link
Member

Okay, the part where I was confused is how to activate all the modules during version-bumping when release:prepare runs. Apparently the way to activate this would be mvn -Pfull-build release:prepare, rather than add it to <preparationGoals>.

I've never run a Maven project where all modules weren't activated by default, so I was a little confused on how to deal with that for releases.

You will still need to fix the project parent version in zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml and zookeeper-it/pom.xml so it matches the rest of the project.

@eolivelli
Copy link
Contributor Author

@ctubbsii I have another problem.
The zookeeper-it module needs fatjar in order to run but fatjar needs zookeeper-it to be built.
This is very annoying, it is a circular dependency
I am going to add skipTests in zookeeper-it in case of "full-build"

@eolivelli
Copy link
Contributor Author

With this change I am able to run the full build with -Dfull-build, skipping tests of contrib and zookeeper-it

@anmolnar @nkalmar @symat or any other commmiters PTAL

I feel the review of @ctubbsii and @tisonkun are very useful and maybe they are enough to commit this patch

Comment on lines 39 to 48
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
Copy link
Member

Choose a reason for hiding this comment

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

This can be shorter.

Suggested change
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<skipTests>true</skipTests>
</properties>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thank you @ctubbsii

@eolivelli
Copy link
Contributor Author

Spotbugs failed

Comment on lines +40 to +41
<skipTests>true</skipTests>
<spotbugs.skip>true</spotbugs.skip>
Copy link
Member

Choose a reason for hiding this comment

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

Lesson learned from #1314 : you might need to skip checkstyle, too.

Suggested change
<skipTests>true</skipTests>
<spotbugs.skip>true</spotbugs.skip>
<checkstyle.skip>true</checkstyle.skip>
<skipTests>true</skipTests>
<spotbugs.skip>true</spotbugs.skip>

@eolivelli
Copy link
Contributor Author

the precommit job will run someday :-)
there is a huge queue
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build-maven/

@eolivelli
Copy link
Contributor Author

Build completed with success.

@breed
Copy link
Contributor

breed commented Apr 18, 2020

+1 nice work everyone!

@breed
Copy link
Contributor

breed commented Apr 18, 2020

per the bylaws, http://zookeeper.apache.org/bylaws.html, it looks like we can't get this in until Monday evening since we have to allow 1 business day for voting :'( this is a pretty simple patch, do we have precedent for pushing release changes faster? @fpj @phunt

@phunt
Copy link
Contributor

phunt commented Apr 18, 2020

I believe the intent is to ensure there is sufficient time for more than just committer/reviewer to take a look before something is committed. This is a bug fix that a number of folks have already commented on, that I don't think would be controversial? I think there has been precedent in the past for such things.

@eolivelli
Copy link
Contributor Author

@breed I would add that this patch does not touch zk internals, no risks. It is only build boilerplate.

Thank you @breed @phunt

asfgit pushed a commit that referenced this pull request Apr 18, 2020
Enable fatjar module in full-build profile.
This is a fix only for branch-3.6, on master branch maven structure is changing, there is no need for this fix

Author: Enrico Olivelli <eolivelli@apache.org>

Reviewers: phunt@apache.org, breed@apache.org

Closes #1323 from eolivelli/fix/ZOOKEEPER-3797 and squashes the following commits:

6dc3270 [Enrico Olivelli] skip checkstyle
1cff2ff [Enrico Olivelli] skip spotbugs
19a8699 [Enrico Olivelli] simplify skipTests
e488119 [Enrico Olivelli] skip tests in zookeeper-it
3d6dc50 [Enrico Olivelli] enable zookeeper-it
940aec8 [Enrico Olivelli] ZOOKEEPER-3797 Conflict between fatjar and full-build Maven profiles in branch-3.6

Change-Id: Ifbfc6d1ac63a9eeab399a1fcd575b81185b36fc3
asfgit pushed a commit that referenced this pull request Apr 18, 2020
Enable fatjar module in full-build profile.
This is a fix only for branch-3.6, on master branch maven structure is changing, there is no need for this fix

Author: Enrico Olivelli <eolivelli@apache.org>

Reviewers: phunt@apache.org, breed@apache.org

Closes #1323 from eolivelli/fix/ZOOKEEPER-3797 and squashes the following commits:

6dc3270 [Enrico Olivelli] skip checkstyle
1cff2ff [Enrico Olivelli] skip spotbugs
19a8699 [Enrico Olivelli] simplify skipTests
e488119 [Enrico Olivelli] skip tests in zookeeper-it
3d6dc50 [Enrico Olivelli] enable zookeeper-it
940aec8 [Enrico Olivelli] ZOOKEEPER-3797 Conflict between fatjar and full-build Maven profiles in branch-3.6

Change-Id: Ifbfc6d1ac63a9eeab399a1fcd575b81185b36fc3
(cherry picked from commit c5b4c23)
Signed-off-by: Patrick Hunt <phunt@apache.org>
@phunt
Copy link
Contributor

phunt commented Apr 18, 2020

+1, basic testing worked for me (reg/full builds), merged onto branch-3.6 and release-3.6.1 branches.

Thanks all!

@phunt phunt closed this Apr 18, 2020
@breed
Copy link
Contributor

breed commented Apr 18, 2020

thank you @phunt !

@breed
Copy link
Contributor

breed commented Apr 18, 2020

and thank you @eolivelli, @tisonkun, and @ctubbsii for resolving this so quickly!

fadhilkurnia pushed a commit to fadhilkurnia/zookeeper that referenced this pull request Nov 2, 2020
Enable fatjar module in full-build profile.
This is a fix only for branch-3.6, on master branch maven structure is changing, there is no need for this fix

Author: Enrico Olivelli <eolivelli@apache.org>

Reviewers: phunt@apache.org, breed@apache.org

Closes apache#1323 from eolivelli/fix/ZOOKEEPER-3797 and squashes the following commits:

6dc3270 [Enrico Olivelli] skip checkstyle
1cff2ff [Enrico Olivelli] skip spotbugs
19a8699 [Enrico Olivelli] simplify skipTests
e488119 [Enrico Olivelli] skip tests in zookeeper-it
3d6dc50 [Enrico Olivelli] enable zookeeper-it
940aec8 [Enrico Olivelli] ZOOKEEPER-3797 Conflict between fatjar and full-build Maven profiles in branch-3.6

Change-Id: Ifbfc6d1ac63a9eeab399a1fcd575b81185b36fc3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants