-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/build: trybots should rebase when testing #9858
Comments
We can always do git cherry-pick after git fetch the CL in trybot. Any
failures in merging is a build failure (the CL won't submit successfully
anyway)
Even if rebase the CL on gerrit, each time its author updates the CL, the
rebased patch set will be overwritten.
|
We could, except that the trybot doesn't use any git right now. It pulls tar.gz files from Gerrit of a commit. We don't even have the "git" command on the builders. |
Ahh, that makes the problem harder.
Could we add a patch primitive to the buildlet and send a patch for it to
apply on latest git master tarball?
We might be able to reuse golang.org/x/codereview/patch for that. But we
need to add fuzzy support to that package.
|
I wouldn't do anything to the buildlet for this. We could apply the patch using a new service in a Docker container under the coordinator, using real git and/or real patch, and then extract the resulting tarball to push to the buildlets, like normal. |
Yeah, that's better.
|
This'll need to respect the branch as well to keep trybot useful for release branch testing. |
@rsc says in email "Please keep using the exact commit. Thanks." Russ, can you elaborate on what you'd like to see long-term? Would it be useful to also try the commit cherry-picked on top of tip? |
Please see https://golang.org/cl/6802/ as an extreme example of why this All trybots are fine with that CL, but because the CL is not rebased to the |
Sorry for the false alert. The problem I mentioned in the last comment is Update: the actual reason is not me running on the wrong patch set. So again, trybot should use rebase to test the patch in order to catch this |
Trybot really should rebase before testing, two more cases:
|
Attempting to rebase completely breaks any testing of multi-CL changes, since the CL will be considered in isolation instead of the work that has come before. And at least some of us do pretty much nothing but multi-CL changes. In the case of a commit hash where the parent is on origin/master (so it's either the bottom of or not part of a multi-CL change) then rebasing would be fine. But it's very important not to rebase otherwise, unless somehow you rebase the entire sequence. |
git fetch origin
git rebase origin/master
will rebase the whole sequence. In fact, that's how you manually rebase
your multi-CL
series to latest master.
|
Okay, this is now much easier. We're now using our own Git rev -> .tar.gz server, so we can do things like this more easily, since we don't depend on Gerrit to generate the .tar.gz. |
This would've helped catch a problem in CL 161497, where the tests passed with an older commit as a parent, but started to fail after being rebased on latest master. If there are concerns with always rebasing in all trybot configurations, we can add just one extra configuration that tests on Linux while performing the rebase (similar to how we test subrepos on previous Go releases via additional trybot configurations). /cc @bradfitz @stamblerre |
That's a good place to start. But any +1 TryBot-Result vote would kinda need to expire once anything was submitted. Better than nothing, though. Or we could just focus our effort on a submit queue instead, letting bots do merging. |
I worry that if the trybot fails, all the line numbers in the error log will be wrong. It won't happen super-often, but when it does it will be mightily confusing. |
@randall77, agreed. We'd probably need to have the bot upload the rebased tree to Gerrit. Its failure message already includes the commit hash, so then you could check it out locally and find the line. |
What if the trybots try the rebased tree first, and on failure, try the existing tree (on failed builders only)?
This would be frustrating when working with a branch of changes, some perhaps unmailed. And my git fu is strong; for many this could lead to lots of support requests. |
By upload I didn't mean screwing with the owner's CL. Just creating a ref so people can pull it. |
Change https://golang.org/cl/170457 mentions this issue: |
Updates golang/go#19664 Updates golang/go#9858 Updates golang/go#30807 Change-Id: I378979e2745b4d34286a3a038161eb03148771e7 Reviewed-on: https://go-review.googlesource.com/c/build/+/170457 Reviewed-by: Dmitri Shuralyov <[email protected]>
Currently with the trybot code, if Go's master is A and we have pending CLs B and C on A, currently we test B-on-A and C-on-A, but then when B is merged, we're still testing C on A, instead of C-on-B.
We should do:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#rebase-change
... which will add a patch set to the change, rebased. It could get spammy, though. Shawn says "don't complain when you have patch set 85 on a trivial one line change". So maybe we want to be careful when we do it. Maybe only for auto-submit.
The text was updated successfully, but these errors were encountered: