Page MenuHomePhabricator

Add JSDuck to vagrant (UNPLANNED)
Closed, ResolvedPublic

Description

Migrated from: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/142

Narrative

As a developer,I want to be able to run locally all the tools which are used to reject a change in Jenkins, without having to figure out how to install them one-by-one.

Acceptance Criteria

When mediawiki-vagrant is installed with the MediaViewer role, doc/generate can be executed from the command line.

Related Bugs

bug 60320

Related Stories

#115

Related Changesets

c108858

Event Timeline

MingleTerminator raised the priority of this task from to Needs Triage.
MingleTerminator added a project: Multimedia.
In mingle on 2014-02-05 at 17:45:28, @Tgr wrote:

Blocked by https://bugzilla.wikimedia.org/show_bug.cgi?id=60320
I have a fix there, but I am not sure if it is the right way to do it.

In mingle on 2014-02-06 at 01:21:30, @Tgr wrote:

Testing notes: run 'vagrant provision' on a box with the mediaviewer role enabled, log in with the vagrant user, run 'jsduck --version' - should return 4.x. (Or you can just run docs/generate in the MediaViewer dir and see if it is working.)

In mingle on 2014-02-07 at 09:22:08, @Gilles wrote:

Doesn't work for me, I also tried disabling the role and re-enabling it, to no avail

In mingle on 2014-02-07 at 17:51:13, @Tgr wrote:

Disabling should not be necessary. Did you update the puppet config (the repo in /vagrant) to the current master? Did puppet install anything? (There shoudl be a log when you run provision at the first time, something about jsduck being ensured.) Can you check /root/.gem/bin and /home/vagrant/.gem/bin, if any of them has the jsduck executable?

In mingle on 2014-02-10 at 07:44:27, @Gilles wrote:

I updated the puppet config (didn't know that was necessary when I previously attempted this).

I saw:

notice: /Stage[main]/Packages::Jsduck/Package[jsduck]/ensure: created

But still no luck running jsduck as-is. Here's what the search for jsduck returned:

vagrant@mediawiki-vagrant:/$ sudo find / -name 'jsduck' 2>/dev/null
/vagrant/mediawiki/maintenance/jsduck
/root/.gem/bin/jsduck
/root/.gem/gems/jsduck-4.10.4/lib/jsduck
/root/.gem/gems/jsduck-4.10.4/bin/jsduck

The .gem/bin folder is definitely not in the path, I think non-root can even access it anyway.

In mingle on 2014-02-13 at 16:31:25, @Gilles wrote:

Tested on beta, it works

In mingle on 2014-02-13 at 16:33:16, @Gilles wrote:

These last two comments were a mistake, wrong ticket. See my message from 3 days ago about the puppet issue.

In mingle on 2014-02-18 at 08:50:04, @Tgr wrote:

This one reported by YuviPanda:
https://dpaste.de/NnwW

In mingle on 2014-02-25 at 14:10:39, @Gilles wrote:

I'm marking it as blocked because it's been stalled for a long time now.

In mingle on 2014-02-26 at 00:12:06, @Tgr wrote:

This was partially reverted by YuviPanda because he felt (rightly) that JSDuck should not be a required dependency of the MMV role. Re-adding as a role of its own: https://gerrit.wikimedia.org/r/#/c/115534/

In mingle on 2014-02-26 at 00:20:34, @Tgr wrote:

Gilles: I re-tested it on a clean vagrant box, works for me. The non-trivial part of the code was in https://gerrit.wikimedia.org/r/#/c/111143 - maybe that change was not done by puppet? Or gem-home.sh is not executed for you on login?

In mingle on 2014-02-26 at 00:21:21, @Tgr wrote:

.

In mingle on 2014-02-27 at 20:37:00, @Tgr wrote:

Waiting for code review + merge in vagrant repo.

In mingle on 2014-03-10 at 17:43:53, @Tgr wrote:

Seems to fail sometimes when applied to an old vagrant box.

In mingle on 2014-03-13 at 16:43:07, @MarkTraceur wrote:

Putting into CR because I need to see it.

In mingle on 2014-03-13 at 23:56:31, @MarkTraceur wrote:

I'm going to un-cookie-lick because I cannot test this on my laptop - there's some problem with vagrant on it that hasn't been solved.

Someone with a working version should try.

This was merged a while back.