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-1455] [SPARK-3534] [Build] When possible, run SQL tests only. #2420

Closed
wants to merge 2 commits into from

Conversation

nchammas
Copy link
Contributor

If the only files changed are related to SQL, then only run the SQL tests.

This patch includes some cosmetic/maintainability refactoring. I would be more than happy to undo some of these changes if they are inappropriate.

We can accept this patch mostly as-is and address the immediate need documented in SPARK-3534, or we can keep it open until a satisfactory solution along the lines discussed here is reached.

Note: I had to hack this patch up to test it locally, so what I'm submitting here and what I tested are technically different.

Includes some cosmetic/maintainability refactoring.
@nchammas nchammas changed the title when possible, run SQL tests only [SPARK-1455] [SPARK-3534] [Build] When possible, run SQL tests only. Sep 17, 2014
@SparkQA
Copy link

SparkQA commented Sep 17, 2014

QA tests have started for PR 2420 at commit f9e23f6.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 17, 2014

QA tests have started for PR 2420 at commit db3fa2d.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 17, 2014

QA tests have finished for PR 2420 at commit f9e23f6.

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

@SparkQA
Copy link

SparkQA commented Sep 17, 2014

QA tests have finished for PR 2420 at commit db3fa2d.

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

@nchammas
Copy link
Contributor Author

cc @marmbrus @pwendell Dunno if you guys got notified via JIRA of this pull request or not.

@marmbrus
Copy link
Contributor

Yeah, thanks for working on this! :) What do you think about making a dummy commit in this PR that changes SQL to make sure everything tests as expected? You can commit, trigger jenkins, then revert.

In the past we've had bugs where we silently stop testing SQL and yet think everything is working.

@nchammas
Copy link
Contributor Author

Since dev/run-tests has also been modified, Jenkins will still run all the tests.

If you want, I can have the dummy SQL commit also temporarily hack dev/run-tests to ignore the change to itself in the diff. That should trigger the SQL tests only. Note, though, that we would also be changing the script that we're trying to test. :)

@marmbrus
Copy link
Contributor

oh hmmm, I guess its also okay to do a dummy follow up PR to make sure things are working.

@rxin do you have a second to look this over? I think its mostly changing code you wrote.

@rxin
Copy link
Contributor

rxin commented Sep 17, 2014

This looks good to me, but I'm not very good at reviewing bash code (who is?). I guess we can merge and watch closely the next few PRs to see if they are functioning properly.

At some point maybe we should consider writing these in Python instead of bash...

@nchammas
Copy link
Contributor Author

At some point maybe we should consider writing these in Python instead of bash...

Amen.

So shall we go the dummy commit route first, and then revert, merge, and watch closely?

@rxin
Copy link
Contributor

rxin commented Sep 17, 2014

What's the dummy route?

@nchammas
Copy link
Contributor Author

Dummy commit to change a SQL file and also hack dev/run-tests to ignore the changes to itself in the diff. That should trigger a SQL-only set of tests.

@rxin
Copy link
Contributor

rxin commented Sep 17, 2014

Yea that makes sense to me.

@nchammas
Copy link
Contributor Author

I'm not very good at reviewing bash code (who is?)

Dunno if that was a rhetorical question (I'm no expert by any means!), but @pwendell has reviewed some of my bash patches in the past.

@marmbrus
Copy link
Contributor

@pwendell @JoshRosen FYI, I'm going to merge this. I'll try and watch jenkins to see if anything breaks.

@asfgit asfgit closed this in 5044e49 Sep 17, 2014
@nchammas
Copy link
Contributor Author

Whoops! I was making a fix right now for a bug that I found in testing locally (and that I was going to confirm got fixed on Jenkins with the dummy commit.)

# QUESTION: Why doesn't 'yes "q"' work?
# QUESTION: Why doesn't 'grep -v -e "^\[info\] Resolving"' work?
echo -e "q\n" \
| sbt/sbt "$SBT_MAVEN_PROFILES_ARGS" "$SBT_MAVEN_TEST_ARGS" \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

$SBT_MAVEN_TEST_ARGS needs to be an array, otherwise this won't work as expected.

@nchammas
Copy link
Contributor Author

@marmbrus I just pushed a fix to nchammas:selective-testing for this issue, and I also have the dummy commits cooking locally. Could we somehow revert the merge and reopen this PR so I can test it out on Jenkins?

@marmbrus
Copy link
Contributor

Can you just make a follow up PR with the change? I don' think we have permission to reopen things and we can't roll back merges in apache only add new commits that revert them.

@nchammas
Copy link
Contributor Author

OK, will do!

asfgit pushed a commit that referenced this pull request Sep 17, 2014
Testing arguments to `sbt` need to be passed as an array, not a single, long string.

Fixes a bug introduced in #2420.

Author: Nicholas Chammas <[email protected]>

Closes #2437 from nchammas/selective-testing and squashes the following commits:

a9f9c1c [Nicholas Chammas] fix printing of sbt test arguments
cf57cbf [Nicholas Chammas] fix sbt test arguments
e33b978 [Nicholas Chammas] Merge pull request #2 from apache/master
0b47ca4 [Nicholas Chammas] Merge branch 'master' of github.com:nchammas/spark
8051486 [Nicholas Chammas] Merge pull request #1 from apache/master
03180a4 [Nicholas Chammas] Merge branch 'master' of github.com:nchammas/spark
d4c5f43 [Nicholas Chammas] Merge pull request #6 from apache/master
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.

4 participants