Page MenuHomePhabricator

Upgrade integration/composer to 1.6.5 stable
Closed, ResolvedPublic

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Paladox claimed this task.

The patch was merged and is now running the stable 1.1.0-rc composer release. Confirmed by https://gerrit.wikimedia.org/r/#/c/267546/ which would have failed the rebase if we were still using the old composer version.

JanZerebecki subscribed.

Reverted in https://gerrit.wikimedia.org/r/#/c/286305/ because that composer version generates an autoloader that is not compatible with PHP 5.5.
https://gerrit.wikimedia.org/r/#/c/286298/
https://integration.wikimedia.org/ci/job/php55lint/10632/console

10:08:07 PHP Parse error:  syntax error, unexpected '.', expecting ')' in vendor/composer/autoload_static.php on line 10
10:08:07 Errors parsing vendor/composer/autoload_static.php
10:08:07 xargs: php5: exited with status 255; aborting

@JanZerebecki would composer 1.0.3 work or is it a bug in composer. Has it been reported upstream.

Also @JanZerebecki I doint know why it is linting vendor/composer files when it shoulden.

@JanZerebecki yes it is a bug, static loading should only be used on php 5.6 or above according to https://github.com/composer/composer/releases/tag/1.1.0-RC

So using composer 1.0.3 should be safe.

Change 286306 had a related patch set uploaded (by JanZerebecki):
Update composer to 1.0.3 stable

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

Change 286306 merged by jenkins-bot:
Update composer to 1.0.3 stable

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

We will need to use config.platform in various places when using 1.1.0-RC. E.g. the build host for Wikidata is running PHP 5.6 but the result needs to be compatible with PHP 5.5.
Why shouldn't it lint those files?

We will need to use config.platform in various places when using 1.1.0-RC. E.g. the build host for Wikidata is running PHP 5.6 but the result needs to be compatible with PHP 5.5.
Why shouldn't it lint those files?

Because I thought that it would be up to upstream to lint anything in those files since they are auto generated.

@JanZerebecki maybe because when I re generated composer by composer update using php 7 it would have use the new optimised autoloader.

Maybe if we generate composer with php 5.5 it wont use the composer optimised autoloader.

Because we generate those files and not upstream (even though the exact upstream code does) we need to run the tests for those generated files.

The failure does not only happen when producing a build of composer, but when that version is used on the Wikidata build host to build Wikidata. When we use config.platform, where we use composer to produce a build that is saved, then it should work even when that is done with a newer PHP version. There are probably more place in gerrit.wikimedia.org that will need to do this, but when we changed vendor.git, Wikidata.git and composer.git to use config.platform we can upgrade to 1.1.0-RC.

@JanZerebecki I think 1.1.0 would have work since the static autoload file would only be loaded if your using php 5.6, it generated it but would not have used it. We should ignore that file in the linter for php 5.5 or below.

Yes, perhaps it might still generate code that will fail the lint even when we would use config.platform. We will need to find out. There is also the linting step of scap during deployment (not sure if that only covers mediawiki-config or the whole tree including core and all extensions). Not doing linting seems like a bad idea, I'd like to avoid that.

Paladox renamed this task from Upgrade integration/composer to 1.0.0 stable to Upgrade integration/composer to 1.1.1 stable.May 19 2016, 8:14 AM
Paladox updated the task description. (Show Details)
Paladox removed a project: Patch-For-Review.
Paladox added a project: Composer.
hashar triaged this task as Medium priority.Jun 23 2016, 12:08 PM
Paladox renamed this task from Upgrade integration/composer to 1.1.1 stable to Upgrade integration/composer to 1.1.2 stable.Jun 25 2016, 5:48 PM
Paladox updated the task description. (Show Details)

Change 320098 had a related patch set uploaded (by Paladox):
Add a script so we can disable loading the new autoload_static file

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

Change 320098 abandoned by Paladox:
Add a script so we can disable loading the new autoload_static file

Reason:
Yes but some of our linters doint support it expecially php -l.

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

Paladox renamed this task from Upgrade integration/composer to 1.1.2 stable to Upgrade integration/composer to 1.3.1 stable.Jan 13 2017, 9:21 AM
Paladox updated the task description. (Show Details)

Change 339645 had a related patch set uploaded (by Hashar):
Update composer to 1.1.0

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

Paladox renamed this task from Upgrade integration/composer to 1.3.1 stable to Upgrade integration/composer to 1.3.2 stable.Feb 24 2017, 4:20 PM
Paladox updated the task description. (Show Details)

