Skip to content

Fix release workflow and make observability dependency optional#574

Merged
kaviththiranga merged 4 commits into
openchoreo:release-v1.1from
kaviththiranga:fix-npm-deps-release
May 20, 2026
Merged

Fix release workflow and make observability dependency optional#574
kaviththiranga merged 4 commits into
openchoreo:release-v1.1from
kaviththiranga:fix-npm-deps-release

Conversation

@kaviththiranga
Copy link
Copy Markdown
Contributor

No description provided.

* ci(release): run yarn tsc before build:all (openchoreo#565)

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>

* chore: bump @openchoreo/* packages to 1.1.0 (openchoreo#567)

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>

---------

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
openchoreo#572)

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
The release workflow used `changeset publish`, which shells out to
`npm publish` for non-pnpm repos. `npm publish` does not understand
Yarn Berry's `workspace:^` protocol and serialised the literal string
into 13 of 17 @openchoreo/* tarballs at v1.1.0. External installs
fail with `Workspace not found` on first dependency resolution.

Replace the publish step with Yarn Berry's native
`yarn workspaces foreach --no-private --topological npm publish`,
which rewrites `workspace:^` to concrete versions at pack time —
independent of `.npmrc:ignore-scripts=true`, which would otherwise
also have blocked the prepack hook from running under npm publish.

`--tolerate-republish` preserves the idempotent-on-retry behaviour
of the previous setup. `changeset version` (in
prepare-next-version.yml) is unaffected — only the publish step
moves.

Verified by running `yarn workspaces foreach --no-private
--topological pack` across all 22 public workspaces and grepping
the resulting tarballs: every `@openchoreo/*` dep was rewritten to
`^1.1.0`, zero `workspace:` leaks.

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
The Deploy and RuntimeHealthCard hooks resolve the observability API
via `useApi(observabilityApiRef)`, which throws NotImplementedError
when no factory is registered for the ref. When a host installs only
the Core plugin set (without @openchoreo/backstage-plugin-openchoreo-
observability), opening any component's Deploy tab crashes with:

  NotImplementedError: No implementation available for apiRef{
    plugin.openchoreo-observability.service
  }

Both hooks already document the intent that observability should be
optional: useLogsSummary's existing comment notes "without requiring
a package dependency" and useIncidentsSummary already absorbs per-
call failures as zero incidents. The bug is just the choice of
Backstage API — useApi() throws when the ref is unregistered, while
useApiHolder().get() returns undefined.

Switch both hooks to useApiHolder().get() and short-circuit the
fetch when the api is missing:

- useIncidentsSummary now returns an empty Map (PipelineCanvas
  already optional-chains incidentsSummaries.get(name)?.activeCount).
- useLogsSummary now sets observabilityDisabled: true, which routes
  to the existing empty-state branch in RuntimeHealthCard (the same
  branch the backend uses when the cluster has observability off).

No UI changes — only the throw is gone.

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 79094870-d69a-496f-b00d-c2682eeab9ec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...mponents/Environments/hooks/useIncidentsSummary.ts 0.00% 4 Missing ⚠️
...ponents/RuntimeLogs/OverviewCard/useLogsSummary.ts 0.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@kaviththiranga kaviththiranga merged commit 35f5469 into openchoreo:release-v1.1 May 20, 2026
7 of 8 checks passed
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.

3 participants