Skip to content

Commit e753538

Browse files
authored
Merge branch 'main' into changesets-release/orchestrator/main
2 parents 5556cc7 + 0b28051 commit e753538

71 files changed

Lines changed: 2062 additions & 2576 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,18 @@ jobs:
123123
- name: publish check
124124
run: yarn backstage-cli repo fix --check --publish
125125

126-
- name: test changed packages
126+
- name: Install jest-junit reporter
127+
run: |
128+
npm install jest-junit@17.0.0 --ignore-scripts --prefix ${{ runner.temp }}/jest-junit
129+
mkdir -p ${{ runner.temp }}/test-results/${{ matrix.workspace }}
130+
131+
- name: Test changed packages
127132
id: tests
128-
run: yarn test:all --maxWorkers=3
133+
env:
134+
JEST_JUNIT_OUTPUT_DIR: ${{ runner.temp }}/test-results/${{ matrix.workspace }}
135+
JEST_JUNIT_CLASSNAME: '{filepath}'
136+
JEST_JUNIT_UNIQUE_OUTPUT_NAME: 'true'
137+
run: yarn test:all --maxWorkers=3 --reporters=default --reporters=${{ runner.temp }}/jest-junit/node_modules/jest-junit
129138

130139
- name: Upload coverage to Codecov
131140
if: ${{ !cancelled() && steps.tests.outcome != 'skipped' }}
@@ -135,6 +144,15 @@ jobs:
135144
token: ${{ secrets.CODECOV_TOKEN }}
136145
fail_ci_if_error: false
137146

147+
- name: Upload test results to Codecov
148+
if: ${{ !cancelled() && steps.tests.outcome != 'skipped' }}
149+
uses: codecov/test-results-action@6ba3fdeec616fb91fd6a389b788a2366835a0fa2 # v1.2.1
150+
with:
151+
flags: ${{ matrix.workspace }}
152+
token: ${{ secrets.CODECOV_TOKEN }}
153+
directory: ${{ runner.temp }}/test-results/${{ matrix.workspace }}
154+
fail_ci_if_error: false
155+
138156
- name: install playwright
139157
if: ${{ hashFiles(format('workspaces/{0}/playwright.config.ts', matrix.workspace)) != '' }}
140158
run: yarn playwright install --with-deps chromium chrome

.github/workflows/coverage-baseline.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,18 @@ jobs:
7575
- name: Install dependencies
7676
run: yarn install --immutable
7777

78+
- name: Install jest-junit reporter
79+
run: |
80+
npm install jest-junit@17.0.0 --ignore-scripts --prefix ${{ runner.temp }}/jest-junit
81+
mkdir -p ${{ runner.temp }}/test-results/${{ matrix.workspace }}
82+
7883
- name: Run tests with coverage
7984
id: tests
80-
run: yarn test:all --maxWorkers=3
85+
env:
86+
JEST_JUNIT_OUTPUT_DIR: ${{ runner.temp }}/test-results/${{ matrix.workspace }}
87+
JEST_JUNIT_CLASSNAME: '{filepath}'
88+
JEST_JUNIT_UNIQUE_OUTPUT_NAME: 'true'
89+
run: yarn test:all --maxWorkers=3 --reporters=default --reporters=${{ runner.temp }}/jest-junit/node_modules/jest-junit
8190

8291
- name: Upload coverage to Codecov
8392
if: ${{ !cancelled() && steps.tests.outcome != 'skipped' }}
@@ -86,3 +95,12 @@ jobs:
8695
flags: ${{ matrix.workspace }}
8796
token: ${{ secrets.CODECOV_TOKEN }}
8897
fail_ci_if_error: false
98+
99+
- name: Upload test results to Codecov
100+
if: ${{ !cancelled() && steps.tests.outcome != 'skipped' }}
101+
uses: codecov/test-results-action@6ba3fdeec616fb91fd6a389b788a2366835a0fa2 # v1.2.1
102+
with:
103+
flags: ${{ matrix.workspace }}
104+
token: ${{ secrets.CODECOV_TOKEN }}
105+
directory: ${{ runner.temp }}/test-results/${{ matrix.workspace }}
106+
fail_ci_if_error: false

