Skip to content

Conversation

@logonoff
Copy link
Member

@logonoff logonoff commented Dec 3, 2025

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 3, 2025
@openshift-ci-robot
Copy link
Contributor

@logonoff: This pull request references Jira Issue OCPBUGS-66345, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

The bug has been updated to refer to the pull request using the external bug tracker.

Details

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Dec 3, 2025
@logonoff logonoff changed the title OCPBUGS-66345: Use compiler.webpack object for RSpack compatibility OCPBUGS-66345: Fix broken API exports Dec 3, 2025
@openshift-ci openshift-ci bot requested a review from yapei December 3, 2025 16:23
@coderabbitai
Copy link

coderabbitai bot commented Dec 3, 2025

Walkthrough

Adds API export presence tests; rebinds and renames a topology export; converts several runtime webpack imports to type-only and shifts runtime webpack usages to compiler.webpack; removes thresholds and makes circular dependency detection emit errors unconditionally; updates changelogs.

Changes

Cohort / File(s) Summary
New API tests
frontend/packages/console-dynamic-plugin-sdk/src/api/__tests__/api.spec.ts
Adds tests that import core-api and internal-api and assert each exported member is defined and truthy.
SDK export initializer updates
frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts
Switches UtilizationBody and QuickStartsLoader initializers to use named exports (.UtilizationBody, .QuickStartsLoader) instead of .default.
Export rename / rebind
frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts
Replaces exported getModifyApplicationAction with useGetModifyApplicationAction (type GetModifyApplicationAction) and rebinds to the corresponding named implementation.
Type-only webpack imports (validation & loaders)
frontend/packages/console-dynamic-plugin-sdk/src/validation/ExtensionValidator.ts, frontend/packages/console-dynamic-plugin-sdk/src/validation/__tests__/ExtensionValidator.spec.ts, frontend/packages/console-dynamic-plugin-sdk/src/webpack/loaders/dynamic-module-import-loader.ts
Changes import * as webpack from 'webpack' to import type * as webpack from 'webpack' to remove runtime import while keeping typings.
Type-only webpack imports (plugins & other)
frontend/packages/console-dynamic-plugin-sdk/src/webpack/ConsoleRemotePlugin.ts, frontend/packages/console-dynamic-plugin-sdk/src/webpack/ExtensionValidatorPlugin.ts, frontend/webpack.circular-deps.ts
Converts top-level webpack imports to type-only and updates in-file runtime usages to reference compiler.webpack.* instead of webpack.*.
Circular dependency behavior change
frontend/webpack.circular-deps.ts
Removes thresholds from PresetOptions, deletes applyThresholds, changes cycle handling to always emit a WebpackError when cycles exist, updates report coloring and error construction to use compiler.webpack.
Changelogs
frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md, frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md
Adds/updates prerelease changelog entries documenting removal of direct webpack imports and SDK API notes and other changelog text updates.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Check frontend/webpack.circular-deps.ts for behavioral/API impact due to removed thresholds and unconditional error emission.
  • Verify consumers of the renamed useGetModifyApplicationAction (or references to the old name) are updated or not relied upon.
  • Confirm all compiler.webpack.* usages are valid at runtime and that switching to import type doesn’t break plugin/loader runtime behavior.
  • Run the new API export tests to ensure they correctly detect missing exports and do not false-fail on lazily-initialized values.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between fd5b117 and 52d177c.