Change 339645 merged by Hashar:
[integration/composer] Update composer to 1.1.0 with composer 1.1.0/PHP 5.5

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

Mentioned in SAL (#wikimedia-releng) [2017-03-02T09:18:02Z] <hashar> upgrading composer on permanent slaves for T125343 : salt -v '*slave*' cmd.run 'cd /srv/deployment/integration/composer && git pull'

Should we try upgrading to composer 1.3.2 now?

Change 340780 had a related patch set uploaded (by Paladox):
[integration/composer] Update composer to 1.1.3

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

It looks like the update to composer 1.1.0 (perhaps only tangentially related?) has broken all jenkins runs to the CirrusSearch extension via the mwext-php70-phan-jessie job no longer being able to finish setting up: https://gerrit.wikimedia.org/r/#/c/340777/

Additionally it looks like not only CirrusSearch, perhaps all jobs using mwext-php60-phan-jessie? See also https://gerrit.wikimedia.org/r/#/c/340718/

Change 340780 merged by Paladox:
[integration/composer] Update composer to 1.1.3

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

Change 340791 had a related patch set uploaded (by Paladox):
[integration/composer] Update composer ti 1.3.2

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

Paladox renamed this task from Upgrade integration/composer to 1.3.2 stable to Upgrade integration/composer to 1.4.1 stable.Mar 16 2017, 8:32 PM
Paladox updated the task description. (Show Details)

Bump, this has been labeled "next" since February and there is a change sitting in Gerrit since March that is "Update composer to 1.4.2" but it's large, 18.000 lines changed or so.

https://gerrit.wikimedia.org/r/#/c/340791/

Does that have a chance to get merged?

Change 340791 merged by jenkins-bot:
[integration/composer@master] Update composer to 1.4.3

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

Reedy renamed this task from Upgrade integration/composer to 1.4.1 stable to Upgrade integration/composer to 1.4.3 stable.Dec 3 2017, 5:15 PM
Reedy updated the task description. (Show Details)

Change 395898 had a related patch set uploaded (by Paladox; owner: Paladox):
[integration/composer@master] Update composer to 1.4.3

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

We're pretty behind, and probably should jump to 1.6.x now...

@hashar reverted this last time noting that we also had to announce this, refresh docker images, and then refresh nodepool images. So we should schedule a date beforehand, merge the change, refresh the docker images, wait for any failures, and then let the daily auto refresh take care of the nodepool images. Does that sound reasonable?

With I90544e3e5e488 we're now using 1.6.2 in mediawiki/vendor so this would be good to get done soon.

Reedy renamed this task from Upgrade integration/composer to 1.4.3 stable to Upgrade integration/composer to 1.6.5 stable.Jun 1 2018, 12:31 AM
Reedy raised the priority of this task from Medium to High.
Reedy removed a project: Patch-For-Review.
Reedy updated the task description. (Show Details)

Change 436705 had a related patch set uploaded (by Reedy; owner: Reedy):
[integration/composer@master] Update composer to 1.6.5

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

Can we do something about this rather than running an ancient version?

Yeah hire a few more people so we can afford to maintain the infra and deal with the upgrades aftermath :] More seriously, I am migrating extensions to Quibble and have no time to babysit a composer upgrade.

Yeah hire a few more people so we can afford to maintain the infra and deal with the upgrades aftermath :] More seriously, I am migrating extensions to Quibble and have no time to babysit a composer upgrade.

Is it documented?

T125343#3876563 basically. The annoying part is going to be bumping all of the docker images manually...

Change 436852 had a related patch set uploaded (by Reedy; owner: Reedy):
[integration/config@master] Update docker images to use composer 1.6.5

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

Change 436705 merged by jenkins-bot:
[integration/composer@master] Update composer to 1.6.5

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

Change 436852 merged by jenkins-bot:
[integration/config@master] Update docker images to use composer 1.6.5

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

Change 436859 had a related patch set uploaded (by Reedy; owner: Reedy):
[integration/config@master] Update composer image to use composer 1.6.5

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

Change 436902 had a related patch set uploaded (by Reedy; owner: Reedy):
[integration/config@master] [WIP] Bump various docker images for composer update

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

Change 436859 merged by jenkins-bot:
[integration/config@master] Update composer image to use composer 1.6.5

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

Change 436902 merged by jenkins-bot:
[integration/config@master] Bump various docker images for composer update

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

Legoktm reassigned this task from Paladox to Reedy.

Change 395898 abandoned by Paladox:
Update composer to 1.4.3

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