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

Enables Yarn 2 #13559

Closed
wants to merge 48 commits into from
Closed

Enables Yarn 2 #13559

wants to merge 48 commits into from

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented Jan 5, 2021

What I did

Upgrading the Yarn binary to the latest stable release (2.4), which should make them faster.

I've configured the project to stay on the node_modules linker since it makes the upgrade fairly painless. Tests pass locally, I'll see how it goes on CI and tweak the command line references accordingly (things like --frozen-lockfile being renamed to --immutable, etc).

Notable changes:

  • The Yarn binary is checked within this repository. This mean that all your contributors will now be ensured to use the exact same version of Yarn, regardless what they have installed globally.

  • The root package.json now lists all workspaces as dependencies (using the workspace: protocol). This is because in Yarn 2 the root workspace doesn't implicitly depend on all workspaces anymore, they have to be explicitly listed. In theory the dependencies should be listed in each workspace that depends on them (so for example ui should depend on api) but I'm worried it would lead to a gigantic diff, so for now the repo keeps relying on the hoisting to work.

How to test

The existing CI pipeline should be enough to validate that the upgrade is safe. One potential risky part is the publish workflow; I've heard it's already covered by tests using Verdaccio so it should be fine, but if someone can double check it would be perfect!

@arcanis arcanis requested a review from ndelangen as a code owner January 5, 2021 11:10
@arcanis arcanis marked this pull request as draft January 5, 2021 12:34
@arcanis
Copy link
Contributor Author

arcanis commented Jan 5, 2021

What are those TeamCity tests? Can't see their content 🤔

@wKich
Copy link
Member

wKich commented Jan 5, 2021

@arcanis, you can login as a guest

@gaetanmaisse gaetanmaisse self-requested a review January 5, 2021 20:14
@gaetanmaisse
Copy link
Member

@arcanis I think you don't need to worry about the TeamCity tests for now, our "official" CI workflows are the ones from CircleCI. Plus, if I remember correctly I had some issue with them in a previous CI PR because there were always using workflow defined in next branch and not the one I updated in my PR.

@gaetanmaisse
Copy link
Member

I have just check out your branch locally, ran yarn install + build + test, and everything was ok 💪🏻

Doing the same in the CI executor (with ssh connection) and it's stuck after the resolution step (in the fetch step? 🤷🏻 ), maybe the current medium executor isn't powerful enough, you can try with a large or xlarge one.

I'm really interested in this PR, feels free to ping me on discord if you want!

@gaetanmaisse
Copy link
Member

Note for myself: As everything is working with Yarn 2 now, the Yarn 2 e2e tests must be reworked and renamed to Yarn PnP

@merceyz
Copy link
Contributor

merceyz commented Jan 7, 2021

The e2e tests should probably avoid using npx as well, as that wont use the Yarn cache which will slow them down

@gaetanmaisse gaetanmaisse self-assigned this Jan 8, 2021
@gaetanmaisse gaetanmaisse added the run e2e extended test suite Run the e2e extended test suite in CircleCI workflows label Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks run e2e extended test suite Run the e2e extended test suite in CircleCI workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants