OCPBUGS-80940: Fix SDK publish workflow for Yarn Berry#16392
OCPBUGS-80940: Fix SDK publish workflow for Yarn Berry#16392logonoff wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@logonoff: This pull request references Jira Issue OCPBUGS-80940, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
/assign @vojtechszocs |
|
/cherry-pick release-4.22 |
|
@logonoff: once the present PR merges, I will cherry-pick it on top of 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 kubernetes-sigs/prow repository. |
|
@logonoff: This pull request references Jira Issue OCPBUGS-80940, which is valid. 3 validation(s) were run on this bug
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. |
📝 WalkthroughWalkthroughThis change refactors the publishing workflow for the console-dynamic-plugin-sdk packages. A new 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/packages/console-dynamic-plugin-sdk/README.md (1)
525-536: ⚡ Quick winMake
<pkg>explicit in the publish instructions (reduce user error).The README now says
npm publish ./dist/<pkg>, but it doesn’t spell out the valid<pkg>values (even though the code usescore,internal,webpack). Adding that small clarification will avoid accidental publishes from the wrong directory and reduce “trial-and-error” time.📝 Proposed doc tweak
-Finally, publish relevant packages to [npm registry](https://www.npmjs.com/): +Finally, publish relevant packages to [npm registry](https://www.npmjs.com/). +`<pkg>` is one of: `core`, `internal`, `webpack` (publish from `./dist/<pkg>`). ```sh -npm publish ./dist/<pkg> +npm publish ./dist/core +npm publish ./dist/internal +npm publish ./dist/webpack</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@frontend/packages/console-dynamic-plugin-sdk/README.mdaround lines 525 -
536, The publish instructions in README.md are ambiguous; update the README
lines that currently shownpm publish ./dist/<pkg>to list the explicit
packages used by the project:core,internal, andwebpackso users run
npm publish ./dist/core,npm publish ./dist/internal, andnpm publish ./dist/webpackinstead of a generic<pkg>; modify the README section where
the publish command appears to replace the placeholder with these three explicit
entries to reduce accidental publishes.</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In@frontend/packages/console-dynamic-plugin-sdk/README.md:
- Around line 525-536: The publish instructions in README.md are ambiguous;
update the README lines that currently shownpm publish ./dist/<pkg>to list
the explicit packages used by the project:core,internal, andwebpackso
users runnpm publish ./dist/core,npm publish ./dist/internal, andnpm publish ./dist/webpackinstead of a generic<pkg>; modify the README section
where the publish command appears to replace the placeholder with these three
explicit entries to reduce accidental publishes.</details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Repository YAML (base), Central YAML (inherited) **Review profile**: CHILL **Plan**: Enterprise **Run ID**: `d6a1e830-1e97-4f34-a305-bebdc634db15` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 2f5206721497f358c7f90b9bc7ad00de01752b04 and 6f7f7c86787fead11ce538e735b764fb15c2a9dc. </details> <details> <summary>📒 Files selected for processing (3)</summary> * `frontend/packages/console-dynamic-plugin-sdk/README.md` * `frontend/packages/console-dynamic-plugin-sdk/package.json` * `frontend/packages/console-dynamic-plugin-sdk/scripts/package-definitions.ts` </details> </details> <details> <summary>📜 Review details</summary> <details> <summary>🔇 Additional comments (1)</summary><blockquote> <details> <summary>frontend/packages/console-dynamic-plugin-sdk/scripts/package-definitions.ts (1)</summary><blockquote> `16-17`: **LGTM — JSDoc accurately matches the new publish flow.** The clarification that `manifest.version` must be set before publishing is consistent with the new `set-version` pre-publish step and should prevent future confusion. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
|
@logonoff: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fsgreco, logonoff 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 |
Analysis / Root cause:
Yarn Berry changed
yarn publishtoyarn npm publish, but the dist packages aren't part of the yarn workspace sonpm publishis used directly.Solution description:
Adds a
set-versionscript to set the version across all three dist packages before publishing, since Yarn Berry dropped the--new-versionflag.Test cases:
--dry-run..yarnrc.ymland"packageManager"frompackage.json--dry-runresults and make sure they're the sameSummary by CodeRabbit
Documentation
Chores