Uh oh!
There was an error while loading. Please reload this page.
[SPARK-8819] Fix build for maven 3.3.x - #7219
Conversation
andrewor14
commented
Jul 4, 2015
@pwendell@JoshRosen@srowen could you take a look? |
AmplabJenkins
commented
Jul 4, 2015
Merged build triggered. |
AmplabJenkins
commented
Jul 4, 2015
Merged build started. |
SparkQA
commented
Jul 4, 2015
Test build #36522 has started for PR 7219 at commit |
SparkQA
commented
Jul 4, 2015
Test build #36522 has finished for PR 7219 at commit
|
AmplabJenkins
commented
Jul 4, 2015
Merged build finished. Test PASSed. |
srowen
commented
Jul 4, 2015
I think this should also be a solution, yes. |
There was a problem hiding this comment.
Does this have transitive dependencies that might change the overall dependency graph for users of spark-core?
pwendell
commented
Jul 4, 2015
Hey @andrewor14 - I took a look at this. It seems, to me a bit weird to have Spark core dependend on Scalatest. This will affect all of our downstream applications, since they will also inherit the scalatest dependency, and that seems risky given that it has its own transitive dependencies (most of those are marked as
I am pretty hesitant to change compile dependencies around in 1.4.1 vs 1.4.0 - since we've typically not done this in a release. I also think it would be good not to have test dependencies as compile, if we can avoid it. |
srowen
commented
Jul 4, 2015
If this is just because |
pwendell
commented
Jul 4, 2015
Hey @srowen - there is more going on here. The issue is that there is actually a class called |
srowen
commented
Jul 4, 2015
Oh I get it, darn. Well, I vote for 2 then. This amounts to dodging the shade plugin bug where the cause doesn't have to come up anyway. The profile |
andrewor14
commented
Jul 4, 2015
Yeah, I completely agree it's a terrible idea to introduce scalatest as a core dependency. This patch goes against most of my own principles in software development and I would be very happy to change it. @pwendell is the idea with (2) that we use a maven version before 3.3.x during releases, and additionally pass in a |
andrewor14
commented
Jul 4, 2015
If so, sounds like the solution is to revert my revert at #7193 and add another profile that has its own maven shade plugin dependency. |
pwendell
commented
Jul 5, 2015
Hey @andrewor14 - sorry for the delay I didn't see this comment yesterday. I see - I didn't realize one thing - the maven version being used on jenkins is 3.1.X (that must be why it worked rather than the profiles). This is a little bit unfortunate because it means if we go with solution (2) then we'll need to reason about the version installed on Jenkins and if that gets upgraded things will fail. What about just doing (1) here and throwing our hands up and seeing if we can convince the maven project to make this fix, so that we can use this feature in the future? |
srowen
commented
Jul 5, 2015
(Why does option 2 not work with later Maven? I missed that part.) |
pwendell
commented
Jul 5, 2015
My understanding was this bug affects maven version 3.3 and later. I've never tried publishing the release with Maven 3.3, so I don't know whether we would still just hit this bug when the profile is enabled. |
srowen
commented
Jul 5, 2015
From the discussion I thought it was observed with 3.2 and 3.3, though I wasn't clear it was actually related to the Maven version. But even if so, option 2 should dodge this bug in the shade plugin wherever it occurs right? or will it then somehow make things not-work in older Maven? |
pwendell
commented
Jul 5, 2015
Hey sean - option 2 still enables the bug-causing option when we publish releases. So I think this means we may not be able to publish releases with maven 3.2 and 3.2. I'd prefer not to be tied to specific versions for publishing releases since it's a bit brittle. But maybe it would be okay for now. |
srowen
commented
Jul 5, 2015
Got it, I had in my head that somehow the release incantation was not affected by this. In the spirit of option 1 again then, is |
andrewor14
commented
Jul 5, 2015
@srowen I think the verdict for now is just to go with (2), which adds a special release profile, and if that doesn't work, we'll fallback to (1), which duplicates |
srowen
commented
Jul 5, 2015
OK sounds good. Good point about all of the things extending it. So you're saying option 2, plus, using some version of Maven that doesn't somehow trip on this issue? |
andrewor14
commented
Jul 5, 2015
Yes, I believe the plan is to restrict ourselves to use maven 3.2.x or before to do releases. |
AmplabJenkins
commented
Jul 5, 2015
Merged build triggered. |
AmplabJenkins
commented
Jul 5, 2015
Merged build started. |
SparkQA
commented
Jul 5, 2015
Test build #36550 has started for PR 7219 at commit |
There was a problem hiding this comment.
This is just reverting #7193. If we use this workaround it turns out we can just keep this dependency (like how we keep the other ones in GraphX, MLlib, Bagel...)
andrewor14
commented
Jul 5, 2015
@pwendell Please try this out. I have tested this with maven 3.3.3 and 3.2.1 with and without the new |
You should use this profile IFF you are making release AND you are using maven version 3.2.x or before. Otherwise, do not use this flag. For more detail see the inline comments. Conflicts: pom.xml
andrewor14
commented
Jul 6, 2015
AmplabJenkins
commented
Jul 6, 2015
Merged build triggered. |
AmplabJenkins
commented
Jul 6, 2015
Merged build started. |
AmplabJenkins
commented
Jul 6, 2015
Merged build finished. Test FAILed. |
andrewor14
commented
Jul 6, 2015
retest this please |
AmplabJenkins
commented
Jul 6, 2015
Merged build triggered. |
AmplabJenkins
commented
Jul 6, 2015
Merged build started. |
SparkQA
commented
Jul 6, 2015
Test build #36622 has started for PR 7219 at commit |
vanzin
commented
Jul 6, 2015
LGTM. Hopefully there'll be a release of the plugin soon. |
pwendell
commented
Jul 7, 2015
@vanzin thanks for helping with this |
SparkQA
commented
Jul 7, 2015
Test build #36622 has finished for PR 7219 at commit
|
AmplabJenkins
commented
Jul 7, 2015
Merged build finished. Test FAILed. |
andrewor14
commented
Jul 7, 2015
retest this please |
AmplabJenkins
commented
Jul 7, 2015
Merged build triggered. |
AmplabJenkins
commented
Jul 7, 2015
Merged build started. |
SparkQA
commented
Jul 7, 2015
Test build #36624 has started for PR 7219 at commit |
SparkQA
commented
Jul 7, 2015
Test build #36624 has finished for PR 7219 at commit
|
AmplabJenkins
commented
Jul 7, 2015
Merged build finished. Test PASSed. |
andrewor14
commented
Jul 7, 2015
OK, merging into master, 1.4 and 1.3. Thanks everyone for the reviews. |
This is a workaround for MSHADE-148, which leads to an infinite loop when building Spark with maven 3.3.x. This was originally caused by #6441, which added a bunch of test dependencies on the spark-core test module. Recently, it was revealed by #7193. This patch adds a `-Prelease` profile. If present, it will set `createDependencyReducedPom` to true. The consequences are: - If you are releasing Spark with this profile, you are fine as long as you use maven 3.2.x or before. - If you are releasing Spark without this profile, you will run into SPARK-8781. - If you are not releasing Spark but you are using this profile, you may run into SPARK-8819. - If you are not releasing Spark and you did not include this profile, you are fine. This is all documented in `pom.xml` and tested locally with both versions of maven. Author: Andrew Or <andrew@databricks.com> Closes#7219 from andrewor14/fix-maven-build and squashes the following commits: 1d37e87 [Andrew Or] Merge branch 'master' of github.com:apache/spark into fix-maven-build 3574ae4 [Andrew Or] Review comments f39199c [Andrew Or] Create a -Prelease profile that flags `createDependencyReducedPom` (cherry picked from commit 9eae5fa) Signed-off-by: Andrew Or <andrew@databricks.com>
This is a workaround for MSHADE-148, which leads to an infinite loop when building Spark with maven 3.3.x. This was originally caused by #6441, which added a bunch of test dependencies on the spark-core test module. Recently, it was revealed by #7193. This patch adds a `-Prelease` profile. If present, it will set `createDependencyReducedPom` to true. The consequences are: - If you are releasing Spark with this profile, you are fine as long as you use maven 3.2.x or before. - If you are releasing Spark without this profile, you will run into SPARK-8781. - If you are not releasing Spark but you are using this profile, you may run into SPARK-8819. - If you are not releasing Spark and you did not include this profile, you are fine. This is all documented in `pom.xml` and tested locally with both versions of maven. Author: Andrew Or <andrew@databricks.com> Closes#7219 from andrewor14/fix-maven-build and squashes the following commits: 1d37e87 [Andrew Or] Merge branch 'master' of github.com:apache/spark into fix-maven-build 3574ae4 [Andrew Or] Review comments f39199c [Andrew Or] Create a -Prelease profile that flags `createDependencyReducedPom` Conflicts: dev/create-release/create-release.sh pom.xml
…ved" This reverts commit 82cf331. Conflicts: pom.xml
srowen
commented
Jul 7, 2015
Agree that a separate module is a logically nice fix, but probably does have the circular dependency problem and introduce a whole new module for a few lines of code. I also saw @pwendell 's message about |
This is a workaround for MSHADE-148, which leads to an infinite loop when building Spark with maven 3.3.x. This was originally caused by #6441, which added a bunch of test dependencies on the spark-core test module. Recently, it was revealed by #7193.
This patch adds a
-Preleaseprofile. If present, it will setcreateDependencyReducedPomto true. The consequences are:This is all documented in
pom.xmland tested locally with both versions of maven.