Page MenuHomePhabricator

Cannot amend Gerrit changeset in MediaWiki Core repo (due to not being in addPatchSet?)
Closed, ResolvedPublic

Description

Need permission to push to core repo for gerrit username jpita .

I was able to push to contentTranslation but can't push to core
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/ContentTranslation/+/531473/

FYI @Arrbee and @zeljkofilipin

Event Timeline

Jpita created this task.Aug 21 2019, 11:57 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 21 2019, 11:57 AM

I was able to push to contentTranslation
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/ContentTranslation/+/531473/

I do not see any push in that link, just a patch proposed in Gerrit?

but can't push to core

What does that mean? That there is no "+2" button under "Reply..."? Or something else?

Also see https://phabricator.wikimedia.org/tag/mediawiki-gerrit-group-requests/

I do not see any push in that link, just a patch proposed in Gerrit?

I was able to create a branch and push code to contentTranslation

What does that mean? That there is no "+2" button under "Reply..."? Or something else?

I don't know what +2 is, I just want to be able to push code to a repo, at the moment when I try to git review on core I get

➜  core git:(review/zfilipin/T230729) git review
remote:
remote: Processing changes: refs: 1
remote: Processing changes: refs: 1, done
To ssh://gerrit.wikimedia.org:29418/mediawiki/core
 ! [remote rejected]       HEAD -> refs/for/master%topic=T230729 (cannot add patch set to 530914.)
error: failed to push some refs to 'ssh://jpita@gerrit.wikimedia.org:29418/mediawiki/core'
Aklapper added a comment.EditedWed, Aug 21, 10:24 PM

Note that https://www.mediawiki.org/wiki/Gerrit/Tutorial#Amending_a_change_.28your_own_or_someone_else.27s.29 asks to use git review -R for amending instead of git review. Looks like this is about amending and related to addPatchSet, hence changing task summary.

Aklapper renamed this task from Need permission to push to core repo to Cannot amend Gerrit changeset in MediaWiki Core repo (due to not being in addPatchSet?).Wed, Aug 21, 10:25 PM
hashar added a subscriber: hashar.

The ability to add a patchset is restricted in Gerrit. The configuration is done in All-Projects.git: https://gerrit.wikimedia.org/r/#/admin/projects/All-Projects,access which has:

Referencerefs/for/*
Add Patch Set[X] Exclusive
ALLOWAdministrators
ALLOWProject Owners
ALLOWTrusted-Contributors
ALLOWVandalFighters
ALLOWwmde

So one has to be a member of one of those groups to be able to add a patchset.

@Jpita is a member of:

$ ssh -p 29418 gerrit.wikimedia.org gerrit ls-groups --user Jpita
extension-CleanChanges
extension-ContentTranslation
language-team
LoginUsers

So we have to add the user to Trusted-Contributors which can be done at https://gerrit.wikimedia.org/r/#/admin/groups/1505,members

hashar closed this task as Resolved.Thu, Aug 22, 9:28 AM
hashar claimed this task.

Done by adding the user.

Note that TrustedContributor also includes the Gerrit mediawiki group https://gerrit.wikimedia.org/r/#/admin/groups/11,members . But that adds way more rights :]