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

coqbot should not add "needs: full ci" after trivial rebase #327

Open
andres-erbsen opened this issue Oct 29, 2024 · 6 comments
Open

coqbot should not add "needs: full ci" after trivial rebase #327

andres-erbsen opened this issue Oct 29, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@andres-erbsen
Copy link

coqbot should not add "needs: full ci" after trivial rebase. I've gotten used to gerrit allowing silent rebasing and it's so nice.

E.g. andres-erbsen force-pushed the ZModOffset branch from d02d498 to f98674d.

@ticket-tagger ticket-tagger bot added the enhancement New feature or request label Oct 29, 2024
@SkySkimmer
Copy link
Contributor

Not sure I agree.

Also how can coqbot recognize "trivial rebase"?

@JasonGross
Copy link
Member

I think the simplest change to make here is that a force push should only cancel an existing full ci run when a new full ci run is started. A new lite CI should not cancel an existing full CI.

A more involved criterion might be that a rebase is trivial if the generated coq binaries and compiled OCaml libraries are either all identical to the base of the PR or all identical to the pre-rebase state; and also all .vo files of the prelude / standard library are either all identical to the base of the PR or all identical to the pre-rebase state; and also that no development on the CI failed on the PR without a corresponding failure on both current master and the previous PR base.

@SkySkimmer
Copy link
Contributor

I think the simplest change to make here is that a force push should only cancel an existing full ci run when a new full ci run is started. A new lite CI should not cancel an existing full CI.

That sounds very risky, a force push can change anything.

A more involved criterion might be that a rebase is trivial if the generated coq binaries and compiled OCaml libraries are either all identical to the base of the PR or all identical to the pre-rebase state; and also all .vo files of the prelude / standard library are either all identical to the base of the PR or all identical to the pre-rebase state; and also that no development on the CI failed on the PR without a corresponding failure on both current master and the previous PR base.

That's not going to happen in the vast majority of cases so it's a waste of time trying to implement it.

@JasonGross
Copy link
Member

That sounds very risky, a force push can change anything.

It's not risky. A force push will still add "needs: full ci" and will still start a fresh lite CI. Perhaps coqbot can comment with the link to the existing/previous full CI run in progress. It is up to the devs what to do with that.

@andres-erbsen
Copy link
Author

andres-erbsen commented Nov 3, 2024

https://gerrit-review.googlesource.com/Documentation/config-labels.html

A new patch set is considered to be trivial rebase if the commit message is the same as in the previous patch set and if it has the same diff (including context lines) as the previous patch set. This is the case if the change was rebased onto a different parent and that rebase did not require git to perform any conflict resolution, or if the parent did not change at all (aka the change kind of the commit is NO_CHANGE).

This predicate can be used to enable sticky approvals, reducing turn-around for trivial rebases prior to submitting a change.

For the pre-installed Code-Review label this predicate is used by default.

@SkySkimmer
Copy link
Contributor

That sounds reasonable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants