Skip to content

Conversation

@kaviththiranga
Copy link
Contributor

This PR updates the Backstage plugins to align with OpenChoreo's removal of the Organization CRD (discussion #983).

The new hierarchy
is Namespace → Project → Component.

Fixes: openchoreo/openchoreo#1518

@kaviththiranga kaviththiranga marked this pull request as draft January 20, 2026 04:57
@kaviththiranga kaviththiranga marked this pull request as ready for review January 27, 2026 04:05
@kaviththiranga kaviththiranga force-pushed the org-to-namespaces branch 2 times, most recently from 5784f69 to 728e187 Compare January 27, 2026 06:51
  This commit updates the Backstage plugins to align with OpenChoreo's
  removal of the Organization CRD (discussion #983). The new hierarchy
  is Namespace → Project → Component.

  API Changes:
  - Update all routes from /orgs/{orgName}/... to /namespaces/{namespaceName}/...
  - Rename path parameter orgName → namespaceName throughout
  - Update response field orgName → namespaceName in all schemas

  Frontend Changes:
  - Rename OrganizationSummary → NamespaceSummary
  - Rename useOrganizations → useNamespaces hook
  - Update ResourceHierarchy to use namespace/namespace_units
  - Update ComponentInfo and BuildLogsParams interfaces
  - Update OpenChoreoClient to use CHOREO_ANNOTATIONS.NAMESPACE

  Backend Changes:
  - Update PlatformEnvironmentService interface methods
  - Update observability backend router and service
  - Update scaffolder actions (project.ts, component.ts)
  - Update componentResourceBuilder to use namespaceName

  Entity Provider Changes:
  - Update DataplaneEntityV1alpha1 spec properties
  - Rename organizationVirtualHost → namespaceVirtualHost
  - Rename organizationHTTPPort/HTTPSPort → namespaceHTTPPort/HTTPSPort

  OpenAPI Spec:
  - Update DataPlaneResponse schema with namespace-based properties
  - Regenerate TypeScript clients

Related to: openchoreo/openchoreo#1518

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
  Permission system:
  - Update regex patterns from /^org\/.../ to /^namespace\/.../
  - Rename 'org' variables to 'namespace' throughout permission rules
  - Update capability path format in documentation and examples

  UI labels:
  - Change "Domain (Organization)" to "Domain (Namespace)" in catalog
  - Update related comments in filter and table column components

  Observability hooks:
  - Rename useGetOrgAndProjectByEntity to useGetNamespaceAndProjectByEntity
  - Rename useGetEnvironmentsByOrganization to useGetEnvironmentsByNamespace
  - Update API query param from ?organization= to ?namespace=
  - Update all consumer components (Metrics, Logs, Traces, RCA pages)

  Scaffolder templates:
  - Rename organization_name parameter to namespace_name
  - Update action input from orgName to namespaceName
  - Update field labels from "Organization Name" to "Namespace Name"

Related to: openchoreo/openchoreo#1518

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
  - Remove ORGANIZATION constant from CHOREO_ANNOTATIONS (keep NAMESPACE)
  - Update all usages of CHOREO_ANNOTATIONS.ORGANIZATION to NAMESPACE
  - Rename organizationName params to namespaceName across all plugins
  - Update entityUtils.ts interface: organization → namespace
  - Update API query params from organizationName to namespaceName
  - Replace hardcoded 'openchoreo.io/organization' strings with 'openchoreo.io/namespace'

  Files updated across:
  - openchoreo-observability hooks
  - openchoreo-ci plugin (client, hooks, components, backend router)
  - openchoreo plugin (traits, environments, workflows, projects)
  - openchoreo-react hooks
  - platform-engineer-core APIs
  - permission-backend-module-openchoreo-policy rules
  - catalog-backend-module-openchoreo converters
  - scaffolder field extensions

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
  - Rename orgName to namespaceName in backend routers and API params
  - Update ObservabilityApi interface and implementation
  - Update platform-engineer-core ComponentInfo interfaces
  - Migrate scaffolder templates from organization_name to namespace_name
  - Update scaffolder field extensions to read namespace_name from formContext
  - Update factory.ts JSDoc examples to use namespace paths

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
  - Rename organization to namespace in platform-engineer-core types
  - Update observability hooks parameter names (organization → namespaceName)
  - Rename organization to namespace in Access Control UI wizard state
  - Update permission system (organization:* → namespace:*)
  - Update UI text/error messages and comments/JSDoc
  - Update AuthzProfileService scope types (org → namespace)

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
  Apply namespace migration to code introduced by upstream after the
  branch diverged: deletion endpoints (router, ComponentInfoService,
  ProjectInfoService), deployment pipeline entity provider, OpenChoreo
  client delete operations, permission policy annotation references,
  MappingDialog wizard state properties, and environment/dataplane hooks.

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
  The OpenChoreo authz API returns a wildcard capability { "*": { allowed: [{ path: "*" }] } }      for admin users. The permission policy only looked up specific action keys (e.g.,
  "component:view"), missing the wildcard entry and denying all access.
  Add fallback to the "*" wildcard capability in all 5 action lookup sites in                       OpenChoreoPermissionPolicy.ts.

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

  Entities from multiple OpenChoreo namespaces now appear in the catalog,                           but links, relations, and lookups were broken because many places                                 hardcoded 'default' as the Backstage namespace

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
  API entities were missing metadata.namespace, defaulting to 'default'
  regardless of which OpenChoreo namespace they belonged to. Domain entity
  refs in System, Environment, and Dataplane specs used an unqualified
  name which resolved relative to the entity's own namespace, missing
  the Domain in the Backstage 'default' namespace. Processors also
  hardcoded the domain target namespace instead of parsing the ref.

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

  Entities in non-default namespaces had spec.owner set to the bare
  string 'guests', which Backstage resolved relative to the entity's
  own namespace (e.g. group:team-alpha/guests). Since Group entities
  only exist in the 'default' namespace, this caused catalog warnings

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

  Replace hardcoded '/catalog/default/' paths with dynamic namespace resolution
  across frontend components and backend services so that entities in non-default
  namespaces link correctly.

Signed-off-by: Kavith Lokuhewage <kaviththiranga@gmail.com>
@kaviththiranga kaviththiranga merged commit ef1cc3e into openchoreo:main Jan 27, 2026
2 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.

Map the new OpenChoreo Hierarchical Resource Model to Backstage

2 participants