codecov.yml

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# Epic: RHIDP-11862 — Unit Test Coverage for RHDH Plugins Repository
66
#
77
# Each workspace uploads coverage with its own flag (e.g., lightspeed,
8-
# orchestrator). Flags are created dynamically by the upload step in CI;
9-
# default_rules apply to all of them automatically.
8+
# orchestrator). individual_flags scope each flag to its workspace path
9+
# so the Flags page shows per-workspace coverage correctly.
1010

1111
codecov:
1212
require_ci_to_pass: false
@@ -68,3 +68,70 @@ flag_management:
6868
- type: patch
6969
target: auto
7070
threshold: 100%
71+
individual_flags:
72+
- name: adoption-insights
73+
paths:
74+
- workspaces/adoption-insights/
75+
- name: ai-integrations
76+
paths:
77+
- workspaces/ai-integrations/
78+
- name: app-defaults
79+
paths:
80+
- workspaces/app-defaults/
81+
- name: augment
82+
paths:
83+
- workspaces/augment/
84+
- name: bulk-import
85+
paths:
86+
- workspaces/bulk-import/
87+
- name: cost-management
88+
paths:
89+
- workspaces/cost-management/
90+
- name: dcm
91+
paths:
92+
- workspaces/dcm/
93+
- name: extensions
94+
paths:
95+
- workspaces/extensions/
96+
- name: global-floating-action-button
97+
paths:
98+
- workspaces/global-floating-action-button/
99+
- name: global-header
100+
paths:
101+
- workspaces/global-header/
102+
- name: homepage
103+
paths:
104+
- workspaces/homepage/
105+
- name: konflux
106+
paths:
107+
- workspaces/konflux/
108+
- name: lightspeed
109+
paths:
110+
- workspaces/lightspeed/
111+
- name: mcp-integrations
112+
paths:
113+
- workspaces/mcp-integrations/
114+
- name: orchestrator
115+
paths:
116+
- workspaces/orchestrator/
117+
- name: quickstart
118+
paths:
119+
- workspaces/quickstart/
120+
- name: repo-tools
121+
paths:
122+
- workspaces/repo-tools/
123+
- name: sandbox
124+
paths:
125+
- workspaces/sandbox/
126+
- name: scorecard
127+
paths:
128+
- workspaces/scorecard/
129+
- name: theme
130+
paths:
131+
- workspaces/theme/
132+
- name: translations
133+
paths:
134+
- workspaces/translations/
135+
- name: x2a
136+
paths:
137+
- workspaces/x2a/
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-dcm': minor
3+
'@red-hat-developer-hub/backstage-plugin-dcm-common': minor
4+
---
5+
6+
DCM UI and catalog client updates for the example app and published plugins.
7+
8+
**Example app (`packages/app`) — RBAC navigation**
9+
10+
- Removed the **RBAC** sidebar entry under Administration and the `/rbac` route.
11+
- Dropped the `@backstage-community/plugin-rbac` frontend dependency. The RBAC backend plugin may remain for permissions; only the menu and page were removed.
12+
13+
**`@red-hat-developer-hub/backstage-plugin-dcm` — Resources tab**
14+
15+
- Removed the **Resources** tab from the Data Center page and all **Placement / `resources`** proxy usage from the plugin.
16+
- Removed `placementApiRef`, `resources` route ref, and the `PlacementClient` integration from the plugin surface.
17+
18+
**`@red-hat-developer-hub/backstage-plugin-dcm-common` — placement API removed; catalog rehydrate**
19+
20+
- Removed the Placement API client, types, and tests tied to the internal `resources` API.
21+
- Added **`rehydrateCatalogItemInstance`** on `CatalogApi` / `CatalogClient`: `POST .../catalog-item-instances/{id}:rehydrate`.
22+
23+
**Catalog item instances UI**
24+
25+
- Added a **Rehydrate** action (outlined button with refresh icon) on each instance row, success and error snackbars, and a unit test for the new client method.

