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

SPARK-9545, SPARK-9547: Use Maven in PRB if title contains "[test-maven]" #7878

Closed
wants to merge 16 commits into from

Conversation

pwendell
Copy link
Contributor

@pwendell pwendell commented Aug 2, 2015

This is just some small glue code to actually make use of the
AMPLAB_JENKINS_BUILD_TOOL switch. As far as I can tell, we actually
don't currently use the Maven support in the tool even though it exists.
This patch switches to Maven when the PR title contains "test-maven".

There are a few small other pieces of cleanup in the patch as well.

This is just some small glue code to actually make use of the
AMPLAB_JENKINS_BUILD_TOOL switch. As far as I can tell, we actually
don't currently use the Maven support in the tool. This patch
switches to Maven when the PR title contains "maven-test".

There are a few small other pieces of cleanup in the patch as well.
@pwendell
Copy link
Contributor Author

pwendell commented Aug 2, 2015

/cc @JoshRosen @srowen and @rxin for any thoughts on this.

@pwendell pwendell changed the title SPARK-9545: Use Maven in PRB if title contains "[maven-test]" SPARK-9545: Use Maven in PRB if title contains "[test-maven]" Aug 2, 2015
@rxin
Copy link
Contributor

rxin commented Aug 2, 2015

Can it be in the pull request description or the comments?

@pwendell
Copy link
Contributor Author

pwendell commented Aug 2, 2015

@rxin unfortunately neither of those is supported by the current PRB infrastructure. We only have access to a limited number of contextual variables set by the PRB plugin, and neither the description or comments are available.

@pwendell pwendell changed the title SPARK-9545: Use Maven in PRB if title contains "[test-maven]" SPARK-9545, SPARK-9547: Use Maven in PRB if title contains "[test-maven]" Aug 2, 2015
@pwendell
Copy link
Contributor Author

pwendell commented Aug 2, 2015

@rxin I've also just added support for triggering different hadoop version builds.

@SparkQA
Copy link

SparkQA commented Aug 2, 2015

Test build #39457 has finished for PR 7878 at commit a15f53c.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 2, 2015

