Page MenuHomePhabricator

Figure out how to maintain cv repo - given it is primarily committed to by non-WMF
Closed, ResolvedPublic

Description

We have a small utility called cv that comes from https://github.com/civicrm/cv and is deployed via the fundraising cv repo here https://gerrit.wikimedia.org/r/q/project:wikimedia/fundraising/cv

Our repo does not currently diverge from the upstream repo at all except for committing the vendor directory and the gerrit file. We do not expect much future variance - perhaps it could occur on a short term basis in future.

However, we are experiencing problems merging in from upstream commits - ie - it seems that either we need all of fr-tech to have forge-commiter permission on this repo or we need to give up the repo and install the .phar file (this would include the vendor directory in the phar - the only downside is there is no obvious way we could patch it if we wanted to)

Do you really want to submit the above commits?
Type 'yes' to confirm, other to cancel: yes
remote:
remote: Processing changes: refs: 1
remote: Processing changes: refs: 1, done
remote: ERROR: commit f075c1f: email address totten@civicrm.org is not registered in your account, and you lack 'forge committer' permission.
remote: The following addresses are currently registered:
remote: emcnaughton@wikimedia.org
remote: To register an email address, visit:
remote: https://gerrit.wikimedia.org/r/settings#EmailAddresses
remote:
remote:
To ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/cv.git
! [remote rejected] HEAD -> refs/for/master (commit f075c1f: invalid committer)
error: failed to push some refs to 'ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/cv.git'

@Dwisehaupt did the merge commit last time - probably with the extra permission

Details

Event Timeline

It looks like @Dwisehaupt just squashed everything into one commit (which we can do again if we wanted to), but it would be nice to keep the commit history.

If we want to just do a squashed commit again for now, there is one here: https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/cv/+/1275546

I got asked about this ticket at the Hackathon. We need to add "Forge Committer Identity" permission to the wikimedia-fundraising-cv group in Gerrit. https://www.mediawiki.org/wiki/Git/Creating_new_repositories says I need to edit the refs/*. But I lack sufficient understanding (or rather confidence?) to do this myself.

Change #1281817 had a related patch set uploaded (by Thcipriani; author: Thcipriani):

[wikimedia/fundraising/cv@refs/meta/config] Review access change

https://gerrit.wikimedia.org/r/1281817

I got asked about this ticket at the Hackathon. We need to add "Forge Committer Identity" permission to the wikimedia-fundraising-cv group in Gerrit. https://www.mediawiki.org/wiki/Git/Creating_new_repositories says I need to edit the refs/*. But I lack sufficient understanding (or rather confidence?) to do this myself.

Made a proposed commit just now to add "Forge Committer Identity" for all of the fundraising group: is that's what's desired here? +1's welcome: https://gerrit.wikimedia.org/r/1281817

Change #1281817 merged by Eileen:

[wikimedia/fundraising/cv@refs/meta/config] Review access change

https://gerrit.wikimedia.org/r/1281817

thanks heaps for that - it got us past the permission issue .... but .... is there a way of avoiding do git amend to get a change ID on every single commit - there are lots!

! [remote rejected] HEAD -> refs/for/master (commit f075c1f: missing Change-Id in message footer)
error: failed to push some refs to 'ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/cv.git'

It seems that I can push to cv now - by-passing gerrit stuff. I think this is appropriate to the way we work with this repo but obv someone else might have opinions...

I put the composer update in review though https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/cv/+/1285734

@Dwisehaupt I think we can update it now...

thanks heaps for that - it got us past the permission issue .... but .... is there a way of avoiding do git amend to get a change ID on every single commit - there are lots!

! [remote rejected] HEAD -> refs/for/master (commit f075c1f: missing Change-Id in message footer)
error: failed to push some refs to 'ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/cv.git'

If you push all the changes for review then the Change-Id is required—that's the unique identifier for patchsets in Gerrit. But if you directly push to the branch; i.e., git push origin HEAD:refs/heads/master (or git push origin master) instead of git push origin HEAD:refs/for/master, then you can bypass the requirement. If you push for review, you'll be rewriting the whole history anyway.

It seems that I can push to cv now - by-passing gerrit stuff. I think this is appropriate to the way we work with this repo but obv someone else might have opinions...

I put the composer update in review though https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/cv/+/1285734

@Dwisehaupt I think we can update it now...

I think if you're mirroring an upstream to gerrit, except for some changes you're making on top, then this makes sense. The other option, I suppose, is to make large merge commits and push those up for review.

XenoRyet set Final Story Points to 2.