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
Migrate pipelines plugin static extension to dynamic #9842
Migrate pipelines plugin static extension to dynamic #9842
Conversation
/assign @rohitkrai03 |
2359399
to
86f9fea
Compare
/cc @karthikjeeyar |
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.
We could move few more entries to dynamic extension.
"pipelinesComponent": "src/components/pipelines", | ||
"pipelineRunsComponent": "src/components/pipelineruns", | ||
"taskRunsComponent": "src/components/taskruns", | ||
"repositoryComponent": "src/components/repository", | ||
"clusterTasksComponent": "src/components/cluster-tasks", | ||
"tasksComponent": "src/components/tasks", | ||
"conditionsComponent": "src/components/conditions", | ||
"pipelineComponent": "src/components", | ||
"pipelinesListsComponent": "src/components/pipelines-lists", | ||
"triggersListsComponent": "src/components/triggers-lists" |
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.
Instead have a index.ts in src/components
that exports all these components and expose it as pipelineComponents
like below.
"pipelinesComponent": "src/components/pipelines", | |
"pipelineRunsComponent": "src/components/pipelineruns", | |
"taskRunsComponent": "src/components/taskruns", | |
"repositoryComponent": "src/components/repository", | |
"clusterTasksComponent": "src/components/cluster-tasks", | |
"tasksComponent": "src/components/tasks", | |
"conditionsComponent": "src/components/conditions", | |
"pipelineComponent": "src/components", | |
"pipelinesListsComponent": "src/components/pipelines-lists", | |
"triggersListsComponent": "src/components/triggers-lists" | |
"pipelineComponents": "src/components", |
"/k8s/ns/:ns/tekton.dev~v1alpha1~PipelineRun" | ||
], | ||
"component": { | ||
"$codeRef": "pipelineRunsComponent.PipelineRunsPage" |
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.
based on my previous comment. (update in all other occurrences in this file)
"$codeRef": "pipelineRunsComponent.PipelineRunsPage" | |
"$codeRef": "pipelineComponents.PipelineRunsPage" |
@@ -49,14 +28,7 @@ const plugin: Plugin<ConsumedExtensions> = [ | |||
{ | |||
type: 'ModelDefinition', | |||
properties: { |
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.
We can move all the ModelDefinition
entries to dynamic plugin as well.
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.
added the dynamic extension for model definition in the console-extention.json
file but have kept this as is because the dynamic ex for this is not been consumed yet
@@ -31,16 +29,4 @@ export const pipelinesTopologyPlugin: Plugin<PipelineTopologyConsumedExtensions> | |||
required: [FLAG_OPENSHIFT_PIPELINE], |
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.
I think we should move this type: 'Topology/DataModelFactory'
to dynamic plugin as well and remove this PipelineTopologyPlugin
from plugin.tsx .
) | ||
).default, | ||
}, | ||
}, | ||
...pipelinesTopologyPlugin, |
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.
We can remove this, based on my previous comment.
type ConsumedExtensions = | ||
| ModelDefinition | ||
| ModelFeatureFlag | ||
| ResourceListPage |
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.
Since we moved most of this to dynamic we can remove this from this file.
86f9fea
to
63e97dd
Compare
@@ -24,8 +24,7 @@ | |||
"yamlTemplates": "src/templates/pipelines.ts", | |||
"catalog": "src/components/catalog", | |||
"topology": "src/topology", | |||
"pipelineTabbedPage": "src/components/pipelines/PipelineTabbedPage.tsx", | |||
"repositoryListComponent": "src/components/repository/list-page" | |||
"pipelineComponents": "src/components" |
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.
I think it's a good idea to separate exposed modules for separate areas to keep the chunk size smaller. I saw an earlier comment from @karthikjeeyar to merge it together into one module. This will increase the chunk size and load up everything at once. Maybe do not create so many modules. Try to group things together which you think should load together.
@@ -69,310 +20,6 @@ const plugin: Plugin<ConsumedExtensions> = [ | |||
).then((m) => m.default), | |||
}, | |||
}, |
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.
Not sure if the overview section extension is being used anymore with the new topology sidebar extensions. @debsmita1 Can check if this is still being used?
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.
removed it
63e97dd
to
6269e40
Compare
/lgtm |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: debsmita1, karthikjeeyar, rohitkrai03 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 |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/label px-approved |
Jira story:
https://issues.redhat.com/browse/ODC-6197
Solution description:
migrate static extensions that are being used in plugin.ts to use dynamic extensions in console-extensions.json