📒 Files selected for processing (11)
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/__tests__/api.spec.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts (2 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/validation/ExtensionValidator.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/validation/__tests__/ExtensionValidator.spec.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/ConsoleRemotePlugin.ts (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/ExtensionValidatorPlugin.ts (2 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/loaders/dynamic-module-import-loader.ts (1 hunks)
  • frontend/webpack.circular-deps.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • frontend/packages/console-dynamic-plugin-sdk/src/validation/ExtensionValidator.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/ConsoleRemotePlugin.ts
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/api/__tests__/api.spec.ts
  • frontend/webpack.circular-deps.ts
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/ExtensionValidatorPlugin.ts
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/loaders/dynamic-module-import-loader.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/validation/__tests__/ExtensionValidator.spec.ts
🧬 Code graph analysis (1)
frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (2)
frontend/packages/topology/src/actions/modify-application.ts (1)
  • useGetModifyApplicationAction (6-34)
frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts (1)
  • GetModifyApplicationAction (287-291)
🔇 Additional comments (10)
frontend/packages/console-dynamic-plugin-sdk/src/validation/__tests__/ExtensionValidator.spec.ts (1)

1-1: LGTM: Type-only import is appropriate for test file.

The switch to import type is correct since this test only uses webpack types for type annotations and mocking, not runtime webpack functionality.

frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md (1)

13-16: LGTM: Changelog entry accurately documents the changes.

The new prerelease entry clearly describes the webpack import refactoring and includes proper references to the Jira issue and PR.

frontend/packages/console-dynamic-plugin-sdk/src/webpack/ExtensionValidatorPlugin.ts (1)

2-2: LGTM: Correct migration to type-only import and compiler.webpack.

The change from direct webpack import to type-only import plus compiler.webpack.WebpackError is the correct pattern for rspack compatibility. Error handling behavior remains unchanged.

Also applies to: 37-37

frontend/packages/console-dynamic-plugin-sdk/src/webpack/loaders/dynamic-module-import-loader.ts (1)

2-2: LGTM: Type-only import is sufficient for this loader.

Since this file only references webpack types (LoaderDefinitionFunction) and doesn't use runtime webpack functionality, the type-only import is appropriate.

frontend/packages/console-dynamic-plugin-sdk/src/api/__tests__/api.spec.ts (1)

1-18: LGTM: Effective regression test for export validation.

This test provides good coverage to prevent future export issues. By iterating over all exports and verifying they're defined, it will catch problems like the ones fixed in this PR.

frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (1)

66-67: Verify all references to the renamed export.

The rename from getModifyApplicationAction to useGetModifyApplicationAction is a breaking API change. Ensure all consumers have been updated to use the new name.

frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts (1)

59-59: Verify the source modules export these as named exports.

These changes switch from default exports to named exports. Confirm that the source modules (@console/shared/src/components/dashboard/utilization-card/UtilizationBody and @console/app/src/components/quick-starts/loader/QuickStartsLoader) actually export UtilizationBody and QuickStartsLoader as named exports.

frontend/webpack.circular-deps.ts (1)

97-116: Verification inconclusive—unable to access repository to confirm behavioral changes.

The review comment asserts significant changes (removal of threshold configuration and enforcement of zero-tolerance cycle detection) but cannot be verified without access to the codebase. Specifically:

  • Cannot confirm removal of PresetOptions.thresholds property
  • Cannot verify removal of applyThresholds() function
  • Cannot assess whether this is truly a breaking change for existing projects
  • Cannot validate the impact on current builds

Before approval, verify: (1) whether threshold configuration was genuinely removed across all affected code paths, (2) whether existing projects in the repository have circular dependencies that would break with this stricter enforcement, and (3) whether migration guidance or deprecation warnings are needed.

frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md (2)

13-26: Changelog entries are well-structured and properly document breaking and non-breaking changes.

The new 4.21.0-prerelease.1 section clearly communicates API surface changes (type removals and re-exports), deprecated functionality, and feature enhancements. All entries include proper issue and PR references, and the bolding of change categories (Type breaking, Deprecated) improves readability.


152-152: Verify that all referenced issues and PRs correspond to actual code changes in this PR.

Reference links for CONSOLE-4701 and #15735 have been properly added to the links section. Ensure these references align with the actual ResourceYAMLEditor enhancements mentioned in lines 25–26 and that the PR #15735 exists.

Also applies to: 220-220


Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from TheRealJon and spadgett December 3, 2025 16:24
@openshift-ci openshift-ci bot added component/sdk Related to console-plugin-sdk plugin-api-changed Categorizes a PR as containing plugin API changes approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 3, 2025
@logonoff logonoff force-pushed the OCPBUGS-66345-sdk-fix branch from 4dedf85 to 0687461 Compare December 3, 2025 16:29
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (1)

66-67: Breaking rename of topology modify-application API; consider a compat alias

Exporting useModifyApplicationAction typed as GetModifyApplicationAction is fine, but this is a breaking change for consumers of the former getModifyApplicationAction export. If you want to ease migration for existing plugins, consider also exporting a deprecated alias:

// keep until next major / deprecation window
export const getModifyApplicationAction = useModifyApplicationAction;

and call it out in the main SDK changelog / docs.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 4dedf85 and 0687461.

📒 Files selected for processing (4)
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/__tests__/api.spec.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts (2 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/tests/api.spec.ts
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts
🧬 Code graph analysis (1)
frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (1)
frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts (1)
  • GetModifyApplicationAction (287-291)
🔇 Additional comments (2)
frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md (1)

13-16: Changelog entry and references look consistent

The new prerelease entry and added OCPBUGS/PR references follow the existing format and accurately describe the webpack-related changes in this PR.

Also applies to: 105-105, 123-123

frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts (1)

58-59: UtilizationBody and QuickStartsLoader exports correctly bound to named exports

Changing these to use the named module properties rather than .default aligns with how these components are exposed upstream and should fix the broken exports without altering the SDK’s public API shape.

Also applies to: 70-71

@logonoff logonoff force-pushed the OCPBUGS-66345-sdk-fix branch 2 times, most recently from e378227 to dc2d733 Compare December 3, 2025 16:35
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between e378227 and dc2d733.

📒 Files selected for processing (5)
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/__tests__/api.spec.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts (2 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/tests/api.spec.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md

@logonoff
Copy link
Member Author

logonoff commented Dec 3, 2025

/label acknowledge-critical-fixes-only
/verified by api.spec.ts

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Dec 3, 2025
@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Dec 3, 2025
@openshift-ci-robot
Copy link
Contributor

@logonoff: This PR has been marked as verified by api.spec.ts.

Details

In response to this:

/label acknowledge-critical-fixes-only
/verified by api.spec.ts

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.

@openshift-ci-robot
Copy link
Contributor

@logonoff: This pull request references Jira Issue OCPBUGS-66345, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

The bug has been updated to refer to the pull request using the external bug tracker.

Details

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.

export const getModifyApplicationAction: GetModifyApplicationAction = require('@console/topology/src/actions/modify-application')
.getModifyApplicationAction;
export const useGetModifyApplicationAction: GetModifyApplicationAction = require('@console/topology/src/actions/modify-application')
.useGetModifyApplicationAction;
Copy link
Contributor

Choose a reason for hiding this comment

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

@pcbailey @adamviktora Hi, do you know if this breaks Kubevirt plugin's topology integration?

Copy link
Contributor

Choose a reason for hiding this comment

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

The actual code change is already merged in Console 4.21 branch, so we'll need to update Kubevirt plugin 4.21 code to use a newer version of @openshift-console/dynamic-plugin-sdk-internal package.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vojtechszocs That function is used in src/views/topology/hooks/useModifyApplicationActionProvider.ts, so I would assume this is a breaking change. It should be a simple fix, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

@pcbailey Thanks, I'll post a fix for Kubevirt plugin once Console 4.21 plugin SDK packages are published.

@logonoff logonoff force-pushed the OCPBUGS-66345-sdk-fix branch from dc2d733 to c51deac Compare December 3, 2025 17:00
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Dec 3, 2025
@logonoff
Copy link
Member Author

logonoff commented Dec 3, 2025

/verified by api.spec.ts

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Dec 3, 2025
@openshift-ci-robot
Copy link
Contributor

@logonoff: This PR has been marked as verified by api.spec.ts.

Details

In response to this:

/verified by api.spec.ts

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.

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Dec 3, 2025
@openshift-ci-robot
Copy link
Contributor

@logonoff: This PR has been marked as verified by api.spec.ts.

Details

In response to this:

/verified by api.spec.ts

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
frontend/webpack.circular-deps.ts (1)

108-115: Simplify redundant condition.

The condition if (cycles.length > 0) on line 109 is redundant since the code already returns early when cycles.length === 0 at line 93. At this point, cycles.length is guaranteed to be greater than zero.

Apply this diff to remove the redundant check:

             const minLengthCycles = minLengthCycleCount(cycles);
-            if (cycles.length > 0) {
-              compilation.errors.push(
-                new compiler.webpack.WebpackError(
-                  `${HandleCyclesPluginName}: (${cycles.length}) total cycles detected, ${minLengthCycles} of which are min-length :-(`,
-                ),
-              );
-            }
+            compilation.errors.push(
+              new compiler.webpack.WebpackError(
+                `${HandleCyclesPluginName}: (${cycles.length}) total cycles detected, ${minLengthCycles} of which are min-length :-(`,
+              ),
+            );
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between c51deac and ba269a3.

📒 Files selected for processing (6)
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/__tests__/api.spec.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts (2 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (1 hunks)
  • frontend/webpack.circular-deps.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/api/tests/api.spec.ts
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md
  • frontend/webpack.circular-deps.ts
🔇 Additional comments (5)
frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md (1)

13-15: LGTM! Changelog entry is well-formatted and accurate.

The changelog correctly documents the removal of direct webpack imports in favor of compiler.webpack for better rspack compatibility. The date and references are properly formatted.

Also applies to: 105-105, 123-123

frontend/webpack.circular-deps.ts (2)

4-4: LGTM! Type-only import aligns with rspack compatibility goals.

Switching to import type ensures webpack is only used for type references, with runtime usage delegated to compiler.webpack.


105-105: LGTM! Error signaling and WebpackError usage are correct.

The change to red console output appropriately signals an error condition, and using compiler.webpack.WebpackError ensures rspack compatibility.

Also applies to: 111-111

frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts (1)

58-59: LGTM! Named export fixes resolve broken API imports.

Switching from .default to named exports (.UtilizationBody and .QuickStartsLoader) correctly fixes the broken imports as indicated in the PR title.

Also applies to: 70-71

frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md (1)

13-26: LGTM! Comprehensive changelog with clear breaking change documentation.

The changelog entries are well-formatted and clearly document deprecations, type-breaking changes, and enhancements with appropriate markers and references.

Also applies to: 152-152, 220-220

@logonoff logonoff force-pushed the OCPBUGS-66345-sdk-fix branch from ba269a3 to fd5b117 Compare December 3, 2025 17:28
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Dec 3, 2025
@logonoff logonoff force-pushed the OCPBUGS-66345-sdk-fix branch 2 times, most recently from 27a9c0a to ef04d8a Compare December 3, 2025 17:30
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
frontend/webpack.circular-deps.ts (1)

4-4: Unconditional cycle error emission looks correct; inner length check is redundant

The preset now consistently errors when any cycles are detected, and using compiler.webpack.WebpackError avoids a hard runtime dependency on the webpack package from this module. Given the early if (cycles.length === 0) return;, the later if (cycles.length > 0) guard is redundant and could be dropped to slightly simplify the emit hook.

Also applies to: 105-115

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between ba269a3 and fd5b117.

📒 Files selected for processing (11)
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/__tests__/api.spec.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts (2 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/validation/ExtensionValidator.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/validation/__tests__/ExtensionValidator.spec.ts (1 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/ConsoleRemotePlugin.ts (3 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/ExtensionValidatorPlugin.ts (2 hunks)
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/loaders/dynamic-module-import-loader.ts (1 hunks)
  • frontend/webpack.circular-deps.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/loaders/dynamic-module-import-loader.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/ExtensionValidatorPlugin.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/validation/ExtensionValidator.ts
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md
  • frontend/packages/console-dynamic-plugin-sdk/src/webpack/ConsoleRemotePlugin.ts
  • frontend/webpack.circular-deps.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/validation/__tests__/ExtensionValidator.spec.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/api/__tests__/api.spec.ts
  • frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md
🧬 Code graph analysis (1)
frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (2)
frontend/packages/topology/src/actions/modify-application.ts (1)
  • useGetModifyApplicationAction (6-34)
frontend/packages/console-dynamic-plugin-sdk/src/extensions/topology-types.ts (1)
  • GetModifyApplicationAction (287-291)
🔇 Additional comments (6)
frontend/packages/console-dynamic-plugin-sdk/src/validation/__tests__/ExtensionValidator.spec.ts (1)

1-1: Type-only webpack import matches usage pattern

The test file only relies on webpack types, so converting the import to import type keeps runtime decoupled from webpack and is consistent with the rest of the file.

frontend/packages/console-dynamic-plugin-sdk/src/api/__tests__/api.spec.ts (1)

1-18: Per-export definition checks are a good guard against broken APIs

Iterating Object.entries for both core and internal APIs and asserting each export is defined gives broad coverage for accidental export breakage with minimal maintenance cost; this looks solid.

frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md (1)

13-16: Changelog entry clearly documents the webpack import refactor

The new 4.21.0-prerelease.1 section, including the note about replacing direct webpack imports with compiler.webpack and the added OCPBUGS/PR references, is consistent with prior entries and makes the behavioral change easy to track.

Also applies to: 105-105, 123-123

frontend/packages/console-dynamic-plugin-sdk/src/api/internal-topology-api.ts (1)

66-67: Export rename correctly targets the hook implementation

Rebinding to useGetModifyApplicationAction while keeping the GetModifyApplicationAction type maintains the expected signature and fixes the underlying export wiring to the topology action.

frontend/packages/console-dynamic-plugin-sdk/src/webpack/ConsoleRemotePlugin.ts (1)

13-13: compiler.webpack usage keeps plugin runtime-coupled to the active compiler

Shifting the webpack import to type-only and routing runtime behavior through compiler.webpack.WebpackError and compiler.webpack.NormalModule.getCompilationHooks cleanly decouples this plugin from a direct webpack module dependency while preserving existing behavior.

Also applies to: 440-441, 460-460

frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md (1)

13-26: Core SDK changelog accurately summarizes the breaking and behavioral changes

The new 4.21.0-prerelease.1 entry clearly calls out deprecations, type-breaking removals, re-exports, and the ResourceYAMLEditor improvements, with appropriate CONSOLE/PR references; this should give plugin authors sufficient guidance for upgrading.

Also applies to: 152-152, 220-220

Instead of directly requiring `webpack`, we can use `compiler.webpack` which ensures that when non-webpack bundlers (i.e., rspack) are used, the correct method is being called.

Also, remove support for `CircularDependencyPreset.thresholds` because it's unused and I never want to see this config option enabled ever again
@logonoff logonoff force-pushed the OCPBUGS-66345-sdk-fix branch from ef04d8a to 52d177c Compare December 3, 2025 17:33
@vojtechszocs
Copy link
Contributor

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 3, 2025

[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

Details 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

@logonoff
Copy link
Member Author

logonoff commented Dec 3, 2025

/verified by api.spec.ts

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2025
@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Dec 3, 2025
@openshift-ci-robot
Copy link
Contributor

@logonoff: This PR has been marked as verified by api.spec.ts.

Details

In response to this:

/verified by api.spec.ts

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.

@vojtechszocs
Copy link
Contributor

/label plugin-api-approved

@openshift-ci openshift-ci bot added the plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer label Dec 3, 2025
@logonoff
Copy link
Member Author

logonoff commented Dec 3, 2025

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 3c16d25 and 2 for PR HEAD 52d177c in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 4, 2025

@logonoff: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@openshift-merge-bot openshift-merge-bot bot merged commit a1ba7dd into openshift:main Dec 4, 2025
8 checks passed
@openshift-ci-robot
Copy link
Contributor

@logonoff: Jira Issue Verification Checks: Jira Issue OCPBUGS-66345
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-66345 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

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.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.21.0-0.nightly-2025-12-08-112148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. component/sdk Related to console-plugin-sdk jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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. plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer plugin-api-changed Categorizes a PR as containing plugin API changes verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants