Page MenuHomePhabricator

Deprecate global CodeSniffer rules repo
Closed, ResolvedPublic

Description

Gerrit 127863 was merged 48 hours ago, but the test runners are still using an older rule set, as is clear from https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs-strict-HEAD/9608/console on gerrit 129442.

Please make the CodeSniffer rule set update automatically on machines running tests.

The jobs are being deleted with T90943: Convert existing legacy phpcs jobs to use composer entry point + versioning. One completed, we can get rid of the old .git repo.

Details

Reference
bz64371

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:17 AM
bzimport set Reference to bz64371.
bzimport added a subscriber: Unknown Object (MLST).
siebrand created this task.Apr 24 2014, 4:15 PM

As I stated on the Gerrit change:

[..]. Whenever this is merged, one will have to update the related submodule in integration/jenkins.git (path: tools/mwcodesniffer ).

Then use git-deploy on tin.eqiad.wmnet to refresh integration/jenkins.git on the production servers in /srv/deployment/integration/slave-scripts

demon added a comment.Apr 24 2014, 8:32 PM

I did do that.

Bah the job uses a different git-deploy target sorry. phpcs has for option:

--standard=/srv/deployment/integration/mediawiki-tools-codesniffer/MediaWiki

Should probably remove the submodule from integration/jenkins.git if it is not used :)

I have refreshed the minions, that should fix the issue.

git-deploy log:

hashar@tin:/srv/deployment/integration/mediawiki-tools-codesniffer$ git deploy start
giDeployment started.
hashar@tin:/srv/deployment/integration/mediawiki-tools-codesniffer$ git pull
remote: Counting objects: 11, done
remote: Finding sources: 100% (4/4)
remote: Getting sizes: 100% (1/1)
remote: Total 4 (delta 2), reused 4 (delta 2)
Unpacking objects: 100% (4/4), done.
From https://gerrit.wikimedia.org/r/mediawiki/tools/codesniffer/

0bebf0f..bf82117  master     -> origin/master

Updating 0bebf0f..bf82117
Fast-forward
MediaWiki/ruleset.xml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
hashar@tin:/srv/deployment/integration/mediawiki-tools-codesniffer$ git deploy sync
Repo: integration/mediawiki-tools-codesniffer
Tag: integration/mediawiki-tools-codesniffer-sync-20140424-205855

2/2 minions completed fetch
Continue? ([d]etailed/[C]oncise report,[y]es,[n]o,[r]etry): y
Repo: integration/mediawiki-tools-codesniffer
Tag: integration/mediawiki-tools-codesniffer-sync-20140424-205855

2/2 minions completed checkout
Continue? ([d]etailed/[C]oncise report,[y]es,[n]o,[r]etry): y
Deployment finished.
hashar@tin:/srv/deployment/integration/mediawiki-tools-codesniffer$

demon removed a subscriber: demon.Dec 16 2014, 6:05 PM
Krinkle closed this task as Resolved.Apr 1 2015, 3:55 AM
Krinkle claimed this task.

The globally deployed version is frozen as of January 2015. Future changes are now maintained in the mediawiki-tools-codesniffer repository and published to Packagist. Individual projects use composer to pull in newer versions on their own schedule.

hashar reopened this task as Open.Apr 1 2015, 12:19 PM

We still have jobs using a stalled version when this bug is requesting it to be automatically updated.

I would like to reuse this bug as a tracking one to finish the cleanup. Ie migrate the remaining jobs composer and remove all traces of that repo from puppet and JJB.

We removed the standard from integration/jenkins.git a few months ago (T66858: Jenkins: Remove "tools/mwcodesniffer" submodule from integration/jenkins.git) in favor of using git-deploy / git::clone to /srv/deployment/integration/mediawiki-tools-codesniffer

The repo is still used by bin/run-phpcs-mw.sh :

bin/run-phpcs-mw.sh:61:PHPCS_STANDARD="/srv/deployment/integration/mediawiki-tools-codesniffer/MediaWiki"

That is in turn still used by a bunch of jobs, luckily they have been made voting by default (4649ec00293938e63b2d9fc9847ec29f6ccdb0f5) and a bunch are non voting so we should just get rid of them entirely.

Voting jobs to be migrated to composer:

mwext-cldr-phpcs-HEAD
mwext-Interwiki-phpcs-HEAD
mwext-Translate-phpcs-HEAD
mwext-TranslationNotifications-phpcs-HEAD
mwext-TwnMainPage-phpcs-HEAD
mwext-UniversalLanguageSelector-phpcs-HEAD

Non voting to be removed:

mediawiki-core-phpcs-HEAD
mwext-AutomaticBoardWelcome-phpcs-HEAD
mwext-JSBreadCrumbs-phpcs-HEAD
mwext-OnlineStatus-phpcs-HEAD
mwext-Sentry-phpcs-HEAD
mwext-SyntaxHighlight_GeSHi-phpcs-HEAD
mwext-UploadWizard-phpcs-HEAD
mwext-Vector-phpcs-HEAD
mwext-WebFonts-phpcs-HEAD
mwext-WhitelistPages-phpcs-HEAD
mwext-WikiGrok-phpcs-HEAD

mediawiki-core-phpcs is not triggered

mwext-Mantle-phpcs-HEAD is a legacy repository.

Krinkle renamed this task from Update CodeSniffer rules automatically on machines running tests to Deprecate global CodeSniffer rules repo and phpcs jobs.Apr 9 2015, 7:03 PM
Krinkle removed Krinkle as the assignee of this task.
Krinkle moved this task from Untriaged to Backlog on the Continuous-Integration-Infrastructure board.
Krinkle updated the task description. (Show Details)
Krinkle set Security to None.
Krinkle removed a subscriber: Unknown Object (MLST).
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 6 2015, 11:52 AM

Lot of repositories are being migrated to use composer / phpcs. We still have:

mwext-JSBreadCrumbs-phpcs-HEAD
mwext-Translate-phpcs-HEAD
mwext-TranslationNotifications-phpcs-HEAD
mwext-TwnMainPage-phpcs-HEAD
mwext-UploadWizard-phpcs-HEAD
mwext-WhitelistPages-phpcs-HEAD
mwext-cldr-phpcs-HEAD

Change 243917 had a related patch set uploaded (by Hashar):
Remove non voting phpcs-HEAD jobs

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

Deleted:

mwext-JSBreadCrumbs-phpcs-HEAD
mwext-UploadWizard-phpcs-HEAD
mwext-WhitelistPages-phpcs-HEAD

Left are:

mwext-Translate-phpcs-HEAD
mwext-TranslationNotifications-phpcs-HEAD
mwext-TwnMainPage-phpcs-HEAD

See T90943: Convert existing legacy phpcs jobs to use composer entry point + versioning

Change 243917 merged by jenkins-bot:
Remove non voting phpcs-HEAD jobs

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

hashar renamed this task from Deprecate global CodeSniffer rules repo and phpcs jobs to Deprecate global CodeSniffer rules repo.Oct 6 2015, 12:02 PM
hashar changed the task status from Open to Stalled.
hashar updated the task description. (Show Details)

The phpcs-HEAD jobs have been phased out in favor of composer test (T90943). I don't think anything still rely on the code sniffer rules from Gerrit.

hashar changed the task status from Stalled to Open.Nov 20 2015, 2:39 PM

Change 260018 had a related patch set uploaded (by Hashar):
contint: stop cloning mediawiki/tools/codesniffer.git

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

hashar added a comment.EditedDec 18 2015, 3:41 PM

Cherry picked on integration puppet master.

I have deleted /srv/deployment/integration/mediawiki-tools-codesniffer with:

salt '*slave*' cmd.run 'rm -fR /srv/deployment/integration/mediawiki-tools-codesniffer'

done This is just pending for puppet patch https://gerrit.wikimedia.org/r/260018 to be merged by ops.

Change 260018 merged by Dzahn:
contint: stop cloning mediawiki/tools/codesniffer.git

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

hashar closed this task as Resolved.Feb 11 2016, 9:43 PM
hashar claimed this task.
hashar added a subscriber: Dzahn.

@Dzahn has merged the patch \O/