Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yarn downgraded from v0.24.6 to v0.17.8 after Trusty 2017Q2 update #7951

Closed
edmorley opened this issue Jun 22, 2017 · 9 comments
Closed

Yarn downgraded from v0.24.6 to v0.17.8 after Trusty 2017Q2 update #7951

edmorley opened this issue Jun 22, 2017 · 9 comments

Comments

@edmorley
Copy link

edmorley commented Jun 22, 2017

After yesterday's Trusty image update, our Trusty container nodejs jobs (.travis.yml) are now failing with:

$ yarn install --frozen-lockfile --no-bin-links
  error: unknown option `--frozen-lockfile'

(From: https://travis-ci.org/mozilla/treeherder/jobs/245713688)

Compare to the last successful run:
https://travis-ci.org/mozilla/treeherder/jobs/245336921

Of note, the jobs previously contained a Travis-instigated "Installing yarn" step (presumably since yarn didn't exist at all), which installed the latest released yarn version (which is currently v0.24.6).

However now there is no such step, and the pre-installed version of yarn is now the much older v0.17.8 - which doesn't support the --frozen-lockfile option.

We had tested the new Trusty images for the sudo-enabled parts of our Travis run, however group: edge wasn't available for the container builds (plus the container changes aren't documented - #7950), so the breakage came as a surprise to us.

Please can the base image be updated to use at least the same version that was installed before (0.24.6)?

Many thanks!

@edmorley
Copy link
Author

I've opened travis-ci/travis-cookbooks#854 to fix this, however unless there is a plan to roll out updated images soon, it won't help short term.

The next best fix might be to update the runtime-install script such that it checks what yarn version is installed, rather than skipping if yarn simply exists at all:
https://github.com/travis-ci/travis-build/blob/b1c1ff156509d53538e05082fca4dab2761dfed5/lib/travis/build/script/node_js.rb#L211

@BanzaiMan
Copy link
Contributor

If you need the latest version of yarn, you can update it at runtime:

env:
  global:
    - PATH=$HOME/.yarn/bin:$PATH
before_install:
  - curl -o- -L https://yarnpkg.com/install.sh | bash
  # or curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version [version]

@edmorley
Copy link
Author

Thank you - we're already doing that for the sudo-enabled jobs (where yarn isn't installed at all), so we're going to use that as a workaround for container builds in the meantime.

niklasf added a commit to lichess-org/lila that referenced this issue Jul 22, 2017
ornicar added a commit to lichess-org/lila that referenced this issue Jul 23, 2017
* 'master' of github.com:ornicar/lila:
  show full pv as title (closes #3329)
  Fix initial analysis clocks
  attempt to fix parallel install on travis (#3325)
  try to work around travis-ci/travis-ci#7951
  name section like license file
  Use BigDecimal for json precision
@dmason30
Copy link

dmason30 commented Aug 3, 2017

@edmorley Is there going to be a change to add the automatically upgrade of yarn to trusty dists like it does on precise?

I am using your solution above but seems unnecessary that I will have to do this in every project where I am using yarn (which is basically every project).

@edmorley
Copy link
Author

edmorley commented Aug 4, 2017

The pre-installed yarn for Trusty was updated to 0.27.5 in travis-ci/travis-cookbooks#866.

@edmorley Is there going to be a change to add the automatically upgrade of yarn to trusty dists like it does on precise?

I'm not sure (I don't work for Travis CI). Perhaps open a new issue?

@edmorley edmorley closed this as completed Aug 4, 2017
@Narretz
Copy link

Narretz commented Aug 10, 2017

@edmorley when will this become the default / publicly available? Or do we need to change a config entry for this?

@edmorley
Copy link
Author

This should already work, I don't know why it isn't. Someone from Travis will have to answer either here or in travis-ci/packer-templates#478...

@Lyoness
Copy link
Contributor

Lyoness commented Aug 10, 2017

Thanks @edmorley for holding down the fort <3. Many peeps on vacation this week.

travis-ci/packer-templates#478 (comment)

likely a collision with run-time changes happening travis-build. Will debug / test.

@edmorley
Copy link
Author

Hmm actually if I use group: edge I get the newer version of yarn. I thought there had been a new image rollout since the change landed, but perhaps not? (Or else it was rolled back?)

armenzg added a commit to mozilla/firefox-health-backend that referenced this issue Jul 4, 2018
armenzg added a commit to mozilla/firefox-health-backend that referenced this issue Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants