[release-4.22] CONSOLE-5011: migrate to yarn berry#15986
[release-4.22] CONSOLE-5011: migrate to yarn berry#15986openshift-merge-bot[bot] merged 2 commits intoopenshift:mainfrom
Conversation
5d42266 to
906d4b4
Compare
9ffb88d to
2f6636b
Compare
|
@logonoff: This pull request references CONSOLE-5011 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
9f3f11c to
89b3ba2
Compare
📝 WalkthroughWalkthroughThis pull request upgrades the project from Yarn v1 (Classic) to Yarn v4 (Berry) and introduces Corepack as the package manager version manager. Changes include: updating configuration files to use 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
@logonoff: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
AI is wrong, can't use /verified by CI |
|
@logonoff: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
changes are critical to meet impending deadline /label acknowledge-critical-fixes-only |
|
Let's get some additional verification /verified cancel |
|
@logonoff: The DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/verified remove |
|
@logonoff: This PR has been marked to be verified later by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/verified later @yapei |
|
@logonoff: The DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@logonoff: This PR has been marked to be verified later by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
| "build": "yarn clean && NODE_ENV=production yarn ts-node node_modules/.bin/webpack", | ||
| "build-dev": "yarn clean && yarn ts-node node_modules/.bin/webpack", | ||
| "build-plugin-sdk": "yarn --cwd ../frontend build-plugin-sdk && yarn install-plugin-sdk", | ||
| "install-plugin-sdk": "rm -rf node_modules/@openshift-console && yarn install --check-files", |
There was a problem hiding this comment.
Does Yarn Berry yarn install fill the missing node_modules/@openshift-console/* packages while other node_modules/* packages are still in place?
There was a problem hiding this comment.
Yes
console/dynamic-demo-plugin$ rm -rf node_modules/@openshift-console && yarn
➤ YN0000: · Yarn 4.12.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 603ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 2s 85ms
➤ YN0000: ┌ Link step
➤ YN0072: │ The application uses portals and that's why --preserve-symlinks Node option is required for launching it
➤ YN0000: └ Completed in 2s 159ms
➤ YN0000: · Done with warnings in 5s 69ms
console/dynamic-demo-plugin$ ls node_modules/@openshift-console/
dynamic-plugin-sdk dynamic-plugin-sdk-webpack
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: logonoff, rhamilto, vojtechszocs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@logonoff: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
This PR (and its "backports" all the way to 4.12) aim to perform the mandatory migration from yarn classic to yarn berry (of the v4 variety).
Changes
See #15995 for some preparatory work that was done from 4.12 to 4.18.
Note: the list of changes are descriptive for all backport PRs. Some of these changes may not apply to every backport.
Dockerfiles to install corepack instead of yarn v1dynamic-demo-plugin, symlink.yarnrc.ymland the.yarn/releasesfolder to reduce config duplicationpackage.jsonscripts to have syntax compatible with yarn berrycheck-patternfly-modulesscript to use new yarn berry parsing packageyarn dedupestuff with the yarn berry-provided versionportalinstead offilenowupdate-patternfly.shbecause PatternFly no longer consistently has all libraries to the same version.yarn/releasesto point to yarn v4. Note that this is for installations (e.g.,tectonic-console-builder:v29) which already have yarn classic installed globally. They will read this updated binary and automatically run yarn berry. We can remove this when our builder image switches fully over to corepackHow to set up your computer
Note that you may want to remove yarn classic when setting up your computer to use yarn berry. Here's how to update your system to use it:
dnf remove yarnpkg,npm uninstall -g yarn,brew uninstall yarnnpm i -g corepack(node ships with an older version)corepack enable(note that corepack also works with our repo pre-yarn berry adoption, it will run yarn classic as needed)Possible test cases
package.jsonnow works the same as beforeDockerfile.buildercan build console,Dockerfilebuilds console frontend/backend,Dockerfile.plugins.demobuilds demo plugin.Dockerfile.product.nodejsdoes not but that is due to an outdated node version. Let's delete it in a follow up.gitfolder infrontendis created everbuild.sh, etc.) work fine on an initial repo state, switching branches, etc.Backports