Repository navigation
feat: support components with release lines - #866
Conversation
Release lines are synced to the catalog as a new ReleaseLine kind, part of their component, and get their own pages. Catalog: - Sync ReleaseLine CRs (full sync and events) as ReleaseLine entities, titled <component>:<line>, with partOf/hasPart relations to the component; remove a component's lines when it is deleted - Mark components with release lines enabled, and carry the component type's releaseLines setting to its catalog entity - Keep ReleaseLine entities out of the catalog viewer and search Components with release lines: - Show only the Overview and Definition tabs; the Overview lists the component's release lines (search, paging, row delete) with a Create ReleaseLine button, plus About and Relations - Summarise them in the project listing as "N release lines · M deployments" - Show each release line as its own node in the project cell diagram, linked to the line a dependency names, with gateway metrics scoped to the line; clicking a node opens the line's page Release line pages: - Reuse the component's tabs (build, deploy, logs, metrics, ...) scoped to the line, navigating within the line's page - Edit the line's YAML (description, labels and overrides) on its Definition tab, next to the read-only properties it inherits - Edit parameter, trait, build parameter and auto deploy overrides from Configure & Deploy and the Build configuration, showing the component's values with the line's overrides applied - Keep the open tab when switching lines from the breadcrumb Workload dependencies: - Ask for a release line when the target component has release lines, and save it as the dependency's releaseLine Creation: - Add a Declare Release Line step to the component wizard for component types that allow release lines, creating the first line Backend: - Add release line get, create, update and delete routes, updating the catalog immediately Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
- Cover the cell diagram pills, release line scoped alerts, incidents, DORA metrics and costs, and the Delivery Insights release line filter - Add @openchoreo/cell-diagram, @openchoreo/backstage-portal-app and @openchoreo/backstage-plugin-openchoreo-workflows-backend Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
- Sync the RCA agent spec: release_line on the analyze request and the report alert context, and the missing 403 responses - Show the alert's release line in the report's Incident Overview Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
- Show the report's release line in its overview and in the reports list - Link View release line and View metrics to the line's page, since a component with release lines has no metrics tab of its own - Name the release binding Apply Recommendation updates, and refuse a binding owned by another component or release line Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
- Remove the new component when its first release line cannot be created, and explain a release line name already used in the namespace, instead of leaving a component that cannot deploy - Keep Configure & deploy and Create release enabled for an image-based component without a workload, since they open the editor that creates it, e.g. for a line added after the component - Name a new workload on a release line page <component>-<line>-workload and own it by the component and line, rather than by the line entity's name Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
Every component now has an implicit default line, which is not a ReleaseLine resource, replacing the opt-in releaseLinesEnabled model. - Drop releaseLinesEnabled; the catalog marks a component that has release lines with openchoreo.io/has-release-lines, and whether it can have them comes from its component type - Create components as before; offer Create Release Line from the component menu when the type allows release lines, and show the release lines view once one exists - List the default line first, read-only, with the component's own tabs working on it; reject a new line named default - Never write default into a resource or request: an empty line means the default line in releases, deploys, workloads, dependencies and builds, and in the binding, workload, release and run filters - Add a release line filter (all lines, default, one line) to logs, events, metrics, alerts, traces, incidents, costs and the cell diagram - Sync the OpenAPI specs with core and regenerate the clients Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
The control plane no longer has a per type release line policy. Remove the releaseLines type field, the useReleaseLinesAllowed hook and the component type card's Release Lines chip. Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
The changeset still described the removed per type release line policy. Also remove openchoreo-api.yaml.orig, a patch backup that was committed by mistake. Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
|
Important Review skippedToo many files! This PR contains 244 files, which is 144 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
The observer now covers only the default line of a component scope without a line. Send allReleaseLines whenever a component is set without a line, so the All lines filter and the overview cards keep showing every line. Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
Show an overridden trait deep-merged onto the inherited one, as the controller renders it, and save only the parameters that differ, so later component changes to the trait's other parameters still reach the line. Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
Drop the values the trait form filled in from schema defaults that the trait did not have before, so a release line no longer saves them as overrides that pin the defaults. Values inside oneOf or anyOf branches are kept, since the platform does not apply defaults there. Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
kaviththiranga
left a comment
There was a problem hiding this comment.
Review pass over the non-test, non-generated diff. Eight inline notes below; the three I'd treat as blocking are the ones where a release line is silently crossed rather than erroring:
- Promote is never scoped to the release line — promoting from a line page promotes the default line (
OpenChoreoClient.promoteToEnvironment+ the promote POST body). useReleaseReadinessis only half line-aware — the workload query is scoped, the builds query isn't, so a line with no build of its own reports ready off another line's image.fetchReleaseBindingswithout a line now means "default line" — the unchanged all-lines callers (environment overview, recent deployments) lose line-only deployments.
The rest are a URL-filter reset, a dialog remount, an unpaginated fetch, and one behaviour change that reaches beyond release lines.
🤖 Review pass done with Claude Code
- Remove the dead promote path, scope readiness builds to the line - Add an allReleaseLines mode for the environment overview and Recent Deployments - Find release bindings by owner for deploy, promote, overrides and remove - Page release lines, bindings, releases and workloads - Keep a URL line until Cost Analysis reports load - Scope Cost Insights Apply to the selected line - Keep the create line dialog state, limit trait default dropping to lines Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
|
Thanks @kaviththiranga, all eight are addressed. The promote path was dead (the API endpoint was removed in openchoreo/openchoreo#2569), so I removed it instead of scoping it to the line, and the all-lines callers now use an explicit |
Give a new release line's Workload and ReleaseBindings the hashed
{component}-{line}-{hash} name OpenChoreo gives a line's objects, so
they no longer take a name another component's objects may need. The
default line keeps {component}-workload and {component}-{env}. The
Workload page leaves a new line workload's name to the backend.
Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
The portal calls every component's implicit release line main, as OpenChoreo does, and lists it first. The create dialog and the backend reject a line named main or default, since default is reserved, and a link with releaseLine=default falls back to all lines. ReleaseLineSummary.isDefault becomes isMain. Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
Purpose
OpenChoreo is adding release lines (openchoreo/openchoreo PR, following discussion #4702). A release line is another line of a component, such as a
nextorcanaryversion built from another branch, released and deployed on its own next to the component. Backstage needs to show a component's lines, let developers create and manage them, and scope builds, deployments and observability to a line.Goals
Approach
ReleaseLinecatalog kind, part of their component and visible to whoever can view the component. They don't appear in the catalog list or search, and are reached from their component. Every component also has an implicitdefaultline, built from its own Workload and bindings, which is never written as a resource. The OpenChoreo event forwarder now sends ReleaseLine events, so line changes reach the catalog right away.defaultfirst, with their environments, latest release and overrides. The component's own tabs work on the default line, which can't be edited, deleted or created. The namedefaultis rejected for a new line.defaultkeyword is never written into a resource or request.default, or one line) for components with lines. On a line's page they are scoped to that line. Alert and incident details show the release line. Delivery Insights filters by line. RCA reports show the line the alert fired on. Cost analysis reports show and link their line, and Apply Recommendation refuses a binding of another line.releaselineactions.User stories
Release note
Backstage supports OpenChoreo release lines. Developers can create release lines from a component's context menu, see a component's lines on its Overview, and open a page per line with its own build, deploy and observability tabs. Observability, cost and delivery views can be filtered by release line. Components without release lines behave as before.
Documentation
N/A for this PR. Release line docs will go with the OpenChoreo docs for the feature.
Training
N/A
Certification
N/A. The feature isn't covered by certification yet.
Marketing
N/A
Automation tests
Security checks
Samples
The OpenChoreo PR adds
samples/release-lines, a component with anextline built from another branch, which shows the UI end to end.Related PRs
Migrations (if applicable)
None. Existing components keep their current pages and behaviour, and get release line UI only once a ReleaseLine names them. Release line features need an OpenChoreo control plane with the ReleaseLine API from the related PR.
Test environment
macOS 27.0.1, Node.js 22.22.0, Chrome 156, local Backstage against OpenChoreo on k3d (release lines branch, including an upgrade from v1.3.2).
Learning
Follows the design in discussion #4702. Release lines are modelled as their own catalog kind owned by the component, so permissions and navigation follow the component.