Version Packages (dcm) - #4187
Open
rhdh-bot wants to merge 1 commit into
Open
Conversation
rhdh-bot
requested review from
a team,
asmasarw,
jkilzi and
mareklibra
as code owners
August 6, 2026 08:11
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4187 +/- ##
=======================================
Coverage 58.25% 58.25%
=======================================
Files 2426 2426
Lines 96667 96667
Branches 26953 26954 +1
=======================================
Hits 56311 56311
+ Misses 40152 40122 -30
- Partials 204 234 +30
*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:
|
github-actions
Bot
force-pushed
the
changesets-release/dcm/main
branch
from
August 6, 2026 08:43
0ea40c2 to
75bfe6d
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Releases
@red-hat-developer-hub/backstage-plugin-dcm-backend@2.0.0
Major Changes
Minor Changes
4a316f7: Refactor DCM frontend plugin for reusability, maintainability, and test coverage.
New shared utilities & hooks
createYupValidator– factory that wraps a Yup schema and returns stablevalidate/isValidhelpers, eliminating per-tab validation boilerplate.useCrudTab– custom React hook that centralises data loading, client-side search/pagination, and create/edit/delete dialog state for every CRUD tab. Tabs now consist only of feature-specific rendering logic.New shared components
DcmCrudTabLayout– generic layout that handles loading spinners, load-error alerts with a Retry button, empty states, and a searchable paginated table inside anInfoCard.DcmFormDialogActions– reusable Save / Cancel button row with loading spinner and disabled states, used by all form dialogs.DcmErrorSnackbar– transient error snackbar for surfacing delete-operation failures.DcmDeleteDialog– standalone confirmation dialog component extracted from inline usage.Per-feature file decomposition
Each CRUD tab now has dedicated files for form types, Yup schema, field components, and column definitions:
providers/→providerFormTypes.ts,components/ProviderFormFields.tsx,components/ProviderStatus.tsx,components/CopyButton.tsxpolicies/→policyFormTypes.ts,components/PolicyFormFields.tsxcatalog-items/→catalogItemFormTypes.ts,components/CatalogItemFormFields.tsxcatalog-item-instances/→instanceFormTypes.ts,components/InstanceFormFields.tsxresources/→resourceFormTypes.ts,components/ResourceFormFields.tsxError handling improvements
Load errors and delete errors are now surfaced in the UI via
DcmCrudTabLayout(inline alert with Retry) andDcmErrorSnackbarrespectively, replacing silent.catch(() => {})handlers.Dead code removal
Removed the unused
ExampleComponentdirectory and its tests.Test coverage
Added unit tests for
extractApiError,createYupValidator,useCrudTab,DcmFormDialogActions,DcmDeleteDialog, and form-type validators for providers, policies, and resources.Patch Changes
ba41609: Add Docker/Podman deployment support for the DCM plugin.
Dockerfile(multi-stage build) to produce a standalone Backstage imageapp-config.production.yamlfor container runtime configurationscripts/generate-image.sh(renamed fromdynamic-plugins.sh) with commands to build and push both the OCI dynamic-plugin artifact and the full Backstage application image.dockerignoreto exclude sensitive and dev-only files from the build contextdangerouslyAllowOutsideDevelopment) for container environmentsclientId/clientSecretare not sete01563c: Rename DCM_API_GATEWAY_URL to DCM_API_URL. Legacy env var and
dcm.apiGatewayUrl config remain supported during migration.
c9312e8: Fix 502 error when SSO credentials are not configured.
The backend proxy now skips the SSO token exchange when
clientIdorclientSecretare absent, forwarding requests to the API gateway withoutan Authorization header instead of failing with "Failed to obtain upstream
access token."
Updated dependencies [ba41609]
Updated dependencies [e3985a8]
Updated dependencies [c287a53]
Updated dependencies [2022ea0]
Updated dependencies [4a316f7]
@red-hat-developer-hub/backstage-plugin-dcm-common@2.0.0
Major Changes
Minor Changes
e3985a8: DCM UI and catalog client updates for the example app and published plugins.
Example app (
packages/app) — RBAC navigation/rbacroute.@backstage-community/plugin-rbacfrontend dependency. The RBAC backend plugin may remain for permissions; only the menu and page were removed.@red-hat-developer-hub/backstage-plugin-dcm— Resources tabresourcesproxy usage from the plugin.placementApiRef,resourcesroute ref, and thePlacementClientintegration from the plugin surface.@red-hat-developer-hub/backstage-plugin-dcm-common— placement API removed; catalog rehydrateresourcesAPI.rehydrateCatalogItemInstanceonCatalogApi/CatalogClient:POST .../catalog-item-instances/{id}:rehydrate.Catalog item instances UI
2022ea0: Add server-side cursor pagination to all tabs and harden pagination handling across APIs.
All six tabs now use server-side cursor pagination
Previously only Service Types, Catalog Items, and Catalog Item Instances fetched data page-by-page from the backend. Providers, Policies, and Resources loaded everything in a single call and silently lost records beyond the first page.
usePaginatedCrudTab(same pattern as Catalog Items). Next / Previous buttons appear below the table; search filters the current page client-side without an extra round-trip.usePaginatedFetch(same as Service Types). Retains the same read-only layout.dcm-common: new pagination utilities and updated API interfacesbuildPaginationQueryextracted fromCatalogClientintodcm-common/src/utils/buildPaginationQuery.tsand exported publicly so all clients can share the same URL-builder.ProvidersApi/ProvidersClient—listProvidersnow accepts an optionalPaginationParamsargument.PolicyManagerApi/PolicyManagerClient—listPoliciesnow accepts an optionalPaginationParamsargument.ServiceTypeList,CatalogItemList,CatalogItemInstanceList—next_page_tokenis now optional (?) to match the real backend behaviour where the field is absent (not just empty) when there is only one page of results.Dropdown options loaded once on mount
Service-type dropdown loads (used in the Providers and Catalog Items create/edit forms) are now fetched once on component mount via a dedicated
useEffect, not on every page navigation. The request usesmax_page_size: 100to avoid silently truncating valid options.Test coverage
Added
ProvidersTabContent.test.tsxandResourcesTabContent.test.tsxwith full cursor navigation test suites (initial load, error/retry, Next/Previous button states and token passing). UpdatedPoliciesTabContent.test.tsxwith equivalent cursor navigation tests and refreshed mock return types.4a316f7: Refactor DCM frontend plugin for reusability, maintainability, and test coverage.
New shared utilities & hooks
createYupValidator– factory that wraps a Yup schema and returns stablevalidate/isValidhelpers, eliminating per-tab validation boilerplate.useCrudTab– custom React hook that centralises data loading, client-side search/pagination, and create/edit/delete dialog state for every CRUD tab. Tabs now consist only of feature-specific rendering logic.New shared components
DcmCrudTabLayout– generic layout that handles loading spinners, load-error alerts with a Retry button, empty states, and a searchable paginated table inside anInfoCard.DcmFormDialogActions– reusable Save / Cancel button row with loading spinner and disabled states, used by all form dialogs.DcmErrorSnackbar– transient error snackbar for surfacing delete-operation failures.DcmDeleteDialog– standalone confirmation dialog component extracted from inline usage.Per-feature file decomposition
Each CRUD tab now has dedicated files for form types, Yup schema, field components, and column definitions:
providers/→providerFormTypes.ts,components/ProviderFormFields.tsx,components/ProviderStatus.tsx,components/CopyButton.tsxpolicies/→policyFormTypes.ts,components/PolicyFormFields.tsxcatalog-items/→catalogItemFormTypes.ts,components/CatalogItemFormFields.tsxcatalog-item-instances/→instanceFormTypes.ts,components/InstanceFormFields.tsxresources/→resourceFormTypes.ts,components/ResourceFormFields.tsxError handling improvements
Load errors and delete errors are now surfaced in the UI via
DcmCrudTabLayout(inline alert with Retry) andDcmErrorSnackbarrespectively, replacing silent.catch(() => {})handlers.Dead code removal
Removed the unused
ExampleComponentdirectory and its tests.Test coverage
Added unit tests for
extractApiError,createYupValidator,useCrudTab,DcmFormDialogActions,DcmDeleteDialog, and form-type validators for providers, policies, and resources.Patch Changes
ba41609: Add Docker/Podman deployment support for the DCM plugin.
Dockerfile(multi-stage build) to produce a standalone Backstage imageapp-config.production.yamlfor container runtime configurationscripts/generate-image.sh(renamed fromdynamic-plugins.sh) with commands to build and push both the OCI dynamic-plugin artifact and the full Backstage application image.dockerignoreto exclude sensitive and dev-only files from the build contextdangerouslyAllowOutsideDevelopment) for container environmentsclientId/clientSecretare not set@red-hat-developer-hub/backstage-plugin-dcm@1.1.0
Minor Changes
50be9f2: Add internationalization (i18n) support using the Backstage translation API.
All hardcoded English strings are replaced with translation keys.
Includes locale files for de, es, fr, it, ja.
e3985a8: DCM UI and catalog client updates for the example app and published plugins.
Example app (
packages/app) — RBAC navigation/rbacroute.@backstage-community/plugin-rbacfrontend dependency. The RBAC backend plugin may remain for permissions; only the menu and page were removed.@red-hat-developer-hub/backstage-plugin-dcm— Resources tabresourcesproxy usage from the plugin.placementApiRef,resourcesroute ref, and thePlacementClientintegration from the plugin surface.@red-hat-developer-hub/backstage-plugin-dcm-common— placement API removed; catalog rehydrateresourcesAPI.rehydrateCatalogItemInstanceonCatalogApi/CatalogClient:POST .../catalog-item-instances/{id}:rehydrate.Catalog item instances UI
019e9e2: Remove legacy Environments and Service Specs screens.
Removed routes
/dcm/environments—EnvironmentsTabContentlist page (was already orphaned from active navigation)/dcm/service-specs—ServiceSpecsTabContentlist page (was already orphaned from active navigation)/dcm/environments/:id/*—EnvironmentDetailsPagewith Overview, Entities, and Request History sub-tabs/dcm/service-specs/:id/*—ServiceSpecDetailsPagewith Overview, Entities, and Request History sub-tabsRemoved route refs
serviceSpecsRouteRefenvironmentDetailsRouteRefserviceSpecDetailsRouteRefDCM_DETAILS_TABSRemoved shared components (legacy-only)
DcmEntitiesTable,DcmRequestHistoryTable,DcmDetailsBreadcrumb,dataCenterNavigation,serviceSpecYamlRemoved mock data layer
data/environments.ts,data/service-specs.ts,data/dcm-mock-rows.ts2022ea0: Add server-side cursor pagination to all tabs and harden pagination handling across APIs.
All six tabs now use server-side cursor pagination
Previously only Service Types, Catalog Items, and Catalog Item Instances fetched data page-by-page from the backend. Providers, Policies, and Resources loaded everything in a single call and silently lost records beyond the first page.
usePaginatedCrudTab(same pattern as Catalog Items). Next / Previous buttons appear below the table; search filters the current page client-side without an extra round-trip.usePaginatedFetch(same as Service Types). Retains the same read-only layout.dcm-common: new pagination utilities and updated API interfacesbuildPaginationQueryextracted fromCatalogClientintodcm-common/src/utils/buildPaginationQuery.tsand exported publicly so all clients can share the same URL-builder.ProvidersApi/ProvidersClient—listProvidersnow accepts an optionalPaginationParamsargument.PolicyManagerApi/PolicyManagerClient—listPoliciesnow accepts an optionalPaginationParamsargument.ServiceTypeList,CatalogItemList,CatalogItemInstanceList—next_page_tokenis now optional (?) to match the real backend behaviour where the field is absent (not just empty) when there is only one page of results.Dropdown options loaded once on mount
Service-type dropdown loads (used in the Providers and Catalog Items create/edit forms) are now fetched once on component mount via a dedicated
useEffect, not on every page navigation. The request usesmax_page_size: 100to avoid silently truncating valid options.Test coverage
Added
ProvidersTabContent.test.tsxandResourcesTabContent.test.tsxwith full cursor navigation test suites (initial load, error/retry, Next/Previous button states and token passing). UpdatedPoliciesTabContent.test.tsxwith equivalent cursor navigation tests and refreshed mock return types.4a316f7: Refactor DCM frontend plugin for reusability, maintainability, and test coverage.
New shared utilities & hooks
createYupValidator– factory that wraps a Yup schema and returns stablevalidate/isValidhelpers, eliminating per-tab validation boilerplate.useCrudTab– custom React hook that centralises data loading, client-side search/pagination, and create/edit/delete dialog state for every CRUD tab. Tabs now consist only of feature-specific rendering logic.New shared components
DcmCrudTabLayout– generic layout that handles loading spinners, load-error alerts with a Retry button, empty states, and a searchable paginated table inside anInfoCard.DcmFormDialogActions– reusable Save / Cancel button row with loading spinner and disabled states, used by all form dialogs.DcmErrorSnackbar– transient error snackbar for surfacing delete-operation failures.DcmDeleteDialog– standalone confirmation dialog component extracted from inline usage.Per-feature file decomposition
Each CRUD tab now has dedicated files for form types, Yup schema, field components, and column definitions:
providers/→providerFormTypes.ts,components/ProviderFormFields.tsx,components/ProviderStatus.tsx,components/CopyButton.tsxpolicies/→policyFormTypes.ts,components/PolicyFormFields.tsxcatalog-items/→catalogItemFormTypes.ts,components/CatalogItemFormFields.tsxcatalog-item-instances/→instanceFormTypes.ts,components/InstanceFormFields.tsxresources/→resourceFormTypes.ts,components/ResourceFormFields.tsxError handling improvements
Load errors and delete errors are now surfaced in the UI via
DcmCrudTabLayout(inline alert with Retry) andDcmErrorSnackbarrespectively, replacing silent.catch(() => {})handlers.Dead code removal
Removed the unused
ExampleComponentdirectory and its tests.Test coverage
Added unit tests for
extractApiError,createYupValidator,useCrudTab,DcmFormDialogActions,DcmDeleteDialog, and form-type validators for providers, policies, and resources.Patch Changes
5394da1: UI code-quality improvements: replace all inline styles with makeStyles classes, use theme palette tokens (status.ok, error, text) instead of hardcoded colours, merge duplicate style files into a single useDcmStyles hook, add destructive-action styling to delete dialogs, and move RhdhLogoFull/RhdhLogoIcon into the plugin so they can be wired in RHDH without relying on the dev-only app shell.
483a960: Show a success snackbar after every CRUD operation in the Providers, Policies, and Catalog Items tabs.
useCrudTabwith optionalcreateSuccessMessage,editSuccessMessage, anddeleteSuccessMessageoptions and asuccessMessage/clearSuccessMessagepair in the returned result.DcmSuccessSnackbarintoProvidersTabContent,PoliciesTabContent, andCatalogItemsTabContentwith contextual messages (e.g. "Provider registered successfully.", "Policy deleted successfully.").0239de6: Disable the Provider Name field when editing an existing provider.
The Name field in the Edit Provider dialog is now read-only. Provider names are
immutable identifiers and should not be changed after creation.
4da4d17: Enhance the Delete Dialog UX: keep the dialog open on API errors and display them inline, disable the Delete button and show a loading spinner during submission to prevent double-clicks, use an error-red background for the Delete button, and suppress the external action alert for delete errors in favour of the in-dialog error banner.
30fb181: Fix form UX issues in the Catalog Items and Catalog Item Instances screens.
8f788d6: Replace hardcoded colors and shadows with theme-aware values for dark mode support.
theme.palette.dividerinstead ofrgba(0,0,0,0.2)theme.palette.success.maininstead of#28a745theme.palette.typecheck201cdbe: Fix pagination not resetting to page 1 when a search/filter is applied.
When a user navigates to a later page and then types in the search field, the
table would appear empty because the page index was left pointing past the end
of the now-smaller filtered result set.
All table components now reset to page 0 whenever the search or filter value
changes, consistent with the existing behaviour in
DcmEntitiesCard.Affected tabs: Providers, Policies, Catalog Items, Catalog Item Instances,
Resources, Service Types, Service Specs, Environments, and Request History.
11dc527: Fix policy form validation for Description and Priority fields, normalize enabled
checks, and reject whitespace-only required fields.
feedback matching the Display Name pattern (validation error on blur rather than
hard-blocking input at the DOM level).
.integer()and.required()Yup rules to the Priority field so decimal values(e.g. 500.5) and an empty field are rejected with an explicit error message instead of
silently coercing to an integer or defaulting to 500.
step={1}to the Priority number input and block./e/Echaracters viaonKeyDownandonChangeguards to prevent decimal strings from bypassing the Yupinteger check through JavaScript's
Number()coercion.(priority must be unique per policy type) so users are informed before hitting a 409.
enabledchecks inPoliciesTabContenttop.enabled ?? trueso the Enabled column, Actions toggle, and edit form all agreewhen
enabledis undefined..trim()to thedisplay_nameandrego_codeYup rules so whitespace-onlyvalues are rejected client-side instead of passing validation and being silently
rejected by the API after submit.
eab245a: Catalog Item: validate duplicate paths, block adding empty field rows, live-validate JSON in schema modal, surface invalid default_value / validation_schema inline. Policy: add structural Rego validation (package declaration + selected_provider reference) and monospace font to the code editor. Catalog Instance: enforce required/min/max constraints from validation_schema on user-value fields and enable submit-button gating.
5394da1: Refresh DCM plugin API reports and align UI internals around shared route/tab constants and reusable detail components.
ba41609: Add Docker/Podman deployment support for the DCM plugin.
Dockerfile(multi-stage build) to produce a standalone Backstage imageapp-config.production.yamlfor container runtime configurationscripts/generate-image.sh(renamed fromdynamic-plugins.sh) with commands to build and push both the OCI dynamic-plugin artifact and the full Backstage application image.dockerignoreto exclude sensitive and dev-only files from the build contextdangerouslyAllowOutsideDevelopment) for container environmentsclientId/clientSecretare not set23ab1ea: Add a manual refresh button to the Providers table to update health status without a full page reload.
A sync icon button now appears next to the search field in the Providers card header. Clicking it re-fetches the provider list (including
health_status) while keeping the table visible. A spinner is shown on the button during the request. The initial page load behaviour is unchanged.Updated dependencies [ba41609]
Updated dependencies [e3985a8]
Updated dependencies [c287a53]
Updated dependencies [2022ea0]
Updated dependencies [4a316f7]