Skip to content

fix: correct release_workspace.yml condition to unblock npm publish - #4337

Merged
hopehadfield merged 1 commit into
redhat-developer:mainfrom
gabemontero:publish-workflow-tweak-unblock-ai-integrations
Aug 17, 2026
Merged

fix: correct release_workspace.yml condition to unblock npm publish#4337
hopehadfield merged 1 commit into
redhat-developer:mainfrom
gabemontero:publish-workflow-tweak-unblock-ai-integrations

Conversation

@gabemontero

Copy link
Copy Markdown
Contributor

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//main"

An example failure can be seen at https://github.com/redhat-developer/rhdh-plugins/actions/runs/31861654161/job/95193449174

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 #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

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

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Fix release workflow condition to unblock npm publishing

🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Fix changesets-pr gating logic so changesets action is skipped when a release is needed
• Prevent empty “Version Packages” PR creation that previously failed the workflow
• Add a patch changeset to re-trigger publishing for ai-integrations packages
Diagram

graph TD
  A["release_workspace.yml workflow"] --> B["release_check step"] --> C{needs_release != 'true'\nAND force_release != true}
  C -->|true| D["changesets-action (create PR)"] --> E["changesets-pr job success"] --> F["release job (npm publish)"]
  C -->|false| G["skip changesets-action"] --> E
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Make changesets-action non-blocking (continue-on-error)
  • ➕ Would avoid skipping the release job if changesets-action fails in edge cases
  • ➖ Can mask genuine failures in changeset PR creation
  • ➖ May allow releases to proceed in an unintended state (harder to reason about correctness)
2. Split into separate workflows (changesets PR vs publish)
  • ➕ Clearer separation of concerns; publish workflow can be triggered independently when conditions are met
  • ➖ More moving parts (triggers, concurrency, permissions)
  • ➖ Higher maintenance than a targeted boolean fix

Recommendation: Keep the current approach: correcting the boolean condition is the smallest, most reliable fix because it restores the intended control flow (skip changesets PR creation when a release is due) without weakening failure signaling or adding workflow complexity.

Files changed (2) +7 / -1

Bug fix (1) +1 / -1
release_workspace.ymlFix changesets PR step condition to only run when no release is needed +1/-1

Fix changesets PR step condition to only run when no release is needed

• Replaces an always-true OR condition with an AND condition on the 'changesets-pr' step. This prevents 'backstage/changesets-action' from running when 'needs_release=true', avoiding empty PR creation failures and unblocking the downstream release/publish job.

.github/workflows/release_workspace.yml

Other (1) +6 / -0
publish-addprocessor-fix.mdAdd patch changeset to trigger ai-integrations republish +6/-0

Add patch changeset to trigger ai-integrations republish

• Adds a changeset bumping the ai-integrations AI model server and resource agent packages by a patch version. This forces a new release cycle so the previously blocked npm publish can complete once the workflow fix is merged.

workspaces/ai-integrations/.changeset/publish-addprocessor-fix.md

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 16, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:32 PM UTC · Completed 5:45 PM UTC

Commit: 8302c83 · View workflow run →

@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@rhdh-qodo-merge

Copy link
Copy Markdown

Preparing PR labels...

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.38%. Comparing base (ee6947c) to head (8302c83).
✅ All tests successful. No failed tests found.

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     
Flag Coverage Δ *Carryforward flag
adoption-insights 84.55% <ø> (ø) Carriedforward from ee6947c
ai-integrations 73.13% <ø> (ø)
app-defaults 69.79% <ø> (ø) Carriedforward from ee6947c
augment 46.67% <ø> (ø) Carriedforward from ee6947c
boost 79.00% <ø> (ø) Carriedforward from ee6947c
bulk-import 72.79% <ø> (ø) Carriedforward from ee6947c
cost-management 13.55% <ø> (ø) Carriedforward from ee6947c
dcm 67.21% <ø> (ø) Carriedforward from ee6947c
e2e-adoption-insights 60.00% <ø> (ø) Carriedforward from ee6947c
e2e-extensions 62.13% <ø> (ø) Carriedforward from ee6947c
e2e-global-header 49.45% <ø> (ø) Carriedforward from ee6947c
e2e-homepage 43.49% <ø> (ø) Carriedforward from ee6947c
e2e-intelligent-assistant 46.68% <ø> (ø) Carriedforward from ee6947c
e2e-orchestrator 50.42% <ø> (ø) Carriedforward from ee6947c
e2e-quickstart 55.21% <ø> (ø) Carriedforward from ee6947c
e2e-scorecard 50.21% <ø> (ø) Carriedforward from ee6947c
e2e-theme 16.36% <ø> (ø) Carriedforward from ee6947c
extensions 56.59% <ø> (ø) Carriedforward from ee6947c
global-floating-action-button 71.18% <ø> (ø) Carriedforward from ee6947c
global-header 66.50% <ø> (ø) Carriedforward from ee6947c
homepage 47.50% <ø> (ø) Carriedforward from ee6947c
install-dynamic-plugins 59.95% <ø> (ø) Carriedforward from ee6947c
intelligent-assistant 75.42% <ø> (ø) Carriedforward from ee6947c
konflux 91.98% <ø> (ø) Carriedforward from ee6947c
lightspeed 69.02% <ø> (ø) Carriedforward from ee6947c
mcp-integrations 83.40% <ø> (ø) Carriedforward from ee6947c
orchestrator 70.87% <ø> (ø) Carriedforward from ee6947c
quickstart 63.74% <ø> (ø) Carriedforward from ee6947c
sandbox 79.56% <ø> (ø) Carriedforward from ee6947c
scorecard 87.36% <ø> (ø) Carriedforward from ee6947c
theme 88.91% <ø> (ø) Carriedforward from ee6947c
translations 5.12% <ø> (ø) Carriedforward from ee6947c
x2a 79.20% <ø> (ø) Carriedforward from ee6947c

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee6947c...8302c83. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

High

  • [protected-path] .github/workflows/release_workspace.yml — This PR modifies a file under the protected path .github/. The PR has no linked issue providing formal authorization for modifying governance/infrastructure files. Human approval is required for all protected-path changes.
    Remediation: Link a tracking issue that authorizes this workflow modification, or obtain explicit human approval for the change.

Labels: PR fixes a bug in the CI release workflow


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

@fullsend-ai-review fullsend-ai-review Bot added the bug Something isn't working label Aug 16, 2026
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>
@gabemontero
gabemontero force-pushed the publish-workflow-tweak-unblock-ai-integrations branch from 8302c83 to cebb0dc Compare August 17, 2026 20:02
@sonarqubecloud

Copy link
Copy Markdown

@gabemontero

Copy link
Copy Markdown
Contributor Author

per our convo in slack @hopehadfield PTAL / thanks so much

@hopehadfield
hopehadfield merged commit 56af3f9 into redhat-developer:main Aug 17, 2026
21 checks passed
@gabemontero
gabemontero deleted the publish-workflow-tweak-unblock-ai-integrations branch August 17, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants