Last modified: 2014-11-19 22:41:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48860, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46860 - Jenkins: Set up job in gate-and-submit to avoid submitting "DRAFT" or "WIP" commits
Jenkins: Set up job in gate-and-submit to avoid submitting "DRAFT" or "WIP" c...
Status: NEW
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
wmf-deployment
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 53405 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-03 21:02 UTC by Krinkle
Modified: 2014-11-19 22:41 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2013-04-03 21:02:42 UTC
The job will vote -1. But only in gate-and-submit, when working on it the tests should pass (or have this one be non-voting).
Comment 1 Antoine "hashar" Musso (WMF) 2013-04-10 07:08:25 UTC
I would prefer we do not rely on the commit summary having WIP or DRAFT in it, though we might warn about it.

OpenStack has a patch for Gerrit (might have been upstreamed), that let you flag a change has being a work in progress (see original feature request https://bugs.launchpad.net/openstack-ci/+bug/902953 ).


From Gerrit 2.5 release-notes, the drafts do not send patchset-created events so they should not trigger any job.  When they are published we have a new `draft-published`  event which is essentially the same as patchset-created.


I guess voting CodeReview +2 on a draft will thus send no event at all and the change will obviously never enter any pipeline.
Comment 2 Antoine "hashar" Musso (WMF) 2013-07-03 20:35:00 UTC
Looking at the dashboard of VisualEditor extension that makes a lot of sense :)

https://gerrit.wikimedia.org/r/#/projects/mediawiki/extensions/VisualEditor,dashboards/default

$ git-review -l|egrep '(WIP|MERGE)'
70560  master  [WIP] Language Inspector Prototype                          
71641  master  [DON'T MERGE] Remove 'mw-editsection-bracket' hack    
71285  master  [WIP] Do not allow to resize thumb image to be bigger than original file
70346  master  [DON'T MERGE] Rich Copy and Paste from External Source
69796  master  [DON'T MERGE] Rich paste from external sources         
71661  master  [WIP] ve.dm.Transaction: Implement newFromDocumentInsertion, take 2
70981  master  [WIP] Math Node UI
68615  master  [WIP] Source code editing
70171  master  [WIP] Math Node Matcher
69281  master  [WIP] Link surface fix for RTL
$
Comment 3 Antoine "hashar" Musso (WMF) 2013-08-28 06:41:31 UTC
*** Bug 53405 has been marked as a duplicate of this bug. ***
Comment 4 Antoine "hashar" Musso (WMF) 2014-05-19 14:59:06 UTC
Revisiting after a while: Zuul does not have support to prevent merge based on a the content of the commit message.

A possibility is to use Code-Review: -2 which will effectively prevent Gerrit from submitting the patch.

Another way would be to add a new label in Gerrit that would be used to flag a change has being in progress which would trigger the gate-and-submit when voted +1. Something like:

 Approval:
  +1 Approved
   0 Pending review
  -1 Work in progress

Timo thoughts? Or should we just abandon this idea?
Comment 5 C. Scott Ananian 2014-11-19 22:41:56 UTC
(In reply to Antoine "hashar" Musso (WMF) from comment #4)
> Revisiting after a while: Zuul does not have support to prevent merge based
> on a the content of the commit message.

Really?  The Jenkins jobs have a full git checkout, so presumably you could write a jenkins job for gate-and-submit that runs:

git log --oneline | head -1 | fgrep -q WIP

The actual test would be a little more complicated, since you'd want to be sure you were looking at the right side of a merge commit, but either HEAD^1 or HEAD^2 would name the actual patch you're committing in that case.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links