write code to import PRs from github and/or forgejo #22

Open
opened 2024-04-10 19:35:53 +00:00 by jade · 4 comments
Owner

We need to be able to import PR-shaped contributions from GitHub and forgejo. These would be strongly discouraged for larger changes requiring multiple commits, since the only way to maintain consistent state is that the entire PR is squashed into one CL.

This was planned verbally for a long while but didn't get written down and I am submitting this to make sure we remember this, since it is rather important for our release situation. It would be OK if it is initially manual but this needs to be automated eventually.

This process will exist to make smaller and one-off changes (that are already cheap review-wise) low-friction, while retaining the more-appropriate balance of contributor friction vs review friction of gerrit on larger changes.

We need to be able to import PR-shaped contributions from GitHub and forgejo. These would be strongly discouraged for larger changes requiring multiple commits, since the only way to maintain consistent state is that the entire PR is squashed into one CL. This was planned verbally for a long while but didn't get written down and I am submitting this to make sure we remember this, since it is rather important for our release situation. It would be OK if it is initially manual but this needs to be automated eventually. This process will exist to make smaller and one-off changes (that are already cheap review-wise) low-friction, while retaining the more-appropriate balance of contributor friction vs review friction of gerrit on larger changes.
jade added the
A-infra
label 2024-04-10 19:35:53 +00:00
jade added this to the Release engineering project 2024-04-10 19:35:53 +00:00
Owner

I agree that this is important.

I agree that this is important.
Author
Owner

https://go.dev/wiki/GerritBot

we could take this, but we'd have to make it also take from forgejo. probably wouldn't be that bad though.

https://go.dev/wiki/GerritBot we could take this, but we'd have to make it also take from forgejo. probably wouldn't be that bad though.
Author
Owner

f7368271cf/internal/ci

see also: https://github.com/golang/go/discussions/61182 https://github.com/golang/go/issues/21956#issuecomment-331353818

we definitely need to make small/medium changes still easy and accept those via gh/fj but large changes just have to go through Gerrit by some means in our::jade view.

it's possible to either import on accept or import on receive. import on accept is better for contributors who aren't using gerrit but requires review on GitHub/forgejo. import on receive is incredibly janky especially with respect to revisions over time, and in spite of go bot improvements is still forced to be somewhat jank by how it is.

https://github.com/cue-lang/cue/tree/f7368271cf1ac313bda133ff5720755b010e7df6/internal/ci see also: https://github.com/golang/go/discussions/61182 https://github.com/golang/go/issues/21956#issuecomment-331353818 we definitely need to make small/medium changes still easy and accept those via gh/fj but large changes just have to go through Gerrit by some means in our::jade view. it's possible to either import on accept or import on receive. import on accept is better for contributors who aren't using gerrit but requires review on GitHub/forgejo. import on receive is incredibly janky especially with respect to revisions over time, and in spite of go bot improvements is still forced to be somewhat jank by how it is.
Author
Owner

We have deferred actually doing anything at all about this until we receive PRs with any frequency. So far we have received (1), and I just cherry picked it into gerrit by hand.

We investigated the gerrit github plugin and we found that it creates one CL per commit, which is a non-starter for the commit unhygiene culture of GitHub, so we are rejecting that option. See: https://gerrit.googlesource.com/plugins/github/+/refs/heads/master/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestImportJob.java

We have deferred actually doing anything at all about this until we receive PRs with any frequency. So far we have received (1), and I just cherry picked it into gerrit by hand. We investigated the gerrit github plugin and we found that it creates one CL per commit, which is a non-starter for the commit unhygiene culture of GitHub, so we are rejecting that option. See: https://gerrit.googlesource.com/plugins/github/+/refs/heads/master/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestImportJob.java
Sign in to join this conversation.
No labels
A-infra
A-matrix
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/meta#22
No description provided.