Test build #39454 has finished for PR 7878 at commit 6184a00.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • public class JavaKMeansExample
    • class FreqSequence[Item](val sequence: Array[Array[Item]], val freq: Long) extends Serializable
    • class PrefixSpanModel[Item](val freqSequences: RDD[PrefixSpan.FreqSequence[Item]])
    • class SpecificSafeProjection extends $
    • case class FromUTCTimestamp(left: Expression, right: Expression)
    • case class ToUTCTimestamp(left: Expression, right: Expression)
    • case class DateDiff(endDate: Expression, startDate: Expression)
    • case class InitCap(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • public final class UnsafeKVExternalSorter

@SparkQA
Copy link

SparkQA commented Aug 2, 2015

Test build #39460 has finished for PR 7878 at commit e83b49f.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 2, 2015

Test build #39464 has finished for PR 7878 at commit 5d15d31.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • public class JavaKMeansExample
    • class FreqSequence[Item](val sequence: Array[Array[Item]], val freq: Long) extends Serializable
    • class PrefixSpanModel[Item](val freqSequences: RDD[PrefixSpan.FreqSequence[Item]])
    • class SpecificSafeProjection extends $
    • case class FromUTCTimestamp(left: Expression, right: Expression)
    • case class ToUTCTimestamp(left: Expression, right: Expression)
    • case class DateDiff(endDate: Expression, startDate: Expression)
    • case class InitCap(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • public final class UnsafeKVExternalSorter

@@ -231,7 +231,7 @@ def exec_maven(mvn_args=()):
"""Will call Maven in the current directory with the list of mvn_args passed
in and returns the subprocess for any further processing"""

run_cmd([os.path.join(SPARK_HOME, "build", "mvn")] + mvn_args)
run_cmd([os.path.join(SPARK_HOME, "build", "mvn")] + ["--force"] + mvn_args)
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically, the --force can be in the first list, but it doesn't really matter.

@JoshRosen
Copy link
Contributor

Just so that you're aware: the diff-dependent test selection logic is not currently implemented for Maven, so pull requests which specify Maven testing will cause all tests to be run.

@pwendell
Copy link
Contributor Author

pwendell commented Aug 2, 2015

Jenkins, retest this please.


cmd = ("/usr/sbin/lsof -P |grep %s | grep LISTEN "
"| awk '{ print $2; }' | xargs kill") % zinc_port
# TODO: Not sure what happens here if no process exists
Copy link
Contributor

Choose a reason for hiding this comment

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

On a non-zero exit code, run_cmd will print an error message and will call sys.exit(), so we may want to ensure that this always returns a zero exit code. If this is a concern, you could always just perform the underlying subprocess call yourself.

@pwendell
Copy link
Contributor Author

pwendell commented Aug 2, 2015

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Aug 2, 2015

Test build #39471 has finished for PR 7878 at commit 69dd9af.

  • This patch fails some tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@pwendell
Copy link
Contributor Author

pwendell commented Aug 2, 2015

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Aug 2, 2015

Test build #39468 has finished for PR 7878 at commit c77f951.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@pwendell
Copy link
Contributor Author

pwendell commented Aug 3, 2015

Jenkins, test this please.

@SparkQA
Copy link

SparkQA commented Aug 3, 2015

Test build #39475 has finished for PR 7878 at commit 0d3944a.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 3, 2015

Test build #39476 has finished for PR 7878 at commit 05d7720.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class FreqSequence[Item](val sequence: Array[Array[Item]], val freq: Long) extends Serializable
    • class PrefixSpanModel[Item](val freqSequences: RDD[PrefixSpan.FreqSequence[Item]])
    • public final class UnsafeKVExternalSorter

@pwendell
Copy link
Contributor Author

pwendell commented Aug 3, 2015

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Aug 3, 2015

Test build #39478 timed out for PR 7878 at commit 3d36d0a after a configured wait of 175m.

@SparkQA
Copy link

SparkQA commented Aug 3, 2015

Test build #39511 has finished for PR 7878 at commit 2e9edcc.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@JoshRosen
Copy link
Contributor

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Aug 3, 2015

Test build #39551 has finished for PR 7878 at commit 2e9edcc.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@pwendell
Copy link
Contributor Author

pwendell commented Aug 3, 2015

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Aug 4, 2015

Test build #39590 has finished for PR 7878 at commit 2e9edcc.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 4, 2015

Test build #39623 has finished for PR 7878 at commit 603f891.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 4, 2015

Test build #39645 has finished for PR 7878 at commit 87d4d19.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@pwendell
Copy link
Contributor Author

Jenkins, test this please.

@pwendell
Copy link
Contributor Author

Jenkins, test this please.

@SparkQA
Copy link

SparkQA commented Aug 28, 2015

Test build #41711 has finished for PR 7878 at commit cf58c49.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@pwendell
Copy link
Contributor Author

Jenkins, test this please.

@SparkQA
Copy link

SparkQA commented Aug 28, 2015

Test build #41726 has finished for PR 7878 at commit cf58c49.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@pwendell
Copy link
Contributor Author

Jenkins, test this please.

@pwendell
Copy link
Contributor Author

Okay this seems to be passing now - any thoughts @JoshRosen or @vanzin? IMO this would be really nice since we can test build changes with either build, before they make it into spark.

@SparkQA
Copy link

SparkQA commented Aug 28, 2015

Test build #41756 has finished for PR 7878 at commit cf58c49.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@vanzin
Copy link
Contributor

vanzin commented Aug 28, 2015

I think this is a good initial step; like Reynold, I'd prefer if this was read from the PR's description. Perhaps the code can be amended later to get the description using the github API and parsing it (and then you can get fancy with how to declare test parameters too).

Also, it seems like the script to merge prs won't clean up these test directives, right? That's more stuff to remember when merging PRs...

On the nits side:

  • your description says "maven-test" while the directive is "test-maven"
  • the actual code seems to match "test-maven", not "[test-maven]" as the PR title suggests.

But overall I'm fine with it, we can keep on improving this in later PRs.

"""
Get a randomized port on which to start Zinc
"""
return random.randrange(3030, 4030)
Copy link
Contributor

Choose a reason for hiding this comment

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

I hope this doesn't lead to builds failing because zinc can't bind to the chosen port.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This logic is identical to that hard coded in the bash scripts that run the maven builds, in the past they've never failed for this reason... but yeah it could happen.

@pwendell
Copy link
Contributor Author

Thanks for looking at this @vanzin. I do agree it would be a lot nicer to base things on comments, but because the comment stream isn't available as meta-data on jenkins, that's a huge amount of additional work that IMO is best left to an extension if someone is feeling interested. Given that it seems like you are cool to merge this for now as is, then look at evolving it more later.

@asfgit asfgit closed this in 35e896a Aug 31, 2015
JoshRosen added a commit to JoshRosen/spark that referenced this pull request Oct 18, 2015
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