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

OCPBUGS-30762: Fix bugs in Console dynamic plugin SDK webpack code #13657

Merged

Conversation

vojtechszocs
Copy link
Contributor

This PR addresses several bugs in Console dynamic plugin SDK discovered as part of kubevirt-ui/kubevirt-plugin#1804


1. Build errors related to Hot Module Replacement chunk files

ERROR in [entry] [initial] kubevirt-plugin.494371abc020603eb01f.hot-update.js
Missing call to loadPluginEntry

☑️ Fixed in openshift/dynamic-plugin-sdk#256 - updated @openshift/dynamic-plugin-sdk-webpack dependency.


2. Build warnings issued by dynamic-module-import-loader

LOG from @openshift-console/dynamic-plugin-sdk-webpack/lib/webpack/loaders/dynamic-module-import-loader ../node_modules/ts-loader/index.js??ruleSet[1].rules[0].use[0]!./utils/hooks/useKubevirtWatchResource.ts
<w> Detected parse errors in /home/vszocs/work/kubevirt-plugin/src/utils/hooks/useKubevirtWatchResource.ts

ℹ️ Not all valid .ts files can be parsed using ScriptKind.TSX - this is an inherent TS language limitation.
☑️ Fixed by using ScriptKind.TSX only when parsing modules that end with .jsx or .tsx.


3. Build warnings related to PatternFly shared modules

WARNING in shared module @patternfly/react-core
No required version specified and unable to automatically determine one. Unable to find required version for "@patternfly/react-core" in description file (/home/vszocs/work/kubevirt-plugin/node_modules/@openshift-console/dynamic-plugin-sdk/package.json). It need to be in dependencies, devDependencies or peerDependencies.

