Skip to content

Conversation

@rrosatti
Copy link
Contributor

Hey, I just made a Pull Request!

Description

After #2142 PR merged, I noticed that the "Release all workspaces" failed at the publish step:

Screenshot 2026-01-26 at 10 53 37

Job: https://github.com/redhat-developer/rhdh-plugins/actions/runs/21294851539/job/61298178895

It seems yarn 4.* requires a scope flag (all/recursive/since/worktree) for yarn workspaces foreach, otherwise it fails. This PR adds -A scope flag only when Yarn 4 is detected to preserve Yarn 3 behavior.

Extra info

I tried using yarn 3.8.7 locally, but yarn dedupe hit an assertion error.

I tried to fix it, but did not succeed. That's why I opted to use yarn 4, since it worked fine.

If yarn 3 is preferred, I'm happy to adjust. let me know if you've seen this issue before and how to fix it ☕

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

Use -A with yarn workspaces foreach when Yarn 4.* is detected.
Yarn 4 requires a scope flag (all/recursive/since/worktree) or the command
fails.
@rrosatti rrosatti self-assigned this Jan 26, 2026
@rrosatti rrosatti requested review from a team as code owners January 26, 2026 10:38
@sonarqubecloud
Copy link

run: |
yarn config set -H 'npmAuthToken' "${{ secrets.RHDH_NPM_TOKEN }}"
yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish
YARN_VERSION="$(yarn --version)"

Choose a reason for hiding this comment

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

super nit: How about create one reusable step or function for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's a nice idea! but I was thinking that it would be better to make minimal changes in this PR. Especially because I'm touching the release workflow files :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants