Last modified: 2014-10-10 17:58:29 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 T50420, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48420 - Jenkins: Overhaul the phpcs macro
Jenkins: Overhaul the phpcs macro
Status: PATCH_TO_REVIEW
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
wmf-deployment
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 46500
  Show dependency treegraph
 
Reported: 2013-05-13 20:39 UTC by Antoine "hashar" Musso (WMF)
Modified: 2014-10-10 17:58 UTC (History)
6 users (show)

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


Attachments

Description Antoine "hashar" Musso (WMF) 2013-05-13 20:39:43 UTC
In Jenkins job builder, we currently have two macro for phpcs which can use some help.

phpcs-HEAD should rely on /var/lib/jenkins/bin/git-changed-in-head which let us specify the extensions we are interested in (php php5 inc sample).  Also it does not ignore the i18n files which takes a very long time: mwext-Translate-phpcs-HEAD takes a good 18 minutes (if not more): https://integration.wikimedia.org/ci/job/mwext-Translate-phpcs-HEAD/1283/
Comment 1 Gerrit Notification Bot 2013-05-13 20:43:31 UTC
Related URL: https://gerrit.wikimedia.org/r/63571 (Gerrit Change Ia3cbaddf698eac558d2390a4be5d8c0817bf6317)
Comment 2 Antoine "hashar" Musso (WMF) 2013-05-13 21:08:01 UTC
mwext-Translate-phpcs-HEAD is no more testing i18n files, making it REALLY faster: https://integration.wikimedia.org/ci/job/mwext-Translate-phpcs-HEAD/1286/console
Comment 3 Antoine "hashar" Musso (WMF) 2013-05-13 21:14:34 UTC
Deployed the i18n ignore for all extensions.
Comment 4 Krinkle 2013-06-03 20:04:08 UTC
Can this be marked as fixed now? I think this is good enough.
Comment 5 Antoine "hashar" Musso (WMF) 2013-06-04 13:56:39 UTC
Gerrit change #63571 added in the i18n.php fliter, I still have to adapt phpcs-HEAD macro to rely on /var/lib/jenkins/bin/git-changed-in-head instead of the huge shell script :)
Comment 6 Gerrit Notification Bot 2013-06-21 14:32:55 UTC
Related URL: https://gerrit.wikimedia.org/r/69863 (Gerrit Change I7862b0b628748f23fb29c063c3e530f60bbaa795)
Comment 7 Antoine "hashar" Musso (WMF) 2013-07-22 15:08:25 UTC
Lame matrix:


              par  files
head strict |    |  HEAD
head loose  | -n |   .

full strict |    |  HEAD
full loose  | -n |   .
Comment 8 Gerrit Notification Bot 2013-08-02 10:27:29 UTC
Change 77279 had a related patch set uploaded by Hashar:
run-phpcs-mw: wrapper around phpcs for CI needs

https://gerrit.wikimedia.org/r/77279
Comment 9 Antoine "hashar" Musso (WMF) 2013-08-02 10:33:31 UTC
Shell wrapper for the win :-]
Comment 10 Gerrit Notification Bot 2013-08-02 10:35:53 UTC
Change 77279 merged by Hashar:
run-phpcs-mw.sh: wrapper around phpcs for CI needs

https://gerrit.wikimedia.org/r/77279
Comment 11 Gerrit Notification Bot 2013-08-02 10:47:31 UTC
Change 77281 had a related patch set uploaded by Hashar:
new phpcs builder macros

https://gerrit.wikimedia.org/r/77281
Comment 12 Gerrit Notification Bot 2013-08-02 10:55:19 UTC
Change 77282 had a related patch set uploaded by Hashar:
new phpcs jobs for mw/ext/Translate

https://gerrit.wikimedia.org/r/77282
Comment 13 Gerrit Notification Bot 2013-08-02 10:57:58 UTC
Change 77283 had a related patch set uploaded by Hashar:
new phpcs jobs for mw/ext/Translate

https://gerrit.wikimedia.org/r/77283
Comment 14 Gerrit Notification Bot 2013-08-02 11:01:42 UTC
Change 77283 merged by jenkins-bot:
new phpcs jobs for mw/ext/Translate (non voting)

https://gerrit.wikimedia.org/r/77283
Comment 15 Antoine "hashar" Musso (WMF) 2013-08-02 11:05:22 UTC
An example run is https://gerrit.wikimedia.org/r/#/c/77284/
Comment 17 Gerrit Notification Bot 2013-08-02 11:14:41 UTC
Change 77281 merged by jenkins-bot:
new phpcs builders and job templates

