-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[WIP][SPARK-7018][Build]: Refactor dev/run-tests-jenkins into Python #7401
Conversation
Sweet, thanks for submitting this! I'm going to take a quick pass through it now and will loop back later for more feedback. |
@@ -19,3 +19,14 @@ | |||
|
|||
SPARK_HOME = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../")) | |||
USER_HOME = os.environ.get("HOME") | |||
ERROR_CODES = { "BLOCK_GENERAL" : 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: the problem with putting the first element of the dict on the same line as the opening {
is that the indentation of all of the other elements is dependent on the variable name. If we were to rename ERROR_CODES
to something else then all of the indentation would have to change. Instead, I'd move BLOCK_GENERAL
to the next line and just indent the elements four spaces.
print(*args, file=sys.stderr) | ||
|
||
|
||
def post_message(mssg, comments_url): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name is ambiguous; I'd name this something like "post_comment_to_github".
mssg
is also a bit of an odd variable name; can we just do msg
instead?
Also, what's commments_url
? Could you pass in the pull request number and use this to construct the URL instead?
Can you add |
# must be less than the timeout configured on Jenkins (currently 180m) | ||
tests_timeout = "175m" | ||
|
||
# Array to capture all tests to run on the pull request. These tests are held under the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment seems misplaced, since this array holds test names, not test results.
I left a pass of comments. I think it would be good to try to move more of the code into Python and to only shell out to external scripts when running PR checks, unit tests, or when performing Git commands. Things like globbing files or sending HTTP requests should be done using Python standard libraries. I think there are also a number of small bugs that will prevent this from running correctly as-is. I found a number of these by running the |
I'm ooo today and can check tomorrow
|
jenkins retest this please |
Test build #137 has started for PR 7401 at commit |
Test build #38716 has started for PR 7401 at commit |
Just a head's up: given that we're in the middle of the 1.5.0 deadline crunch I don't think that we can afford to risk build breaks due to infra changes right now. As a result, I think that we might want to hold off on merging this for a week. Just wanted to let you know so that you don't burn a ton of cycles working on this only to have us delay further. Note, though, that it's unlikely that we'll merge other changes to the build infra, so hopefully the risk of conflicts will be somewhat minimal. |
print_err(" > data: %s" % posted_message) | ||
|
||
|
||
def send_archived_logs(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI we no longer need this feature and are going to remove it. Just commenting here so that it's not accidentally re-added as part of this PR.
@brennonyork Could you fix the conflict, hopefully we can merge it this week. |
It looks like the main source of conflict is #7883, so we'll have to port those changes to this script. |
Hey guys, sorry I've been away from this recently, been busy with some other things. I'll get the merge conflicts fixed and fix a few other things done here shortly. |
jenkins, retest this please |
Test build #43861 has finished for PR 7401 at commit
|
jenkins, retest this please |
Test build #43887 has finished for PR 7401 at commit
|
|
||
# format: http://linux.die.net/man/1/timeout | ||
# must be less than the timeout configured on Jenkins (currently 180m) | ||
tests_timeout = "175m" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This number has been bumped up recently:
# must be less than the timeout configured on Jenkins (currently 300m)
TESTS_TIMEOUT="250m"
Hey @brennonyork, thanks for updating. I think this is really close to being merged. The final thing that I'm going to check is that the changes from #7878 are here, too (sorry for missing that one earlier). |
# The merge-base of this and master in the case of a clean merge is the most recent commit | ||
# against master. | ||
ghprb_pull_id = os.environ["ghprbPullId"] | ||
ghprb_actual_commit = os.environ["ghprbActualCommit"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To preserve the changes from #7878, I think that we need to store the PR title here...
https://github.com/apache/spark/pull/7878/files#diff-c33fd29dc79bfbfd375ef84df36e82df
I'd like to play around with this a bit myself, so I'm going to open a new PR containing your code, then perform the final edits that I suggested above. This looks good to me overall, so I'm going to see if I can just perform the edit steps required to get it merged today (I'm aiming to get this in on a weekend day when Jenkins is a little less busy, so that any build-breaks or problems which might come up have less impact). |
@JoshRosen not a problem and completely understand on getting this merged this weekend. Let me know if you need any help from here. |
Cool, thanks. I've opened #9161 so that I can test out a few things (injecting style failures in R, trying the Maven pull request builder feature, etc.). Thanks for being so patient with this; this refactoring is going to unlock a lot of other nice tooling improvements. |
First draft, and WIP, of the refactoring of the
run-tests-jenkins
script into Python. Currently a few things are left out that, could and I think should, be smaller JIRA's after this.CURRENT_BLOCK
). I might get around to fixing this one in lieu of everything else, but wanted to point that out.Still a WIP now, but would love to get initial rounds of feedback as we iterate on this / test with Jenkins.