☑️ Fixed by allowing @openshift-console/* packages to have their code processed by dynamic-module-import-loader.


This PR also improves the performance of dynamic-module-import-loader to minimize the module parse overhead:

if (!sourceContainsDynamicModuleReference) {
  return source;
}

@openshift-ci openshift-ci bot added component/sdk Related to console-plugin-sdk approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 7, 2024
Copy link
Member

@rhamilto rhamilto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2024
Copy link
Contributor

openshift-ci bot commented Mar 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto, vojtechszocs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vojtechszocs
Copy link
Contributor Author

/test e2e-gcp-console

1 similar comment
@bipuladh
Copy link
Contributor

/test e2e-gcp-console

@vojtechszocs vojtechszocs changed the title Fix bugs in Console dynamic plugin SDK webpack code OCPBUGS-30759: Fix bugs in Console dynamic plugin SDK webpack code Mar 11, 2024
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 11, 2024
@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: This pull request references Jira Issue OCPBUGS-30759, which is invalid:

  • expected the bug to target the "4.16.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This PR addresses several bugs in Console dynamic plugin SDK discovered as part of kubevirt-ui/kubevirt-plugin#1804


1. Build errors related to Hot Module Replacement chunk files

ERROR in [entry] [initial] kubevirt-plugin.494371abc020603eb01f.hot-update.js
Missing call to loadPluginEntry

☑️ Fixed in openshift/dynamic-plugin-sdk#256 - updated @openshift/dynamic-plugin-sdk-webpack dependency.


2. Build warnings issued by dynamic-module-import-loader

LOG from @openshift-console/dynamic-plugin-sdk-webpack/lib/webpack/loaders/dynamic-module-import-loader ../node_modules/ts-loader/index.js??ruleSet[1].rules[0].use[0]!./utils/hooks/useKubevirtWatchResource.ts
<w> Detected parse errors in /home/vszocs/work/kubevirt-plugin/src/utils/hooks/useKubevirtWatchResource.ts

ℹ️ Not all valid .ts files can be parsed using ScriptKind.TSX - this is an inherent TS language limitation.
☑️ Fixed by using ScriptKind.TSX only when parsing modules that end with .jsx or .tsx.


3. Build warnings related to PatternFly shared modules

WARNING in shared module @patternfly/react-core
No required version specified and unable to automatically determine one. Unable to find required version for "@patternfly/react-core" in description file (/home/vszocs/work/kubevirt-plugin/node_modules/@openshift-console/dynamic-plugin-sdk/package.json). It need to be in dependencies, devDependencies or peerDependencies.

☑️ Fixed by allowing @openshift-console/* packages to have their code processed by dynamic-module-import-loader.


This PR also improves the performance of dynamic-module-import-loader to minimize the module parse overhead:

if (!sourceContainsDynamicModuleReference) {
 return source;
}

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.

@vojtechszocs vojtechszocs changed the title OCPBUGS-30759: Fix bugs in Console dynamic plugin SDK webpack code OCPBUGS-30762: Fix bugs in Console dynamic plugin SDK webpack code Mar 11, 2024
@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: This pull request references Jira Issue OCPBUGS-30762, which is invalid:

  • expected the bug to target the "4.16.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This PR addresses several bugs in Console dynamic plugin SDK discovered as part of kubevirt-ui/kubevirt-plugin#1804


1. Build errors related to Hot Module Replacement chunk files

ERROR in [entry] [initial] kubevirt-plugin.494371abc020603eb01f.hot-update.js
Missing call to loadPluginEntry

☑️ Fixed in openshift/dynamic-plugin-sdk#256 - updated @openshift/dynamic-plugin-sdk-webpack dependency.


2. Build warnings issued by dynamic-module-import-loader

LOG from @openshift-console/dynamic-plugin-sdk-webpack/lib/webpack/loaders/dynamic-module-import-loader ../node_modules/ts-loader/index.js??ruleSet[1].rules[0].use[0]!./utils/hooks/useKubevirtWatchResource.ts
<w> Detected parse errors in /home/vszocs/work/kubevirt-plugin/src/utils/hooks/useKubevirtWatchResource.ts

ℹ️ Not all valid .ts files can be parsed using ScriptKind.TSX - this is an inherent TS language limitation.
☑️ Fixed by using ScriptKind.TSX only when parsing modules that end with .jsx or .tsx.


3. Build warnings related to PatternFly shared modules

WARNING in shared module @patternfly/react-core
No required version specified and unable to automatically determine one. Unable to find required version for "@patternfly/react-core" in description file (/home/vszocs/work/kubevirt-plugin/node_modules/@openshift-console/dynamic-plugin-sdk/package.json). It need to be in dependencies, devDependencies or peerDependencies.

☑️ Fixed by allowing @openshift-console/* packages to have their code processed by dynamic-module-import-loader.


This PR also improves the performance of dynamic-module-import-loader to minimize the module parse overhead:

if (!sourceContainsDynamicModuleReference) {
 return source;
}

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.

@vojtechszocs
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: This pull request references Jira Issue OCPBUGS-30762, which is invalid:

  • expected the bug to target the "4.16.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@vojtechszocs
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: This pull request references Jira Issue OCPBUGS-30762, which is invalid:

  • expected the bug to target the "4.16.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@vojtechszocs
Copy link
Contributor Author

/test e2e-gcp-console

@jhadvig
Copy link
Member

jhadvig commented Mar 11, 2024

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 11, 2024
@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-30762, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

In response to this:

/jira refresh

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.

@openshift-ci openshift-ci bot requested a review from yapei March 11, 2024 20:32
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 03cecd0 and 2 for PR HEAD 2da5c34 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 395ac92 and 1 for PR HEAD 2da5c34 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 63e97fa and 0 for PR HEAD 2da5c34 in total

Copy link
Contributor

openshift-ci bot commented Mar 12, 2024

@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.

@openshift-merge-bot openshift-merge-bot bot merged commit 824a736 into openshift:master Mar 12, 2024
6 checks passed
@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: Jira Issue OCPBUGS-30762: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-30762 has been moved to the MODIFIED state.

In response to this:

This PR addresses several bugs in Console dynamic plugin SDK discovered as part of kubevirt-ui/kubevirt-plugin#1804


1. Build errors related to Hot Module Replacement chunk files

ERROR in [entry] [initial] kubevirt-plugin.494371abc020603eb01f.hot-update.js
Missing call to loadPluginEntry

☑️ Fixed in openshift/dynamic-plugin-sdk#256 - updated @openshift/dynamic-plugin-sdk-webpack dependency.


2. Build warnings issued by dynamic-module-import-loader

LOG from @openshift-console/dynamic-plugin-sdk-webpack/lib/webpack/loaders/dynamic-module-import-loader ../node_modules/ts-loader/index.js??ruleSet[1].rules[0].use[0]!./utils/hooks/useKubevirtWatchResource.ts
<w> Detected parse errors in /home/vszocs/work/kubevirt-plugin/src/utils/hooks/useKubevirtWatchResource.ts

ℹ️ Not all valid .ts files can be parsed using ScriptKind.TSX - this is an inherent TS language limitation.
☑️ Fixed by using ScriptKind.TSX only when parsing modules that end with .jsx or .tsx.


3. Build warnings related to PatternFly shared modules

WARNING in shared module @patternfly/react-core
No required version specified and unable to automatically determine one. Unable to find required version for "@patternfly/react-core" in description file (/home/vszocs/work/kubevirt-plugin/node_modules/@openshift-console/dynamic-plugin-sdk/package.json). It need to be in dependencies, devDependencies or peerDependencies.

☑️ Fixed by allowing @openshift-console/* packages to have their code processed by dynamic-module-import-loader.


This PR also improves the performance of dynamic-module-import-loader to minimize the module parse overhead:

if (!sourceContainsDynamicModuleReference) {
 return source;
}

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.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build openshift-enterprise-console-container-v4.16.0-202403122214.p0.g824a736.assembly.stream.el8 for distgit openshift-enterprise-console.
All builds following this will include this PR.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.16.0-0.nightly-2024-03-13-061822

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/sdk Related to console-plugin-sdk jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants