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

CONSOLE-3705: Phase 1 of using OpenShift Dynamic Plugin SDK #13188

Merged

Conversation

vojtechszocs
Copy link
Contributor

@vojtechszocs vojtechszocs commented Sep 22, 2023

This PR updates Console dynamic plugin build-time infrastructure to use webpack code from OpenShift Dynamic Plugin SDK.

Console runtime plugin infrastructure is updated to support both current (legacy) and new (standard) plugin manifest formats.

Console plugins built with updated ConsoleRemotePlugin will use the standard PluginManifest format.

There are two structural differences between Console legacy vs. standard plugin manifest format:

1. Console specific properties

  • legacy: top-level properties in the manifest
"displayName": "Console Demo Plugin",
"description": "Plasma reactors online. Initiating hyper drive.",
"disableStaticPlugins": ["@console/demo-plugin"]
  • standard: scoped to customProperties object under the console namespace
"customProperties": {
  "console": {
    "displayName": "Console Demo Plugin",
    "description": "Plasma reactors online. Initiating hyper drive.",
    "disableStaticPlugins": ["@console/demo-plugin"]
  }
}

2. Additional build metadata

  • legacy: no properties, Console code uses hard-coded conventions
  • standard: new top-level properties in the manifest
"registrationMethod": "callback",
"baseURL": "/api/plugins/console-demo-plugin/",
"loadScripts": ["plugin-entry.js"],
"buildHash": "8740a41586612419c90da43d82c69fb8"

Updated ConsoleRemotePlugin should be backwards compatible. Its options can be omitted entirely:

new ConsoleRemotePlugin(),

or specified explicitly as needed:

new ConsoleRemotePlugin({
  // [added] pluginMetadata - default: parsed from `consolePlugin` object in `package.json` file
  // [added] extensions - default: parsed from `console-extensions.json` file
  // validateExtensionSchema - default: true
  // validateExtensionIntegrity - default: true
  // validateSharedModules - default: true
  // [deleted] validatePackageSchema - plugin metadata validation now done via Yup
}),

Env. variable CONSOLE_PLUGIN_SKIP_EXT_VALIDATOR is no longer supported by ConsoleRemotePlugin since we already have an explicit option for this purpose (validateExtensionIntegrity).

Other notable changes:

  • @openshift-console/dynamic-plugin-sdk-webpack now depends on @openshift/dynamic-plugin-sdk-webpack
  • removed support for very old Console plugins (where plugin SDK packages use webpack 5.0.0-beta.16)

cc @spadgett @jhadvig

@vojtechszocs vojtechszocs marked this pull request as draft September 22, 2023 15:23
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 22, 2023
@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 Sep 22, 2023
@vojtechszocs vojtechszocs changed the title WiP Phase 1 of using OpenShift Dynamic Plugin SDK CONSOLE-3705: WiP Phase 1 of using OpenShift Dynamic Plugin SDK Sep 22, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 22, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 22, 2023

@vojtechszocs: This pull request references CONSOLE-3705 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.15.0" version, but no target version was set.

In 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 kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 27, 2023

@vojtechszocs: This pull request references CONSOLE-3705 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.15.0" version, but it targets "openshift-4.15" instead.

In response to this:

Depends on openshift/dynamic-plugin-sdk#236

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.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 3, 2023

@vojtechszocs: This pull request references CONSOLE-3705 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.15.0" version, but it targets "openshift-4.15" instead.

In response to this:

Depends on changes in openshift/dynamic-plugin-sdk#236 and openshift/dynamic-plugin-sdk#232

TODO description

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.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 11, 2023

@vojtechszocs: This pull request references CONSOLE-3705 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.15.0" version, but it targets "openshift-4.15" instead.

In response to this:

Depends on some changes changes in OpenShift dynamic plugin SDK:

TODO description

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.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 11, 2023

@vojtechszocs: This pull request references CONSOLE-3705 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.15.0" version, but it targets "openshift-4.15" instead.

In response to this:

Depends on some changes changes in OpenShift dynamic plugin SDK:

TODO description

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.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 12, 2023
@openshift-ci openshift-ci bot added the component/core Related to console core functionality label Oct 12, 2023
@@ -11,7 +11,7 @@
"integration-tests"
],
"scripts": {
"postinstall": "yarn generate",
"postinstall": "# TODO yarn generate",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a temporary change 😃

@@ -100,8 +100,6 @@ a [semver pre-release](https://semver.org/#spec-item-9) identifier, adapt your s
to include the relevant pre-release prefix, e.g. use `~4.11.0-0.ci` when targeting pre-release versions
like `4.11.0-0.ci-1234`.

See `ConsolePluginMetadata` type for details on the `consolePlugin` object and its schema.

This comment was marked as resolved.

@@ -17,12 +17,13 @@
},
"devDependencies": {
"@microsoft/tsdoc": "0.14.2",
"@openshift/dynamic-plugin-sdk-webpack": "file:/home/vszocs/work/openshift/dynamic-plugin-sdk/packages/lib-webpack",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using local OpenShift plugin SDK build for now, this will be updated once PR is no longer a draft.

@vojtechszocs vojtechszocs changed the title CONSOLE-3705: WiP Phase 1 of using OpenShift Dynamic Plugin SDK CONSOLE-3705: Phase 1 of using OpenShift Dynamic Plugin SDK Oct 13, 2023
@vojtechszocs
Copy link
Contributor Author

Tested locally on dynamic-demo-plugin and everything seems to work as expected for both

  • demo plugin built with current Console plugin SDK
  • demo plugin built with updated Console plugin SDK (with changes in this PR)

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 13, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 16, 2023

@vojtechszocs: This pull request references CONSOLE-3705 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.15.0" version, but it targets "openshift-4.15" instead.

In response to this:

This PR updates Console dynamic plugin build-time infrastructure to use webpack code from OpenShift Dynamic Plugin SDK.

Console runtime plugin infrastructure is updated to support both current (legacy) and new (standard) plugin manifest formats.

Console plugins built with updated ConsoleRemotePlugin will use the standard PluginManifest format.

There are two structural differences between Console legacy vs. standard plugin manifest format:

1. Console specific properties

  • legacy: top-level properties in the manifest
"displayName": "Console Demo Plugin",
"description": "Plasma reactors online. Initiating hyper drive.",
"disableStaticPlugins": ["@console/demo-plugin"]
  • standard: scoped to customProperties object under the console namespace
"customProperties": {
 "console": {
   "displayName": "Console Demo Plugin",
   "description": "Plasma reactors online. Initiating hyper drive.",
   "disableStaticPlugins": ["@console/demo-plugin"]
 }
}

2. Additional build metadata

  • legacy: no properties, Console code uses hard-coded conventions
  • standard: new top-level properties in the manifest
"registrationMethod": "callback",
"baseURL": "/api/plugins/console-demo-plugin/",
"loadScripts": ["plugin-entry.js"],
"buildHash": "8740a41586612419c90da43d82c69fb8"

Updated ConsoleRemotePlugin should be backwards compatible. Its options can be omitted entirely:

new ConsoleRemotePlugin(),

or specified explicitly as needed:

new ConsoleRemotePlugin({
 // [added] pluginMetadata - default: parsed from `consolePlugin` object in `package.json` file
 // [added] extensions - default: parsed from `console-extensions.json` file
 // validateExtensionSchema - default: true
 // validateExtensionIntegrity - default: true
 // validateSharedModules - default: true
 // [deleted] validatePackageSchema - plugin metadata validation now done via Yup
}),

Env. variable CONSOLE_PLUGIN_SKIP_EXT_VALIDATOR is no longer supported by ConsoleRemotePlugin since we already have an explicit option for this purpose (validateExtensionIntegrity).

Other notable changes:

  • @openshift-console/dynamic-plugin-sdk-webpack now depends on @openshift/dynamic-plugin-sdk-webpack
  • removed support for very old Console plugins (where plugin SDK packages use webpack 5.0.0-beta.16)

cc @spadgett @jhadvig

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.

@vojtechszocs vojtechszocs marked this pull request as ready for review November 16, 2023 17:22
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 16, 2023
@TheRealJon
Copy link
Member

/lgtm cancel

Looks like the dynamic demo plugin e2e tests are failing. Might be a legit regression.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2023
@vojtechszocs vojtechszocs force-pushed the adopt-openshift-plugin-sdk branch 2 times, most recently from 4436274 to b8bb412 Compare November 21, 2023 17:43
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 21, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 22, 2023
@vojtechszocs
Copy link
Contributor Author

/test e2e-gcp-console

@TheRealJon
Copy link
Member

/retest

cluster install failed

Copy link
Member

@TheRealJon TheRealJon 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 Nov 22, 2023
Copy link
Contributor

openshift-ci bot commented Nov 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: TheRealJon, 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

@jhadvig
Copy link
Member

jhadvig commented Nov 23, 2023

level=info msg=Waiting up to 40m0s (until 9:58PM UTC) for the cluster at https://api.ci-op-mxqfn55k-75d12.xxxxxxxxxxxxxxxxxxxxxx:6443/ to initialize...
level=error msg=Cluster operator authentication Degraded is True with OAuthServerRouteEndpointAccessibleController_SyncError: OAuthServerRouteEndpointAccessibleControllerDegraded: Get "https://oauth-openshift.apps.ci-op-mxqfn55k-75d12.xxxxxxxxxxxxxxxxxxxxxx/healthz": dial tcp: lookup oauth-openshift.apps.ci-op-mxqfn55k-75d12.XXXXXXXXXXXXXXXXXXXXXX on 172.30.0.10:53: no such host (this is likely result of malfunctioning DNS server)
level=error msg=Cluster operator authentication Available is False with OAuthServerRouteEndpointAccessibleController_EndpointUnavailable: OAuthServerRouteEndpointAccessibleControllerAvailable: Get "https://oauth-openshift.apps.ci-op-mxqfn55k-75d12.XXXXXXXXXXXXXXXXXXXXXX/healthz": dial tcp: lookup oauth-openshift.apps.ci-op-mxqfn55k-75d12.XXXXXXXXXXXXXXXXXXXXXX on 172.30.0.10:53: no such host (this is likely result of malfunctioning DNS server)
level=info msg=Cluster operator baremetal Disabled is False with : 
level=info msg=Cluster operator cloud-controller-manager TrustedCABundleControllerControllerAvailable is True with AsExpected: Trusted CA Bundle Controller works as expected
level=info msg=Cluster operator cloud-controller-manager TrustedCABundleControllerControllerDegraded is False with AsExpected: Trusted CA Bundle Controller works as expected
level=info msg=Cluster operator cloud-controller-manager CloudConfigControllerAvailable is True with AsExpected: Cloud Config Controller works as expected
level=info msg=Cluster operator cloud-controller-manager CloudConfigControllerDegraded is False with AsExpected: Cloud Config Controller works as expected
level=info msg=Cluster operator cloud-controller-manager CloudControllerOwner is True with AsExpected: Cluster Cloud Controller Manager Operator owns cloud controllers at 4.15.0-0.ci.test-2023-11-22-[205](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_console/13188/pull-ci-openshift-console-master-e2e-gcp-console/1727429461328007168#1:build-log.txt%3A205)139-ci-op-mxqfn55k-latest
level=info msg=Cluster operator console Progressing is True with SyncLoopRefresh_InProgress: SyncLoopRefreshProgressing: Working toward version 4.15.0-0.ci.test-2023-11-22-205139-ci-op-mxqfn55k-latest, 0 replicas available
level=error msg=Cluster operator console Available is False with Deployment_InsufficientReplicas::RouteHealth_FailedGet: DeploymentAvailable: 0 replicas available for console deploymen

/retest

@jhadvig
Copy link
Member

jhadvig commented Nov 27, 2023

QE Approver:
/assign @yanpzhan
Docs Approver:
/assign @opayne1
PX Approver:
/assign @RickJWagner

@opayne1
Copy link
Contributor

opayne1 commented Nov 27, 2023

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Nov 27, 2023
@RickJWagner
Copy link

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Nov 27, 2023
@yanpzhan
Copy link
Contributor

@vojtechszocs I checked on cluster launched against the pr, and deployed console-crontab-plugin and console-demo-plugin successfully. If there are other checkpoints need to be covered?

@vojtechszocs
Copy link
Contributor Author

@vojtechszocs I checked on cluster launched against the pr, and deployed console-crontab-plugin and console-demo-plugin successfully. If there are other checkpoints need to be covered?

Hi @yanpzhan - I think the above basic checks should be enough 😃

@yanpzhan
Copy link
Contributor

Thanks all.
/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Nov 29, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 29, 2023

@vojtechszocs: This pull request references CONSOLE-3705 which is a valid jira issue.

In response to this:

This PR updates Console dynamic plugin build-time infrastructure to use webpack code from OpenShift Dynamic Plugin SDK.

Console runtime plugin infrastructure is updated to support both current (legacy) and new (standard) plugin manifest formats.

Console plugins built with updated ConsoleRemotePlugin will use the standard PluginManifest format.

There are two structural differences between Console legacy vs. standard plugin manifest format:

1. Console specific properties

  • legacy: top-level properties in the manifest
"displayName": "Console Demo Plugin",
"description": "Plasma reactors online. Initiating hyper drive.",
"disableStaticPlugins": ["@console/demo-plugin"]
  • standard: scoped to customProperties object under the console namespace
"customProperties": {
 "console": {
   "displayName": "Console Demo Plugin",
   "description": "Plasma reactors online. Initiating hyper drive.",
   "disableStaticPlugins": ["@console/demo-plugin"]
 }
}

2. Additional build metadata

  • legacy: no properties, Console code uses hard-coded conventions
  • standard: new top-level properties in the manifest
"registrationMethod": "callback",
"baseURL": "/api/plugins/console-demo-plugin/",
"loadScripts": ["plugin-entry.js"],
"buildHash": "8740a41586612419c90da43d82c69fb8"

Updated ConsoleRemotePlugin should be backwards compatible. Its options can be omitted entirely:

new ConsoleRemotePlugin(),

or specified explicitly as needed:

new ConsoleRemotePlugin({
 // [added] pluginMetadata - default: parsed from `consolePlugin` object in `package.json` file
 // [added] extensions - default: parsed from `console-extensions.json` file
 // validateExtensionSchema - default: true
 // validateExtensionIntegrity - default: true
 // validateSharedModules - default: true
 // [deleted] validatePackageSchema - plugin metadata validation now done via Yup
}),

Env. variable CONSOLE_PLUGIN_SKIP_EXT_VALIDATOR is no longer supported by ConsoleRemotePlugin since we already have an explicit option for this purpose (validateExtensionIntegrity).

Other notable changes:

  • @openshift-console/dynamic-plugin-sdk-webpack now depends on @openshift/dynamic-plugin-sdk-webpack
  • removed support for very old Console plugins (where plugin SDK packages use webpack 5.0.0-beta.16)

cc @spadgett @jhadvig

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.

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 78189a2 and 2 for PR HEAD dd6de65 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD b5d67e3 and 1 for PR HEAD dd6de65 in total

@openshift-merge-bot openshift-merge-bot bot merged commit 70a927c into openshift:master Nov 30, 2023
6 checks passed
Copy link
Contributor

openshift-ci bot commented Nov 30, 2023

@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-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build openshift-enterprise-console-container-v4.15.0-202311301610.p0.g70a927c.assembly.stream for distgit openshift-enterprise-console.
All builds following this will include this PR.

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/core Related to console core functionality component/sdk Related to console-plugin-sdk docs-approved Signifies that Docs has signed off on this PR 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. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants