Discussion:
[Bug 73672] New: Have vagrant provision run composer install
b***@wikimedia.org
2014-11-20 20:16:52 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=73672

Bug ID: 73672
Summary: Have vagrant provision run composer install
Product: MediaWiki-Vagrant
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General
Assignee: wikibugs-***@lists.wikimedia.org
Reporter: ***@wikimedia.org
CC: ***@wikimedia.org, ***@wikimedia.org,
***@gmail.com
Web browser: ---
Mobile Platform: ---

After running git pull on the /vagrant/mediawiki directory, I got this error:

Fatal error: Class 'Cdb\Reader' not found in
/vagrant/mediawiki/includes/cache/LocalisationCache.php on line XXX

and while the reason was easy to guess (Cdb has been vendorized), I wasted some
time figuring out what to do to update it (vagrant provision, vagrant reload,
setup.sh, git pull on the vagrant repo...) as I thought the vendor directory is
maintained by vagrant.

I can see the logic in not updating automatically, as MediaWiki and extension
code is also not updated automatically after the initial install; still I
wonder if vagrant provision should always re-run composer install so that users
have to remember one less thing. composer install does not touch already
installed libraries, so no code gets updated without the user's consent, it
just the ones which have been added to mediawiki/composer.json, and have not
been installed at all yet. That seems fairly harmless to me, and in line with
the general logic of vagrant doing the first install and not touching anything
after that.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2014-11-20 20:17:50 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=73672

--- Comment #1 from Tisza Gergő <***@wikimedia.org> ---
Also, maybe vagrant provision should run composer self-update?
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2014-11-20 20:51:45 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=73672

Tisza Gergő <***@wikimedia.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
composer install does not touch already installed libraries, so no code gets
updated without the user's consent, it just the ones which have been added to
mediawiki/composer.json, and have not been installed at all yet
Actually that's not true (yeah, yeah, I should test before I file). Install
does not do anything at all if there is a lock file, and update has no option
to only touch completely missing packages, so there does not seem to be a way
to say "add missing packages but don't touch existing ones". Probably not a
good idea anyway as it would result in inconsistent versions of the vendor
packages.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
b***@wikimedia.org
2014-11-20 21:07:41 UTC
Permalink
https://bugzilla.wikimedia.org/show_bug.cgi?id=73672

Bryan Davis <***@wikimedia.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@wikimedia.org

--- Comment #3 from Bryan Davis <***@wikimedia.org> ---
(In reply to Tisza Gergő from comment #2)
Post by b***@wikimedia.org
composer install does not touch already installed libraries, so no code gets
updated without the user's consent, it just the ones which have been added to
mediawiki/composer.json, and have not been installed at all yet
Actually that's not true (yeah, yeah, I should test before I file). Install
does not do anything at all if there is a lock file, and update has no
option to only touch completely missing packages, so there does not seem to
be a way to say "add missing packages but don't touch existing ones".
Probably not a good idea anyway as it would result in inconsistent versions
of the vendor packages.
`vagrant git-update` takes care of this sort of thing by calling `composer
update --no-interaction --optimize-autoloader` after the gut pulls but before
running update.php.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Loading...