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: Allow transforming plugin manifest at build time #236

Conversation

vojtechszocs
Copy link
Contributor

  • add DynamicRemotePlugin option transformPluginManifest

    • allows to transform the manifest object before emitting the asset to webpack compilation
    • required by CONSOLE-3705 - adding OpenShift Console specific fields to the plugin manifest
  • rename PluginLoader option postProcessManifest to transformPluginManifest for better consistency

  • rename DynamicRemotePlugin.moduleFederationSettings option sharedScope to sharedScopeName

  • refactor internal webpack plugins to accept single options object for better consistency

@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 26, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 26, 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:

  • add DynamicRemotePlugin option transformPluginManifest

  • allows to transform the manifest object before emitting the asset to webpack compilation

  • required by CONSOLE-3705 - adding OpenShift Console specific fields to the plugin manifest

  • rename PluginLoader option postProcessManifest to transformPluginManifest for better consistency

  • rename DynamicRemotePlugin.moduleFederationSettings option sharedScope to sharedScopeName

  • refactor internal webpack plugins to accept single options object for better consistency

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 26, 2023
@vojtechszocs
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 27, 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.

@codecov-commenter
Copy link

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (ae56932) 41.08% compared to head (74b26c5) 43.55%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #236      +/-   ##
==========================================
+ Coverage   41.08%   43.55%   +2.46%     
==========================================
  Files          69       69              
  Lines        1689     1791     +102     
  Branches      365      409      +44     
==========================================
+ Hits          694      780      +86     
- Misses        955      961       +6     
- Partials       40       50      +10     

see 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -157,7 +157,7 @@ export type PluginLoaderOptions = Partial<{
fetchImpl: ResourceFetch;
fixedPluginDependencyResolutions: Record<string, string>;
sharedScope: AnyObject;
postProcessManifest: (manifest: PluginManifest) => PluginManifest;
transformPluginManifest: TransformPluginManifest;
Copy link
Contributor

Choose a reason for hiding this comment

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

@vojtechszocs looking good! FYI this is used by consoledot - https://github.com/RedHatInsights/insights-chrome/blob/master/src/components/RootApp/ScalprumRoot.tsx#L164

So please be sure to make this a major version bump when publishing.

@florkbr
Copy link
Contributor

florkbr commented Oct 2, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 2, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 2, 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:

  • add DynamicRemotePlugin option transformPluginManifest

  • allows to transform the manifest object before emitting the asset to webpack compilation

  • required by CONSOLE-3705 - adding OpenShift Console specific fields to the plugin manifest

  • rename PluginLoader option postProcessManifest to transformPluginManifest for better consistency

  • rename DynamicRemotePlugin.moduleFederationSettings option sharedScope to sharedScopeName

  • refactor internal webpack plugins to accept single options object for better consistency

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

openshift-ci bot commented Oct 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: florkbr, 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:
  • OWNERS [florkbr,vojtechszocs]

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

@openshift-merge-robot openshift-merge-robot merged commit 0eab266 into openshift:main Oct 2, 2023
2 checks passed
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. 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

5 participants