-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[minor] [sql] Partial revert of e683182c3e. #6243
Conversation
Moving this file to a different module breaks the maven build; because it exposes a Guava type in an API used from a different module, unit tests that end up calling into this code will fail because Guava is shaded in the maven build.
/cc @rxin |
Merged build triggered. |
Merged build started. |
Test build #33016 has started for PR 6243 at commit |
Test build #33016 has finished for PR 6243 at commit
|
Merged build finished. Test FAILed. |
Test FAILed. |
/cc @yhuai as well. |
Jenkins, retest this please. |
Merged build triggered. |
Merged build started. |
Test build #33018 has started for PR 6243 at commit |
@vanzin @JoshRosen I was looking at the master maven builds and it appears that they have been passing for a few days (until today, but that's caused by a separate build break #6244): https://amplab.cs.berkeley.edu/jenkins/job/Spark-Master-Maven-pre-YARN/ even though e683182 was merged 5 days ago. Could you point me to specific instance where this causes a build break / test failure? |
Do those builds run unit tests? The issue is when you run the spark-sql unit tests; unit tests are run against the unshaded classes, so |
Actually, after writing that, it's a little weird that it compiles at all; but I did run into the unit test issue. Let me clean up my local env and try again. (With that whole change reverted, things work fine locally.) |
@andrewor14, maybe this is caused by that issue where the master Maven build didn't run SQL tests on every commit? We should prioritize merging #5955 to fix this. |
@JoshRosen that PR seems to be for sbt only? (IIRC the |
Here's what I ran into:
|
@andrewor14 if maven builds are currently not running spark-sql tests, then yes, pushing that PR will cause builds to fail, and this one should fix that. |
@vanzin I checked https://amplab.cs.berkeley.edu/jenkins/job/Spark-Master-Maven-pre-YARN/2393/hadoop.version=2.0.0-mr1-cdh4.1.2,label=centos/consoleFull. I found
Any idea on the reason that this test passed in jenkins? |
Test build #33018 has finished for PR 6243 at commit
|
Merged build finished. Test FAILed. |
Test FAILed. |
@yhuai that's interesting. I don't have a good explanation. I'm trying to reproduce that locally to see if I missed something. The only difference I can see is that jenkins is running |
So, the only explanation I have is: I checked by running That would actually imply that the maven builds are technically broken. Tests are being run against some random artifact that is under the jenkins account's home dir, not against what was just built. IMO the correct way to do things would be to have a per-build local repository and use |
(Update: I checked |
For those curious, the compilation thing seems to be something super weird with scalac. This code compiles fine:
While the following java code:
Fails with the expected error:
Perhaps it has something to do with the fact that we're using a technically illegal package name for the shaded classes ( |
test this please |
Merged build triggered. |
Merged build started. |
Test build #33115 has started for PR 6243 at commit |
Test build #33115 has finished for PR 6243 at commit
|
Merged build finished. Test PASSed. |
Test PASSed. |
Are we sure that it was changing the package that broke this? Is it possible that the maven shading plugin is not playing nicely with the scala compiler? Either way, I'm okay with this change if it solves the problem. |
Not changing of the package, but changing of the module where the file resides. That's what causes shading to get between SQLContext tests and their use of JavaTypeInference. |
Ah, thanks for explaining. I'm still okay with this if we don't have any other ideas about how to fix it. |
So, can we push this? Or does anyone have a better idea of how to fix it? |
I'm going to commit this soon if there are no further comments. |
I'm still confused. Is our Jenkins maven build broken? If not, what builds are broken? Is this related to the "catalyst" module, or the package name? If it is about package name, I think it is better to put this in core's catalyst module. |
Any build that does "mvn install" followed by "mvn test" is broken. Try for yourself. As I explained above, the problem is the file living in a different module - as in a different project in the tree. It has nothing to do with the package name. See how the file is being moved - I just placed it where it lived before, which was under a different package. |
Thanks - does this mean shading for "catalyst" module is broken? |
BTW if we want to merge this, let's create a catalyst package in core for now and move that there. |
(And don't we need to update Jenkins to make sure it is running the appropriate tests?) |
No, it just means that you cannot expose inter-module APIs that expose shaded classes without breaking things. As for the package, it sounds weird to create a Regarding the maven build, I don't know. Everything I tried locally did not work, so if something works in jenkins here, it sure to me sounds like something might be broken in its setup. |
Thanks for the explanation. Then this pull request should fix the problem right? #6431 |
Yes, that should achieve the same thing. I'll close this one then. |
This should also close #6243. Author: Reynold Xin <[email protected]> Closes #6431 from rxin/JavaTypeInference-guava and squashes the following commits: e58df3c [Reynold Xin] Removed Gauva dependency from JavaTypeInference's type signature.
This should also close #6243. Author: Reynold Xin <[email protected]> Closes #6431 from rxin/JavaTypeInference-guava and squashes the following commits: e58df3c [Reynold Xin] Removed Gauva dependency from JavaTypeInference's type signature. (cherry picked from commit 6fec1a9) Signed-off-by: Reynold Xin <[email protected]>
This should also close apache#6243. Author: Reynold Xin <[email protected]> Closes apache#6431 from rxin/JavaTypeInference-guava and squashes the following commits: e58df3c [Reynold Xin] Removed Gauva dependency from JavaTypeInference's type signature.
This should also close apache#6243. Author: Reynold Xin <[email protected]> Closes apache#6431 from rxin/JavaTypeInference-guava and squashes the following commits: e58df3c [Reynold Xin] Removed Gauva dependency from JavaTypeInference's type signature.
Moving this file to a different module breaks the maven build; because it
exposes a Guava type in an API used from a different module, unit tests
that end up calling into this code will fail because Guava is shaded in
the maven build.