Skip to content

NO-JIRA: Remove plugin sdk build from yarn dev - #16850

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
logonoff:dont-build-plugin-sdk
Jul 27, 2026
Merged

NO-JIRA: Remove plugin sdk build from yarn dev#16850
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
logonoff:dont-build-plugin-sdk

Conversation

@logonoff

@logonoff logonoff commented Jul 27, 2026

Copy link
Copy Markdown
Member

Analysis / Root cause:

yarn dev builds the entire plugin SDK when you probably don't need those assets

Solution description:

Update frontend scripts so clean also clears the dynamic plugin SDK output, and switch dev/dev-once to run generate-plugin-sdk-schema instead of building the entire SDK.

In rspack config, resolve the dynamic module import loader from the SDK source path with require.resolve to avoid dist SDK webpack dependency - require.resolve will make ts-node compile the loader before sending it to rspack.

Test cases:

Yarn dev should still work

Summary by CodeRabbit

  • Bug Fixes
    • Improved local development and one-time startup workflows by generating the console plugin SDK schema before launching the application.
    • Updated cleanup tasks to remove generated plugin SDK artifacts.
    • Improved dynamic module loading by resolving the loader through the installed SDK package.

Update frontend scripts so `clean` also clears the dynamic plugin SDK output, and switch `dev`/`dev-once` to run `generate-plugin-sdk-schema` instead of building the entire SDK.

In rspack config, resolve the dynamic module import loader from the SDK source path with `require.resolve` to avoid dist SDK webpack dependency - require.resolve will make ts-node compile the loader before sending it to rspack.
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 27, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@logonoff: This pull request explicitly references no jira issue.

Details

In response to this:

Analysis / Root cause:

yarn dev builds the entire plugin SDK when you probably don't need those assets

Solution description:

Update frontend scripts so clean also clears the dynamic plugin SDK output, and switch dev/dev-once to run generate-plugin-sdk-schema instead of building the entire SDK.

In rspack config, resolve the dynamic module import loader from the SDK source path with require.resolve to avoid dist SDK webpack dependency - require.resolve will make ts-node compile the loader before sending it to rspack.

Test cases:

Yarn dev should still work

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

Copy link
Copy Markdown
Member Author

/label px-approved
/label docs-approved

tested yarn dev and it still works
/verified by @logonoff

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 27, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

Details

In response to this:

/label px-approved
/label docs-approved

tested yarn dev and it still works
/verified by @logonoff

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.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: da76696b-7a77-4e74-b71b-45ff7d764ed2

📥 Commits

Reviewing files that changed from the base of the PR and between 8f7cf70 and 4fc0a72.

📒 Files selected for processing (2)
  • frontend/package.json
  • frontend/rspack.config.mts

Walkthrough

Frontend development now regenerates the console plugin SDK schema, cleans its workspace, and resolves the dynamic-module import loader directly from source instead of the built distribution.

Changes

Plugin SDK development

Layer / File(s) Summary
SDK schema generation and cleanup
frontend/package.json
Development scripts generate the plugin SDK schema, while clean also cleans the SDK workspace.
Source loader resolution
frontend/rspack.config.mts
DynamicModuleImportPlugin resolves its loader from the SDK source path rather than dist.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: rhamilto, vojtechszocs

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: removing the plugin SDK build from yarn dev.
Description check ✅ Passed The description covers root cause, solution, and test cases, with only non-critical template sections left unfilled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR only changes frontend scripts and rspack config; no Ginkgo test declarations or titles were modified.
Test Structure And Quality ✅ Passed PASS: PR only changes frontend package.json and rspack config; no Ginkgo test files or test blocks were touched.
Microshift Test Compatibility ✅ Passed HEAD only changes frontend/package.json and frontend/rspack.config.mts; no Ginkgo e2e tests or MicroShift-sensitive APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only changes frontend scripts and rspack config; no Ginkgo e2e tests or SNO-sensitive test logic were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only frontend/package.json and frontend/rspack.config.mts changed; no deployment manifests, controllers, or topology-sensitive scheduling logic were introduced.
Ote Binary Stdout Contract ✅ Passed Only scripts and rspack loader resolution changed; no process-level stdout writes or logging setup were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the commit only changes frontend package scripts and rspack config.
No-Weak-Crypto ✅ Passed Touched files only adjust frontend scripts and loader resolution; no weak crypto primitives or secret comparisons appear in the changed code.
Container-Privileges ✅ Passed PR only changes frontend scripts and rspack loader resolution; it չի touch container/K8s manifests or add privileged/root settings.
No-Sensitive-Data-In-Logs ✅ Passed No logging or sensitive-data output was added; the diff only changes build scripts and a loader path.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels Jul 27, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@logonoff: This pull request explicitly references no jira issue.

Details

In response to this:

Analysis / Root cause:

yarn dev builds the entire plugin SDK when you probably don't need those assets

Solution description:

Update frontend scripts so clean also clears the dynamic plugin SDK output, and switch dev/dev-once to run generate-plugin-sdk-schema instead of building the entire SDK.

In rspack config, resolve the dynamic module import loader from the SDK source path with require.resolve to avoid dist SDK webpack dependency - require.resolve will make ts-node compile the loader before sending it to rspack.

Test cases:

Yarn dev should still work

Summary by CodeRabbit

  • Bug Fixes
  • Improved local development and one-time startup workflows by generating the console plugin SDK schema before launching the application.
  • Updated cleanup tasks to remove generated plugin SDK artifacts.
  • Improved dynamic module loading by resolving the loader through the installed SDK package.

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
openshift-ci Bot requested review from jhadvig and spadgett July 27, 2026 17:50
Comment thread frontend/package.json
"clean": "rm -rf ./public/dist",
"dev": "yarn clean && yarn build-plugin-sdk && REACT_REFRESH=true NODE_OPTIONS=--max-old-space-size=4096 yarn ts-node ./node_modules/.bin/rspack serve --mode=development",
"dev-once": "yarn clean && yarn build-plugin-sdk && NODE_OPTIONS=--max-old-space-size=4096 yarn ts-node ./node_modules/.bin/rspack --mode=development",
"clean": "rm -rf ./public/dist && yarn --cwd packages/console-dynamic-plugin-sdk clean",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Now that build-plugin-sdk isn't run during dev/dev-once, that script isn't cleaning the SDK dist folders anymore. Moving this responsibility into the main clean script to ensure no stale artifacts make it to dev builds

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2026
@vojtechszocs

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 27, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-gcp-console
/test e2e-playwright

@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

[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
Copy Markdown
Member Author

/test backend

@logonoff

Copy link
Copy Markdown
Member Author

/test analyze backend frontend images okd-scos-images

@openshift-merge-bot
openshift-merge-bot Bot merged commit dec1104 into openshift:main Jul 27, 2026
8 of 11 checks passed
@logonoff
logonoff deleted the dont-build-plugin-sdk branch July 27, 2026 19:52
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. docs-approved Signifies that Docs has signed off on this PR 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. px-approved Signifies that Product Support has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants