https://bugzilla.wikimedia.org/show_bug.cgi?id=60781

       Web browser: ---
            Bug ID: 60781
           Summary: Gerrit patchset-created event has been changed
           Product: Wikimedia
           Version: wmf-deployment
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Git/Gerrit
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
            Blocks: 60769
    Classification: Unclassified
   Mobile Platform: ---

When a patch is rebased via the Gerrit graphical interface, it sends an event
of type patchset-created to stream-events listener. The event has an uploader
field which used to be the person doing the action, since Gerrit 2.8.1 the
uploader field points to the patch author.

An example is change https://gerrit.wikimedia.org/r/#/c/109891/ . The change
has been authored and is owned by untrusted user Tinaj1234, hence tests are not
run.  I have rebased patchset 3 to trigger the tests did not get triggered.

Looking at Zuul debug log for Gerrit events, the change structure is roughly:

change:
  owner:
    name: Tinaj1234
    project: mediawiki/core
  patchset:
    author:
      name: Tinaj1234
    uploader:
      name: Tinaj1234
  type: patchset-created
  uploader:
    name: Tinaj1234

The uploader field should have pointed to myself, aka hashar.  That was the
behavior before our switch to Gerrit 2.8.1.


For each type of event we had a field representing the authenticated person
doing the action.  The corresponding map is:

  'patchset-created': 'uploader',
  'draft-published': 'uploader',  # Gerrit 2.5/2.6
  'change-abandoned': 'abandoner',
  'change-restored': 'restorer',
  'change-merged': 'submitter',
  'merge-failed': 'submitter',  # Gerrit 2.5/2.6
  'comment-added': 'author',
  'ref-updated': 'submitter',
  'reviewer-added': 'reviewer',  # Gerrit 2.5/2.6


Aka for the event type 'patchset-created', the account that have done the
action is mentioned in the 'uploader' field.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to