workspaces/dcm/packages/app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"lint": "backstage-cli package lint"
2020
},
2121
"dependencies": {
22-
"@backstage-community/plugin-rbac": "1.33.2",
2322
"@backstage/app-defaults": "^1.5.16",
2423
"@backstage/catalog-model": "^1.7.3",
2524
"@backstage/cli": "^0.35.2",

workspaces/dcm/packages/app/src/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ import { RequirePermission } from '@backstage/plugin-permission-react';
5252
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
5353
import { DcmPage } from '@red-hat-developer-hub/backstage-plugin-dcm';
5454
import { useRhdhTheme } from './hooks/useRhdhTheme';
55-
import { RbacPage } from '@backstage-community/plugin-rbac';
5655
import '@patternfly/patternfly/patternfly.css';
5756
import '@patternfly/patternfly/patternfly-charts.css';
5857

@@ -123,7 +122,6 @@ const routes = (
123122
<Route path="/settings" element={<UserSettingsPage />} />
124123
<Route path="/catalog-graph" element={<CatalogGraphPage />} />
125124
<Route path="/dcm/*" element={<DcmPage />} />
126-
<Route path="/rbac" element={<RbacPage />} />
127125
</FlatRoutes>
128126
);
129127

workspaces/dcm/packages/app/src/components/Root/Root.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import MenuIcon from '@material-ui/icons/Menu';
4141
import SearchIcon from '@material-ui/icons/Search';
4242
import SecurityIcon from '@material-ui/icons/Security';
4343
import StorageIcon from '@material-ui/icons/Storage';
44-
import VpnKeyIcon from '@material-ui/icons/VpnKey';
4544
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
4645
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
4746
import LogoFull from './LogoFull';
@@ -235,7 +234,6 @@ export const Root = ({ children }: PropsWithChildren<{}>) => {
235234
const location = useLocation();
236235
usePatternFlyTheme();
237236
const isDcmActive = location.pathname.startsWith('/dcm');
238-
const isRbacActive = location.pathname.startsWith('/rbac');
239237

240238
return (
241239
<SidebarPage>
@@ -274,16 +272,6 @@ export const Root = ({ children }: PropsWithChildren<{}>) => {
274272
isDcmActive ? classes.submenuItemActive : classes.inactiveItem
275273
}`}
276274
/>
277-
<SidebarItem
278-
icon={VpnKeyIcon}
279-
to="/rbac"
280-
text="RBAC"
281-
className={`${classes.submenuItem} ${
282-
isRbacActive
283-
? classes.submenuItemActive
284-
: classes.inactiveItem
285-
}`}
286-
/>
287275
</Box>
288276
</CollapsibleSubmenu>
289277
</SidebarGroup>

workspaces/dcm/plugins/dcm-common/report.api.md

Lines changed: 56 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ export interface CatalogApi {
3535
listCatalogItems(): Promise<CatalogItemList>;
3636
// (undocumented)
3737
listServiceTypes(): Promise<ServiceTypeList>;
38+
rehydrateCatalogItemInstance(
39+
catalogItemInstanceId: string,
40+
): Promise<CatalogItemInstance>;
3841
// (undocumented)
3942
updateCatalogItem(
4043
catalogItemId: string,
@@ -71,6 +74,10 @@ export class CatalogClient extends DcmBaseClient implements CatalogApi {
7174
// (undocumented)
7275
listServiceTypes(): Promise<ServiceTypeList>;
7376
// (undocumented)
77+
rehydrateCatalogItemInstance(
78+
catalogItemInstanceId: string,
79+
): Promise<CatalogItemInstance>;
80+
// (undocumented)
7481
protected readonly serviceName = 'Catalog';
7582
// (undocumented)
7683
updateCatalogItem(
@@ -264,46 +271,15 @@ export interface FieldConfigurationDependsOn {
264271
}
265272

266273
// @public
267-
export function parseDcmEntityStatus(raw: string): DcmEntityStatus | undefined;
268-
269-
// @public
270-
export interface PlacementApi {
271-
createResource(resource: Resource, id?: string): Promise<Resource>;
272-
deleteResource(resourceId: string): Promise<void>;
273-
getResource(resourceId: string): Promise<Resource>;
274-
listResources(options?: {
275-
provider?: string;
276-
maxPageSize?: number;
277-
pageToken?: string;
278-
}): Promise<ResourceList>;
279-
rehydrateResource(
280-
resourceId: string,
281-
request: RehydrateRequest,
282-
): Promise<Resource>;
274+
export interface ListServiceTypeInstancesParams {
275+
max_page_size?: number;
276+
page_token?: string;
277+
provider?: string;
278+
show_deleted?: boolean;
283279
}
284280

285281
// @public
286-
export class PlacementClient extends DcmBaseClient implements PlacementApi {
287-
// (undocumented)
288-
createResource(resource: Resource, id?: string): Promise<Resource>;
289-
// (undocumented)
290-
deleteResource(resourceId: string): Promise<void>;
291-
// (undocumented)
292-
getResource(resourceId: string): Promise<Resource>;
293-
// (undocumented)
294-
listResources(options?: {
295-
provider?: string;
296-
maxPageSize?: number;
297-
pageToken?: string;
298-
}): Promise<ResourceList>;
299-
// (undocumented)
300-
rehydrateResource(
301-
resourceId: string,
302-
request: RehydrateRequest,
303-
): Promise<Resource>;
304-
// (undocumented)
305-
protected readonly serviceName = 'Placement';
306-
}
282+
export function parseDcmEntityStatus(raw: string): DcmEntityStatus | undefined;
307283

308284
// @public
309285
export interface Policy {
@@ -449,24 +425,6 @@ export class ProvidersClient extends DcmBaseClient implements ProvidersApi {
449425
// @public
450426
export type ProviderStatus = 'registered' | 'updated';
451427

452-
// @public
453-
export interface RehydrateRequest {
454-
// (undocumented)
455-
new_resource_id: string;
456-
}
457-
458-
// @public
459-
export interface Resource {
460-
approval_status?: string;
461-
catalog_item_instance_id: string;
462-
create_time?: string;
463-
id?: string;
464-
path?: string;
465-
provider_name?: string;
466-
spec: Record<string, unknown>;
467-
update_time?: string;
468-
}
469-
470428
// @public
471429
export interface ResourceCapacity {
472430
// (undocumented)
@@ -480,11 +438,20 @@ export interface ResourceCapacity {
480438
}
481439

482440
// @public
483-
export interface ResourceList {
441+
export interface ResourcesApi {
442+
listServiceTypeInstances(
443+
params?: ListServiceTypeInstancesParams,
444+
): Promise<ServiceTypeInstanceList>;
445+
}
446+
447+
// @public
448+
export class ResourcesClient extends DcmBaseClient implements ResourcesApi {
484449
// (undocumented)
485-
next_page_token?: string;
450+
listServiceTypeInstances(
451+
params?: ListServiceTypeInstancesParams,
452+
): Promise<ServiceTypeInstanceList>;
486453
// (undocumented)
487-
resources: Resource[];
454+
protected readonly serviceName = 'Resources';
488455
}
489456

490457
// @public
@@ -506,6 +473,37 @@ export interface ServiceType {
506473
update_time?: string;
507474
}
508475

476+
// @public
477+
export interface ServiceTypeInstance {
478+
// (undocumented)
479+
create_time?: string;
480+
// (undocumented)
481+
delete_time?: string;
482+
deleted?: boolean;
483+
id: string;
484+
path?: string;
485+
provider_name?: string;
486+
spec?: ServiceTypeInstanceSpec;
487+
status?: string;
488+
// (undocumented)
489+
update_time?: string;
490+
}
491+
492+
// @public
493+
export interface ServiceTypeInstanceList {
494+
// (undocumented)
495+
instances?: ServiceTypeInstance[];
496+
// (undocumented)
497+
next_page_token?: string;
498+
}
499+
500+
// @public
501+
export interface ServiceTypeInstanceSpec {
502+
// (undocumented)
503+
[key: string]: unknown;
504+
service_type?: string;
505+
}
506+
509507
// @public
510508
export interface ServiceTypeList {
511509
// (undocumented)

0 commit comments

Comments
 (0)