https://gerrit.wikimedia.org/r/77281
Comment 18 Gerrit Notification Bot 2013-08-02 11:14:48 UTC
Change 77282 merged by jenkins-bot:
new phpcs jobs for mw/ext/Translate

https://gerrit.wikimedia.org/r/77282
Comment 19 Gerrit Notification Bot 2013-08-27 08:02:30 UTC
Change 81184 had a related patch set uploaded by Hashar:
new phpcs jobs for mediawiki/core (non voting)

https://gerrit.wikimedia.org/r/81184
Comment 20 Gerrit Notification Bot 2013-08-27 08:07:43 UTC
Change 81184 merged by jenkins-bot:
new phpcs jobs for mediawiki/core (non voting)

https://gerrit.wikimedia.org/r/81184
Comment 21 Antoine "hashar" Musso (WMF) 2013-08-27 08:18:03 UTC
I still have to get rid of the old macros in Jenkins Job Builder and to always ends up using the shell wrapper introduced by https://gerrit.wikimedia.org/r/77279
Comment 22 Antoine "hashar" Musso (WMF) 2013-09-29 11:47:20 UTC
Lowering priority, I am working on other things right now.
Comment 23 Siebrand Mazeland 2013-10-08 20:32:36 UTC
Translate extension now passes PHPCS strict since Gerrit change #88616. Will be made voting soon for Translate.

Use the following to ignore coding standards on for example false positives and lib files:

// @codingStandardsIgnoreStart
  [Code part that is ignored.
// @codingStandardsIgnoreStart

// @codingStandardsIgnoreFile Will ignore complete file.

More information at: http://pear.php.net/manual/en/package.php.php-codesniffer.advanced-usage.php
Comment 24 Greg Grossmeier 2014-07-15 20:23:29 UTC
Almost a year since Antoine has worked on this, unassigning.
Comment 25 Addshore 2014-08-11 17:03:42 UTC
Is there anything else to overhaul here?
It looks pretty good to me :) (although I might add a few more options in the coming weeks!
Comment 26 Antoine "hashar" Musso (WMF) 2014-08-12 19:43:07 UTC
I have kept this bug around as per Comment #21:

> I still have to get rid of the old macros in Jenkins Job Builder and to
> always ends up using the shell wrapper introduced by
> https://gerrit.wikimedia.org/r/77279

We have two different set of phpcs jobs.  The Jenkins Job builder config needs to be adjust for all repositories using the old set (the new one are the templates applied to Translate and have 'lenient' and 'strict').  Then adjust the Zuul triggers to reflect the change.


If strict pass (i.e. warning+errors), the lenient one (warning only) can be removed from Zuul configuration since it is redundant.
Comment 27 Gerrit Notification Bot 2014-09-20 23:30:46 UTC
Change 161763 had a related patch set uploaded by Jforrester:
Significantly simply phpcs job configuration

https://gerrit.wikimedia.org/r/161763
Comment 28 Gerrit Notification Bot 2014-09-21 02:50:06 UTC
Change 161757 had a related patch set uploaded by Krinkle:
Remove unused distinction between phpcs-strict and phpcs-lenient

https://gerrit.wikimedia.org/r/161757
Comment 29 Gerrit Notification Bot 2014-10-10 13:14:14 UTC
Change 161763 abandoned by Hashar:
Significantly simplify phpcs job configuration

Reason:
The continuous integration configuration files are now held in integration/config.git with Zuul layout files being under /zuul/layout.yaml

If there still is an interest in this patch, please port it to the new repository integration/config.git

https://gerrit.wikimedia.org/r/161763
Comment 30 Gerrit Notification Bot 2014-10-10 13:38:01 UTC
Change 161757 abandoned by Hashar:
Remove unused distinction between phpcs-strict and phpcs-lenient

Reason:
The continuous integration configuration files are now held in integration/config.git with JJB layout files being under /jjb/

If there still is an interest in this patch, please port it to the new repository integration/config.git

https://gerrit.wikimedia.org/r/161757
Comment 31 Gerrit Notification Bot 2014-10-10 17:58:29 UTC
Change 166071 had a related patch set uploaded by Jforrester:
Clean up phpcs usage, removing -strict/-lenient distinction

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

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


Navigation
Links