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

x/build: trybots should rebase when testing #9858

Open
bradfitz opened this issue Feb 12, 2015 · 20 comments
Open

x/build: trybots should rebase when testing #9858

bradfitz opened this issue Feb 12, 2015 · 20 comments
Labels
Builders x/build issues (builders, bots, dashboards) Friction Nuisances that make good candidates for our "friction" fix-it weeks
Milestone

Comments

@bradfitz
Copy link
Contributor

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.

@minux
Copy link
Member

minux commented Feb 12, 2015 via email

@bradfitz
Copy link
Contributor Author

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.

@minux
Copy link
Member

minux commented Feb 12, 2015 via email

@bradfitz
Copy link
Contributor Author

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.

@minux
Copy link
Member

minux commented Feb 12, 2015 via email

@josharian
Copy link
Contributor

This'll need to respect the branch as well to keep trybot useful for release branch testing.

@bradfitz
Copy link
Contributor Author

@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?

@minux
Copy link
Member

minux commented Mar 8, 2015

Please see https://golang.org/cl/6802/ as an extreme example of why this
issue should be fixed.

All trybots are fine with that CL, but because the CL is not rebased to the
latest master, after submission, it fails all builds.

@minux
Copy link
Member

minux commented Mar 8, 2015

Sorry for the false alert. The problem I mentioned in the last comment is
caused by me running trybot on the wrong patch set. Will file a separate
issue.

Update: the actual reason is not me running on the wrong patch set.
It's because the auto-merge feature of Gerrit failed to merge the
change correctly. How could that be possible? (Note patch set 2 is created
by Gerrit, not by the author of the CL.)

So again, trybot should use rebase to test the patch in order to catch this
problem.

@minux
Copy link
Member

minux commented Mar 13, 2015

Trybot really should rebase before testing, two more cases:

  1. CL 7032 removes one argument to gc.Naddr, trybot passes, but
    the build breaks after it's submitted because master contains cmd/7g,
    but that CL is based on a commit before the introduction of 7g, so
    it doesn't change 7g.
  2. trybot reports failure for CL 7080 on nacl/amd64p32, however,
    that's because the CL is based on a commit before the nacl build fix.
    The trybot messages asks to see the build dashboard if the failure
    is a new one, and according to the dashboard, it's indeed a new
    failure, but actually it's not.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title build: trybots should rebase when testing x/build: trybots should rebase when testing Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the builder label Apr 14, 2015
@rsc
Copy link
Contributor

rsc commented Apr 29, 2015

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.

@minux
Copy link
Member

minux commented Apr 29, 2015 via email

@bradfitz
Copy link
Contributor Author

bradfitz commented Jun 9, 2015

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.

@dmitshur
Copy link
Contributor

dmitshur commented Feb 9, 2019

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

@bradfitz
Copy link
Contributor Author

bradfitz commented Feb 9, 2019

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).

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.

@randall77
Copy link
Contributor

I worry that if the trybot fails, all the line numbers in the error log will be wrong.
Rebasing moves your changes around and there's no way to correspond the errors back to the line numbers of code in your local client (except by syncing your client to the same point as the trybot did).

It won't happen super-often, but when it does it will be mightily confusing.

@bradfitz
Copy link
Contributor Author

@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.

@josharian
Copy link
Contributor

What if the trybots try the rebased tree first, and on failure, try the existing tree (on failed builders only)?

We'd probably need to have the bot upload the rebased tree to Gerrit.

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.

@bradfitz
Copy link
Contributor Author

By upload I didn't mean screwing with the owner's CL. Just creating a ref so people can pull it.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/170457 mentions this issue: cmd/coordinator: on trybot failure, mention that trybots don't rebase

gopherbot pushed a commit to golang/build that referenced this issue Apr 2, 2019
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]>
@dmitshur dmitshur added the Friction Nuisances that make good candidates for our "friction" fix-it weeks label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) Friction Nuisances that make good candidates for our "friction" fix-it weeks
Projects
None yet
Development

No branches or pull requests

7 participants