fix: correct release_workspace.yml condition to unblock npm publish - #4337
Conversation
PR Summary by QodoFix release workflow condition to unblock npm publishing
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
|
🤖 Finished Review · ✅ Success · Started 5:32 PM UTC · Completed 5:45 PM UTC Commit: |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR |
|
Preparing PR labels... |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4337 +/- ##
=======================================
Coverage 61.38% 61.38%
=======================================
Files 2520 2520
Lines 100936 100936
Branches 28304 28304
=======================================
Hits 61958 61958
+ Misses 38427 38420 -7
- Partials 551 558 +7
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
ReviewFindingsHigh
Labels: PR fixes a bug in the CI release workflow Next steps:
|
The `changesets-pr` step's `if` condition used `||` (OR) instead of `&&` (AND), causing the backstage/changesets-action to run even when `needs_release=true` — i.e., when a Version Packages PR has just been merged and the release job should run instead. The condition was: needs_release != 'true' || force_release != true Since `force_release` defaults to false (not set), the right side (`false != true`) is ALWAYS true, making the entire OR expression true regardless of `needs_release`. This means the changesets-action step runs unconditionally. When a Version Packages PR merge leaves zero unconsumed changesets for the workspace, the action finds nothing to do, attempts to create an empty PR, and fails with: "No commits between main and changesets-release/<workspace>/main" Because the `changesets-pr` job fails, the `release` job (which has `needs: changesets-pr`) is skipped by GitHub Actions — so the npm publish never happens. The fix changes `||` to `&&`: needs_release != 'true' && force_release != true Now when `needs_release=true`: `false && true` = `false` → the changesets-action step is skipped → the job succeeds → the release job runs → packages are published to npm. This bug was not previously observed because it only surfaces when a Version Packages PR merge leaves zero remaining changesets for the affected workspace. If other changesets are pending, the action finds them and succeeds, masking the logic error. Immediate impact: the ai-integrations workspace packages `catalog-backend-module-ai-model-server@0.3.0` and `catalog-backend-module-ai-resource-agent@0.4.0` (from PR redhat-developer#4320, switching from addModelSource to addProcessor) were version-bumped by Version Packages PR redhat-developer#4332 but never published to npm. A patch changeset is included to trigger a new version cycle that will publish these packages once this fix lands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: gabemontero <gmontero@redhat.com>
8302c83 to
cebb0dc
Compare
|
|
per our convo in slack @hopehadfield PTAL / thanks so much |



The
changesets-prstep'sifcondition used||(OR) instead of&&(AND), causing the backstage/changesets-action to run even whenneeds_release=true— i.e., when a Version Packages PR has just been merged and the release job should run instead.The condition was:
needs_release != 'true' || force_release != true
Since
force_releasedefaults to false (not set), the right side (false != true) is ALWAYS true, making the entire OR expression true regardless ofneeds_release. This means the changesets-action step runs unconditionally. When a Version Packages PR merge leaves zero unconsumed changesets for the workspace, the action finds nothing to do, attempts to create an empty PR, and fails with:"No commits between main and changesets-release//main"
An example failure can be seen at https://github.com/redhat-developer/rhdh-plugins/actions/runs/31861654161/job/95193449174
Because the
changesets-prjob fails, thereleasejob (which hasneeds: changesets-pr) is skipped by GitHub Actions — so the npm publish never happens.The fix changes
||to&&:needs_release != 'true' && force_release != true
Now when
needs_release=true:false && true=false→ the changesets-action step is skipped → the job succeeds → the release job runs → packages are published to npm.This bug was not previously observed because it only surfaces when a Version Packages PR merge leaves zero remaining changesets for the affected workspace. If other changesets are pending, the action finds them and succeeds, masking the logic error.
Immediate impact: the ai-integrations workspace packages
catalog-backend-module-ai-model-server@0.3.0andcatalog-backend-module-ai-resource-agent@0.4.0(from PR #4320, switching from addModelSource to addProcessor) were version-bumped by Version Packages PR #4332 but never published to npm. A patch changeset is included to trigger a new version cycle that will publish these packages once this fix lands.Hey, I just made a Pull Request!
✔️ Checklist