Last modified: 2014-09-02 21:17:54 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 T66045, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64045 - Create generic banana jenkins job template for comparing en.json and qqq.json entries
Create generic banana jenkins job template for comparing en.json and qqq.json...
Status: NEW
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
wmf-deployment
All All
: Low enhancement (vote)
: ---
Assigned To: James Forrester
:
Depends on:
Blocks: 55456
  Show dependency treegraph
 
Reported: 2014-04-17 06:06 UTC by Siebrand Mazeland
Modified: 2014-09-02 21:17 UTC (History)
8 users (show)

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


Attachments

Description Siebrand Mazeland 2014-04-17 06:06:36 UTC
Gerrit change #125050 introduced a banana checker as a linter to avoid lacking qqq messages in MediaWiki core and the installer in core.

Antoine commented: I would rather see a generic banana jenkins job template which we could apply on all repositories using i18n messages.
Comment 1 Antoine "hashar" Musso (WMF) 2014-04-17 07:27:31 UTC
We need a grunt task and its dependencies added to the integration/jenkins.git repository which is cloned on all Jenkins slaves.  Then it is all about:
- figuring the proper command to run
- create the JJB template and generate jobs
- update the Zuul config
- profit!
Comment 2 Gerrit Notification Bot 2014-04-25 22:29:00 UTC
Change 129826 had a related patch set uploaded by Jforrester:
[WIP] Generic banana linter job template

https://gerrit.wikimedia.org/r/129826
Comment 3 Krinkle 2014-04-25 23:34:46 UTC
Why as a separate job template with its own working copy and grunt pipeline? I was going to phase out the wmfgrunt madness, not increase it, and instead promote local Grunt/npm-test more. Takes the same effort almost to set up (slightly less even I think), and makes it a lot easier to change in the future by not having to apply changes globally as that's physically impossible to upgrade once you put it out there like this.
Comment 4 Krinkle 2014-04-25 23:36:00 UTC
Ah, never mind. I overreacted based on the code in this change:

https://gerrit.wikimedia.org/r/#/c/129826/2/macro.yaml

Made it look like a bin/banana-lint actually existed, which, if it would, would indeed be implemented that way. Please don't :)
Comment 5 Krinkle 2014-04-26 00:03:37 UTC
@Antoine: Going with the route of calling our wmfgrunt copy from Jenkins into the context of the local repo is a very fragile approach that in addition causes various scalability and maintainability concerns that I'd very much not look forward to having to deal with.

Let's discuss this on IRC soon and see if we can come up with a better approach.
Comment 6 Antoine "hashar" Musso (WMF) 2014-04-28 08:34:04 UTC
I would rather see a standalone job that we can run on any repository. I am not sure adding a npm file to all our repositories is a good idea.

What is wrong with having the 'banana' runner hosted integration/jenkins.git and a job per repository that just invokes bin/banana-lint ?  If you want to let repositories finely tune the banana checker, maybe use a .bananarc?
Comment 7 Antoine "hashar" Musso (WMF) 2014-08-19 14:50:07 UTC
Is that still being worked on?
Comment 8 James Forrester 2014-08-19 15:33:22 UTC
(In reply to Antoine "hashar" Musso from comment #7)
> Is that still being worked on?

Not really. Krinkle wants essentially to WONTFIX this bug and instead make each repo's maintainer learn and implement an npm pipeline instead with banana as one of the tasks…
Comment 9 Siebrand Mazeland 2014-08-19 16:28:19 UTC
(In reply to James Forrester from comment #8)
> Krinkle wants essentially to WONTFIX this bug and instead make
> each repo's maintainer learn and implement an npm pipeline

That makes really no sense to me. It's also not how I know Timo. Timo, is this what you meant?
Comment 10 Krinkle 2014-08-21 19:26:55 UTC
(In reply to Siebrand Mazeland from comment #9)
> (In reply to James Forrester from comment #8)
> > Krinkle wants essentially to WONTFIX this bug and instead make
> > each repo's maintainer learn and implement an npm pipeline
> 
> That makes really no sense to me. It's also not how I know Timo. Timo, is
> this what you meant?

It's more nuanced than that, but yes, the idea is to phase out use of any Jenkins globals because they are not scalable, maintainable or usable.

## Maintainable
Can't change without affecting all existing repos. Thus any upgrade to the version of the software (e.g. banana, jshint, etc.), or changes to its configuration (e.g. making it gradually more strict, opting in to additional checks etc.) is basically impossible as you'd have to magically make sure all existing repos pass in the microsecond the change is deployed or masters will be failing and people will be upset (and rightfully so).

We're already running into this mess with jshint (all repos using the generic job are basically stuck at some random version, updating is a fragile gamble each time). At least jshintrc is local to the repository. But phpcs and banana aren't set up that way. Which reminds me, you can't really do a generic banana build right now because it doesn't have a generic way of specifying the configuration. We could build one if needed, though.

It makes sense to have conventions for which software to use and how to configure it, but installing it globally and running from Jenkins is a mistake and is imho naive to the fact how development actually works and has so far only incurred lots of overhead on the wrong side of the balance (me), when really it ought to be a distributed effort.

## Usable
Users can't easily use it locally for there is no local install. And global installation affects other projects (e.g. anyone working on projects that do have a local install or, know you, you contribute to non-Wikimedia projects, you're fucked and have to dig through shits of conflicting versions in your global binaries). We've ran into this with jshint many times (e.g. I prefer JSHint 3 for most projects, but some still have JSHint v2 config files, which may be incompatible).

A local workflow means you can keep a simple "make install & test" -like workflow (be it "npm install && npm test", "travisci", "composer install/run-script test", "./scripts/ci", whatever). Which means there's no difference between local and Jenkins (no black box stuff that developers can't run locally before pushing commits for review, and always the same predictable results).

## Scalable
Each of these create loads and loads of more jobs for each project in jjb-config and zuul-config. All of which have to be created manually and kept up to date. Usually requested by new and existing repos to be enabled etc (thus more overhead for Antoine and myself). The local pipeline means people are in control of it and don't need us for each little thing. This allows them to do it faster themselves, and the change itself is also simpler (one commit changing a line in their package.json/Gruntfile vs. commit to jjb-config, compile, deploy to Jenkins, commit to zuul-config, and deploy via gallium, reload Zuul).

It also increased overall load on Jenkins with additional workspaces and copies. I think it's pretty obvious that going forward we should aim for one job per pipeline per repo (maybe with multiple variations thereof for different environments matrixes). Especially with the future sight of virtualising our builds in a sandboxed environment. There the overhead of separate jobs would be even higher (would be wasteful to use separate VMs for each of these mini scripts, that 1-2 second save probably isn't worth parallelising for, and besides, they aren't mutually exclusive; we can parallelise within a build as we'll be doing with phpunit for example).
Comment 11 Gerrit Notification Bot 2014-08-30 21:50:34 UTC
Change 129826 abandoned by Jforrester:
[WIP] Generic banana linter job template

Reason:
Not going anywhere.

https://gerrit.wikimedia.org/r/129826
Comment 12 James Forrester 2014-09-02 21:17:54 UTC
Timo,

Are you going to mark this as WONTFIX, then?

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


Navigation
Links