NO-JIRA: Remove plugin sdk build from yarn dev - #16850
Conversation
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.
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@logonoff: This pull request explicitly references no jira issue. DetailsIn 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. |
|
/label px-approved tested yarn dev and it still works |
|
@logonoff: This PR has been marked as verified by DetailsIn 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
WalkthroughFrontend 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. ChangesPlugin SDK development
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@logonoff: This pull request explicitly references no jira issue. DetailsIn 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. |
| "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", |
There was a problem hiding this comment.
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
|
/lgtm |
|
Scheduling tests matching the |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test backend |
|
/test analyze backend frontend images okd-scos-images |
dec1104
into
openshift:main
Analysis / Root cause:
yarn dev builds the entire plugin SDK when you probably don't need those assets
Solution description:
Update frontend scripts so
cleanalso clears the dynamic plugin SDK output, and switchdev/dev-onceto rungenerate-plugin-sdk-schemainstead of building the entire SDK.In rspack config, resolve the dynamic module import loader from the SDK source path with
require.resolveto 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