Bump Yarn to v1 latest & add script to check PatternFly modules
The aim of this PR is to avoid webpack build or performance issues due to multiple version resolutions of PatternFly packages.
- Upgrade Yarn from version
1.22.15(2021-09-30) to1.22.22(2024-03-09) - Check PatternFly package version resolutions as part of Console
postinstallhook
Example - check resolutions on current Console code base
Example - add @patternfly/patternfly :exclamation: and another dummy package to the list
:exclamation: PKGS_TO_CHECK lists all PatternFly v5 packages, except for @patternfly/patternfly.
@patternfly/patternfly is excluded because a v4 package gets pulled in via @patternfly-4/react-console.
$ yarn why @patternfly/patternfly
..
=> Found "@patternfly/[email protected]"
..
=> Found "@patternfly-4/react-console#@patternfly/[email protected]"
..
Having multiple @patternfly/patternfly resolutions should be OK since this package only contains style related assets.
@vojtechszocs: This pull request references CONSOLE-3997 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.16.0" version, but no target version was set.
In response to this:
Follow-up to #13693
The aim of this PR is to avoid webpack build or performance issues due to multiple version resolutions of PatternFly packages.
- Upgrade Yarn from version
1.22.15(2021-09-30) to1.22.22(2024-03-09)- Check PatternFly package version resolutions as part of Console
postinstallhookExample - check resolutions on current Console code base
Example - add
@patternfly/patternfly:exclamation: and another dummy package to the list
:exclamation:
PKGS_TO_CHECKlists all PatternFly v5 packages, except for@patternfly/patternfly.
@patternfly/patternflyis excluded because a v4 package gets pulled in via@patternfly-4/react-console.$ yarn why @patternfly/patternfly .. => Found "@patternfly/[email protected]" .. => Found "@patternfly-4/react-console#@patternfly/[email protected]" ..Having multiple
@patternfly/patternflyresolutions should be OK since this package only contains style related assets.
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.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: jhadvig, vojtechszocs
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~dynamic-demo-plugin/OWNERS~~ [jhadvig,vojtechszocs]
- ~~frontend/OWNERS~~ [jhadvig,vojtechszocs]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
QE Approver: /assign @yapei Docs Approver: /assign @opayne1 PX Approver: /assign @RickJWagner
/label px-approved
/label docs-approved
This PR has been tested and no issue was found /qe-approved
/label qe-approved
@vojtechszocs: This pull request references CONSOLE-3997 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.16.0" version, but no target version was set.
In response to this:
Follow-up to #13693
The aim of this PR is to avoid webpack build or performance issues due to multiple version resolutions of PatternFly packages.
- Upgrade Yarn from version
1.22.15(2021-09-30) to1.22.22(2024-03-09)- Check PatternFly package version resolutions as part of Console
postinstallhookExample - check resolutions on current Console code base
Example - add
@patternfly/patternfly:exclamation: and another dummy package to the list
:exclamation:
PKGS_TO_CHECKlists all PatternFly v5 packages, except for@patternfly/patternfly.
@patternfly/patternflyis excluded because a v4 package gets pulled in via@patternfly-4/react-console.$ yarn why @patternfly/patternfly .. => Found "@patternfly/[email protected]" .. => Found "@patternfly-4/react-console#@patternfly/[email protected]" ..Having multiple
@patternfly/patternflyresolutions should be OK since this package only contains style related assets.
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.
/retest-required
Remaining retests: 0 against base HEAD 7ea46e1b57fe28bdafcfd7cc39c79bcc9fa0677d and 2 for PR HEAD 9c74c4cf89c324807fd686099dc12175846fbc4f in total
/retest-required
Remaining retests: 0 against base HEAD 86209ac83a333be49962a19a5afd3c58055964c1 and 1 for PR HEAD 9c74c4cf89c324807fd686099dc12175846fbc4f in total
@vojtechszocs: all tests passed!
Full PR test history. Your PR dashboard.
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 kubernetes/test-infra repository. I understand the commands that are listed here.
[ART PR BUILD NOTIFIER]
This PR has been included in build openshift-enterprise-console-container-v4.16.0-202404120544.p0.g5de7277.assembly.stream.el9 for distgit openshift-enterprise-console. All builds following this will include this PR.
@vojtechszocs, ./scripts/check-patternfly-modules.sh fails on MacOS. Probably ought to revert this in the interim as it blocks builds for Mac users (which is the majority of developers).
❯ ./build.sh
# github.com/openshift/console/cmd/bridge
ld: warning: -bind_at_load is deprecated on macOS
ld: warning: '/private/var/folders/69/g46tnpnj0nn91q960rs6vw3h0000gn/T/go-link-1539668877/go.o' has malformed LC_DYSYMTAB, expected 126 undefined symbols to start at index 210109, found 146 undefined symbols starting at index 107
~/Git/console/frontend ~/Git/console
yarn install v1.22.22
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
warning Resolution field "[email protected]" is incompatible with requested version "minimist@~0.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "minimist@^1.2.8"
success Already up-to-date.
$ ./scripts/check-patternfly-modules.sh && yarn prepare-husky && yarn generate
Checking \e[0;33myarn.lock\e[0m file for PatternFly module resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/quickstarts\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-catalog-view-extension\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-charts\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-component-groups\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-console\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-core\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-icons\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-log-viewer\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-styles\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-table\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-tokens\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-topology\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-user-feedback\e[0m has no version resolutions
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
\e[0;31m@patternfly/react-virtualized-extension\e[0m has no version resolutions
Run \e[0;33myarn why <pkg-name>\e[0m to inspect module resolution details
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
@rhamilto Good catch, that issue should be fixed by https://github.com/openshift/console/pull/13757