CONSOLE-3769: Even more openshift/dynamic-plugin-sdk prep work
- BREAKING: Removed support for plugins that provide
LegacyConsolePluginManifest - BREAKING: Followed up on #15671 and removed
setPluginStore - Type breaking:
ExtensionDeclarationrenamed toExtension, because there are no more "static extensions".ExtensionDeclarationtype is removed and its replacement is theExtensiontype. - The idea of "dynamic" vs "static" extensions are entirely removed, we only have "extensions".
@console/plugin-sdkbarrel files and type reexports are removedLazyLoadertype in@console/plugin-sdkmigrated toAsyncComponentbecause it's only used in that context
@logonoff: This pull request references CONSOLE-3769 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 either version "4.21." or "openshift-4.21.", but it targets "openshift-4.15" instead.
In response to this:
ExtensionDeclarationrenamed toExtension, because there are no more "static extensions".ExtensionDeclarationtype is removed and its replacement is theExtensiontype.- The idea of "dynamic" vs "static" extensions are entirely removed, we only have "extensions".
@console/plugin-sdkbarrel files and type reexports are removedLazyLoadertype in@console/plugin-sdkmigrated toAsyncComponentbecause it's only used in that context
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.
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
Walkthrough
Widespread TypeScript type migration and API surface changes: replaced ExtensionDeclaration with Extension across the SDK, tightened generics and moved many imports to type-only (dynamic-plugin-sdk), consolidated manifest types to ConsolePluginManifest (removed adapter), renamed parser class, and introduced LazyLoader/AsyncComponent lifecycle updates.
Changes
| Cohort / File(s) | Change Summary |
|---|---|
Extension type migration frontend/packages/console-dynamic-plugin-sdk/src/extensions/* |
Replaced ExtensionDeclaration<...> with Extension<...> across many extension modules; removed ExtensionDeclaration imports; updated exported type aliases and updated type guard signatures where applicable. |
Core types & generics frontend/packages/console-dynamic-plugin-sdk/src/types.ts, .../src/coderefs/coderef-resolver.ts, .../src/api/useResolvedExtensions.ts |
Tightened generics (use Extension<string, P> / AnyObject defaults), adjusted helper types (ExtensionProperties, UpdateExtensionProperties, ResolvedExtension), and converted several imports to type-only. |
Manifest types & runtime API frontend/packages/console-dynamic-plugin-sdk/src/build-types.ts, .../src/schema/plugin-manifest.ts, .../src/runtime/*, .../src/utils/test-utils.ts, .../src/runtime/__tests__/* |
Consolidated manifest types to ConsolePluginManifest; updated function/test signatures and internal types to use ConsolePluginManifest; removed legacy manifest types and related utilities. |
Removed adapter & noop APIs frontend/packages/console-dynamic-plugin-sdk/src/runtime/plugin-loader.ts, frontend/packages/console-dynamic-plugin-sdk/src/utils/k8s/k8s-utils.ts |
Removed exported adaptPluginManifest and deprecated setPluginStore; loader now consumes ConsolePluginManifest directly. |
Parsers / schema generator frontend/packages/console-dynamic-plugin-sdk/scripts/generate-schema.ts, frontend/packages/console-dynamic-plugin-sdk/scripts/parsers/ExtensionParser.ts, .../scripts/utils/type-resolver.ts |
Renamed ExtensionDeclarationParser โ ExtensionParser; updated registrations and replaced ExtensionDeclaration references with Extension in parser and type-resolver logic and messages. |
Async & LazyLoader refactor frontend/public/components/utils/async.tsx, plus consumers |
Introduced public LazyLoader type, reworked AsyncComponent props/state and lifecycle (getDerivedStateFromProps, componentDidMount/Update/WillUnmount) to use LazyLoader; updated consumers to import new type or local async utils. |
Plugin SDK barrel & typings rework frontend/packages/console-plugin-sdk/src/index.ts, .../src/typings/*, .../src/store.ts, .../src/typings/base.ts |
Removed legacy re-exports and several deprecated exported types, added ActivePlugin, migrated store APIs/types to ConsolePluginManifest, and moved many type imports to @console/dynamic-plugin-sdk. |
| Type-only import migrations (consumers & tests) e.g. frontend/packages/console-app/src/**, frontend/packages/console-shared/src/**, frontend/packages/dev-console/src/**, frontend/public/**, frontend/packages/topology/src/**, frontend/packages/console-plugin-sdk/src/** |
Converted many value imports to type-only imports and redirected types to @console/dynamic-plugin-sdk/src/types (e.g., Extension, LoadedExtension, EncodedCodeRef); updated tests accordingly. |
Changelog / README / docs frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md, .../README.md, .../upgrade-sdk.md |
Added prerelease changelog entries, updated README paths/formatting, and added SDK upgrade notes. |
| Misc consumer runtime tweaks examples: frontend/public/components/notification-drawer.tsx, frontend/public/reducers/features.ts, frontend/public/components/dashboard/.../health-item.tsx |
Switched some runtime imports to type-only or to internal async utils; one reducer relaxes types with as any; adjusted imports to new types and updated consumers to new async utilities. |
Estimated code review effort
๐ฏ 4 (Complex) | โฑ๏ธ ~60 minutes
Areas to pay extra attention:
- frontend/packages/console-dynamic-plugin-sdk/src/types.ts โ verify generic changes, exported surface, and downstream compatibility.
- frontend/packages/console-dynamic-plugin-sdk/src/runtime/plugin-loader.ts & plugin-dependencies.ts โ confirm callers/tests align with removal of adaptPluginManifest and new ConsolePluginManifest usage.
- frontend/public/components/utils/async.tsx โ inspect LazyLoader/AsyncComponent lifecycle, typings, and consumer compatibility.
- scripts/parsers/ExtensionParser.ts, scripts/generate-schema.ts, scripts/utils/type-resolver.ts โ ensure schema generation/parsing matches
Extension<T,P>. - frontend/packages/console-plugin-sdk barrel and typings changes โ search for residual imports referencing removed/relocated exports.
โจ Finishing touches
- [ ] ๐ Generate docstrings
๐งช Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Comment @coderabbitai help to get the list of available commands and usage tips.
@logonoff: This pull request references CONSOLE-3769 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 either version "4.21." or "openshift-4.21.", but it targets "openshift-4.15" instead.
In response to this:
ExtensionDeclarationrenamed toExtension, because there are no more "static extensions".ExtensionDeclarationtype is removed and its replacement is theExtensiontype.- The idea of "dynamic" vs "static" extensions are entirely removed, we only have "extensions".
@console/plugin-sdkbarrel files and type reexports are removedLazyLoadertype in@console/plugin-sdkmigrated toAsyncComponentbecause it's only used in that context- Removed support for plugins that provide
LegacyConsolePluginManifest
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 pull request references CONSOLE-3769 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 either version "4.21." or "openshift-4.21.", but it targets "openshift-4.15" instead.
In response to this:
- BREAKING: Removed support for plugins that provide
LegacyConsolePluginManifest- BREAKING: Followed up on #15671 and removed
setPluginStore- Type breaking:
ExtensionDeclarationrenamed toExtension, because there are no more "static extensions".ExtensionDeclarationtype is removed and its replacement is theExtensiontype.- The idea of "dynamic" vs "static" extensions are entirely removed, we only have "extensions".
@console/plugin-sdkbarrel files and type reexports are removedLazyLoadertype in@console/plugin-sdkmigrated toAsyncComponentbecause it's only used in that context
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.
/label px-approved /label docs-approved
/label acknowledge-critical-fixes-only
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: logonoff, vojtechszocs
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~frontend/OWNERS~~ [logonoff,vojtechszocs]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/label plugin-api-approved
@logonoff: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| ci/prow/okd-scos-images | 17ce13e074938813d47e6b39998354656071c297 | link | true | /test okd-scos-images |
| ci/prow/e2e-gcp-console | 17ce13e074938813d47e6b39998354656071c297 | link | true | /test e2e-gcp-console |
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-sigs/prow repository. I understand the commands that are listed here.