-
Notifications
You must be signed in to change notification settings - Fork 661
CONSOLE-4806: Remove static extensions from knative-plugin #15641
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
base: main
Are you sure you want to change the base?
CONSOLE-4806: Remove static extensions from knative-plugin #15641
Conversation
…ate console-extensions.json to include new topology data model factories for serving, eventing, and kamelets, and remove deprecated topology-plugin.ts file
|
@Leo6Leo: This pull request references CONSOLE-4806 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.21.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 openshift-eng/jira-lifecycle-plugin repository. |
| "resources": { | ||
| "$codeRef": "getKnativeResources.getKnativeServingResources" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resources expects a WatchK8sResourcesGeneric and not a codeRef
| "resources": { | ||
| "$codeRef": "getKnativeResources.getKnativeEventingResources" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resources expects a WatchK8sResourcesGeneric and not a codeRef.
The challenge of this ticket is that getKnativeEventingResources is dynamic, so we need to modify console.topology/data/factory to also allow codeRefs.
We discussed in the dynamic plugin sync that this coderef should be typed with
resources: WatchK8sResourcesGeneric | CodeRef<() => Promise<WatchK8sResourcesGeneric>>.
The promise is needed as plugins may want to do some fetching in order to determine which k8s resources should be wtached.
This will require changes to any code which consumes the TopologyDataModelFactory extension. I suggest possibly writing a useTopologyDataModelFactory hook in the topology package to allow resolve the codeRefs
This API change is already approved by @spadgett so you will get plugin-api-approved with this change
| "resources": { | ||
| "$codeRef": "getKnativeResources.getKnativeEventingKameletsResources" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resources expects a WatchK8sResourcesGeneric and not a codeRef.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job @Leo6Leo 👍
/lgtm
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhadvig, Leo6Leo 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 |
|
/hold for addressing the PR review from @logonoff |
|
@Leo6Leo: The following tests failed, say
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. |
Description
As a part of the alignment of OpenShift console's dynamic plugin sdk and the OpenShift dynamic plugin sdk, we want to get rid of the long-standing legacy "static plugin" API which is still used in console.
To do this, we can gradually migrate each "static plugin extension" to the equivalent "dynamic extension". This ensures better alignment of web console code with its own SDK.
AC: All static extension in the plugin mentioned in the ticket name is removed and replaced with the dynamic counterpart