From d1862bd938722f0cb1cef9a1bd420cbd04895095 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Fri, 11 Sep 2026 23:04:13 +0800 Subject: [PATCH 1/3] fix(health): drop monasca from the module list and its label Monasca was removed from CubeCOS by bigstack-oss/cubecos#672 phase 4, and cube-cos-api stopped reporting it in the paired change. The UI still offered it: the health page carried a 'Monasca' display label, and the generated SDK still accepted 'monasca' as a module name on the health-history and repair-module endpoints -- so the repair button could ask the API to repair a module neither side knows about any more. sdk/api.ts is regenerated by 'pnpm api:generate' from the submodule, not edited by hand; the diff is confined to two JSDoc @type unions and two enum members, the exact mirror of what 570ec1f3 added for metricsDb. The submodule is pinned to 664909d on cube-cos-openapi. Verified with api:generate, tsc across the workspace projects, eslint, prettier and the web-app build -- all clean. Noticed while here, not changed: moduleNameLabelMap still has a 'senlin' entry. Senlin went in cubecos d4550c91 and 'senlin' is absent from the generated enum, so that label is dead too -- worth its own change rather than riding along with this one. Signed-off-by: Jim Lin Co-authored-by: Eandalf Co-Authored-By: Claude Opus 5 (1M context) --- packages/cube-frontend-api/cube-cos-openapi | 2 +- packages/cube-frontend-api/sdk/api.ts | 12 ++++++++---- .../src/pages/home/health/homeHealthPageUtils.ts | 1 - 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/cube-frontend-api/cube-cos-openapi b/packages/cube-frontend-api/cube-cos-openapi index a34418d3..664909d4 160000 --- a/packages/cube-frontend-api/cube-cos-openapi +++ b/packages/cube-frontend-api/cube-cos-openapi @@ -1 +1 @@ -Subproject commit a34418d338c775429c3405fdb80813fd5bbda2aa +Subproject commit 664909d4bad8b52435b4316c6952a035b196152d diff --git a/packages/cube-frontend-api/sdk/api.ts b/packages/cube-frontend-api/sdk/api.ts index a900d96d..8b8aff1c 100644 --- a/packages/cube-frontend-api/sdk/api.ts +++ b/packages/cube-frontend-api/sdk/api.ts @@ -9908,6 +9908,12 @@ export interface ListNodeGPUCardsResponseDataInner { * @memberof ListNodeGPUCardsResponseDataInner */ 'attachedInstances': Array | null; + /** + * The Cyborg device profile a flavor\'s accel:device_profile must name to be scheduled onto this card. Only a pgpu card has one: sriovVgpu and migBackedVgpu cards are scheduled through the PCI alias reported on each of their profiles. Null on every other resource type, and on a pgpu card whose profile has not been created yet or could not be looked up. + * @type {string} + * @memberof ListNodeGPUCardsResponseDataInner + */ + 'deviceProfile': string | null; /** * * @type {ListNodeGPUCardsResponseDataInnerLinks} @@ -20977,7 +20983,7 @@ export interface HealthApiGetHealthHistoryRequest { /** * The name of the module to retrieve health history. use GET /api/v1/datacenters/{dataCenter}/services/{serviceType} to get the module list. - * @type {'link' | 'clock' | 'dns' | 'bootstrap' | 'license' | 'etcd' | 'nodelist' | 'hacluster' | 'rabbitmq' | 'mysql' | 'mongodb' | 'vip' | 'haproxy_ha' | 'ceph' | 'ceph_mon' | 'ceph_osd' | 'ceph_rgw' | 'ceph_mds' | 'ceph_mgr' | 'rbd_target' | 'fc_link' | 'haproxy' | 'httpd' | 'skyline' | 'api' | 'memcache' | 'k3s' | 'keycloak' | 'neutron' | 'nova' | 'cyborg' | 'ironic' | 'glance' | 'cinder' | 'manila' | 'swift' | 'heat' | 'octavia' | 'designate' | 'rancher' | 'masakari' | 'zookeeper' | 'kafka' | 'monasca' | 'telegraf' | 'grafana' | 'filebeat' | 'auditbeat' | 'logstash' | 'opensearch' | 'opensearch-dashboards' | 'influxdb' | 'kapacitor'} + * @type {'link' | 'clock' | 'dns' | 'bootstrap' | 'license' | 'etcd' | 'nodelist' | 'hacluster' | 'rabbitmq' | 'mysql' | 'mongodb' | 'vip' | 'haproxy_ha' | 'ceph' | 'ceph_mon' | 'ceph_osd' | 'ceph_rgw' | 'ceph_mds' | 'ceph_mgr' | 'rbd_target' | 'fc_link' | 'haproxy' | 'httpd' | 'skyline' | 'api' | 'memcache' | 'k3s' | 'keycloak' | 'neutron' | 'nova' | 'cyborg' | 'ironic' | 'glance' | 'cinder' | 'manila' | 'swift' | 'heat' | 'octavia' | 'designate' | 'rancher' | 'masakari' | 'zookeeper' | 'kafka' | 'telegraf' | 'grafana' | 'filebeat' | 'auditbeat' | 'logstash' | 'opensearch' | 'opensearch-dashboards' | 'influxdb' | 'kapacitor'} * @memberof HealthApiGetHealthHistory */ readonly moduleType: GetHealthHistoryModuleTypeEnum @@ -21131,7 +21137,7 @@ export interface HealthApiRepairModuleHealthRequest { /** * The name of the module to repair. use GET /api/v1/datacenters/{dataCenter}/services/{serviceType} to get the module list. - * @type {'link' | 'clock' | 'dns' | 'bootstrap' | 'license' | 'etcd' | 'nodelist' | 'hacluster' | 'rabbitmq' | 'mysql' | 'mongodb' | 'vip' | 'haproxy_ha' | 'ceph' | 'ceph_mon' | 'ceph_osd' | 'ceph_rgw' | 'ceph_mds' | 'ceph_mgr' | 'rbd_target' | 'fc_link' | 'haproxy' | 'httpd' | 'skyline' | 'api' | 'memcache' | 'k3s' | 'keycloak' | 'neutron' | 'nova' | 'cyborg' | 'ironic' | 'glance' | 'cinder' | 'manila' | 'swift' | 'heat' | 'octavia' | 'designate' | 'rancher' | 'masakari' | 'zookeeper' | 'kafka' | 'monasca' | 'telegraf' | 'grafana' | 'filebeat' | 'auditbeat' | 'logstash' | 'opensearch' | 'opensearch-dashboards' | 'influxdb' | 'kapacitor'} + * @type {'link' | 'clock' | 'dns' | 'bootstrap' | 'license' | 'etcd' | 'nodelist' | 'hacluster' | 'rabbitmq' | 'mysql' | 'mongodb' | 'vip' | 'haproxy_ha' | 'ceph' | 'ceph_mon' | 'ceph_osd' | 'ceph_rgw' | 'ceph_mds' | 'ceph_mgr' | 'rbd_target' | 'fc_link' | 'haproxy' | 'httpd' | 'skyline' | 'api' | 'memcache' | 'k3s' | 'keycloak' | 'neutron' | 'nova' | 'cyborg' | 'ironic' | 'glance' | 'cinder' | 'manila' | 'swift' | 'heat' | 'octavia' | 'designate' | 'rancher' | 'masakari' | 'zookeeper' | 'kafka' | 'telegraf' | 'grafana' | 'filebeat' | 'auditbeat' | 'logstash' | 'opensearch' | 'opensearch-dashboards' | 'influxdb' | 'kapacitor'} * @memberof HealthApiRepairModuleHealth */ readonly moduleType: RepairModuleHealthModuleTypeEnum @@ -21286,7 +21292,6 @@ export const GetHealthHistoryModuleTypeEnum = { Masakari: 'masakari', Zookeeper: 'zookeeper', Kafka: 'kafka', - Monasca: 'monasca', Telegraf: 'telegraf', Grafana: 'grafana', Filebeat: 'filebeat', @@ -21446,7 +21451,6 @@ export const RepairModuleHealthModuleTypeEnum = { Masakari: 'masakari', Zookeeper: 'zookeeper', Kafka: 'kafka', - Monasca: 'monasca', Telegraf: 'telegraf', Grafana: 'grafana', Filebeat: 'filebeat', diff --git a/packages/cube-frontend-web-app/src/pages/home/health/homeHealthPageUtils.ts b/packages/cube-frontend-web-app/src/pages/home/health/homeHealthPageUtils.ts index c26696a6..1e761869 100644 --- a/packages/cube-frontend-web-app/src/pages/home/health/homeHealthPageUtils.ts +++ b/packages/cube-frontend-web-app/src/pages/home/health/homeHealthPageUtils.ts @@ -91,7 +91,6 @@ const moduleNameLabelMap: Record = { watcher: 'Watcher', zookeeper: 'ZooKeeper', kafka: 'Kafka', - monasca: 'Monasca', telegraf: 'Telegraf', grafana: 'Grafana', prometheus: 'Prometheus', From 1df4b78e46d1a6b98fc9f087b9cbca2f0822a815 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Fri, 11 Sep 2026 23:13:57 +0800 Subject: [PATCH 2/3] fix(health): drop the dead senlin label and refresh a stale mock Senlin was removed from CubeCOS by d4550c91, back on the yoga train. moduleNameLabelMap still carried a 'senlin' entry, and the storybook event fixture still used 'senlin' as a sample service name. The label is unreachable, not merely stale: the map is keyed by the module names the API can return, and 'senlin' is absent from the generated SDK's module enums -- which is why this never surfaced as a type error. Nothing can look it up. The mock is sample data rather than a lookup, so it was never broken, but it named a service that has not existed for two release trains. Changed to 'neutron', which also makes the fixture internally consistent: the event it decorates is a NET00003I in category Net, so a senlin service was wrong on its own terms. Also bumps cube-cos-openapi to 6217dc4, which drops senlin from the schema -- the businessLogic module entry and the senlin.debug.enabled tuning, the two places the earlier half-removal left behind. sdk/api.ts is byte-for-byte unchanged by that bump, which is the evidence for the paragraph above: senlin was already out of the module enums, so nothing the generator emits moves. The pointer targets the openapi branch rather than its develop; re-pin to the merged SHA before this lands. Verified with api:generate, tsc across the workspace projects, eslint, prettier, the full test suite (121 tests, 7 files) and the web-app build -- all clean. Signed-off-by: Jim Lin Co-authored-by: Eandalf Co-Authored-By: Claude Opus 5 (1M context) --- packages/cube-frontend-api/cube-cos-openapi | 2 +- .../stories/components/CosPanel/CosDashboardPanel/mockData.ts | 2 +- .../src/pages/home/health/homeHealthPageUtils.ts | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/cube-frontend-api/cube-cos-openapi b/packages/cube-frontend-api/cube-cos-openapi index 664909d4..6217dc43 160000 --- a/packages/cube-frontend-api/cube-cos-openapi +++ b/packages/cube-frontend-api/cube-cos-openapi @@ -1 +1 @@ -Subproject commit 664909d4bad8b52435b4316c6952a035b196152d +Subproject commit 6217dc43032e8bb170200d646313b4b01e144eec diff --git a/packages/cube-frontend-ui-library/src/stories/components/CosPanel/CosDashboardPanel/mockData.ts b/packages/cube-frontend-ui-library/src/stories/components/CosPanel/CosDashboardPanel/mockData.ts index 57d54e85..867e699d 100644 --- a/packages/cube-frontend-ui-library/src/stories/components/CosPanel/CosDashboardPanel/mockData.ts +++ b/packages/cube-frontend-ui-library/src/stories/components/CosPanel/CosDashboardPanel/mockData.ts @@ -24,7 +24,7 @@ const getMockEvent = (index: number): Event => { at 192.168.0.8 is reachable`, host: 'dell13', category: 'Net', - service: 'senlin', + service: 'neutron', metadata: 'id:940c6a1f-1f42-4152a87e-56c0309939df', time: 'yyyy/mm/dd 00:00', } diff --git a/packages/cube-frontend-web-app/src/pages/home/health/homeHealthPageUtils.ts b/packages/cube-frontend-web-app/src/pages/home/health/homeHealthPageUtils.ts index 1e761869..3abfacf9 100644 --- a/packages/cube-frontend-web-app/src/pages/home/health/homeHealthPageUtils.ts +++ b/packages/cube-frontend-web-app/src/pages/home/health/homeHealthPageUtils.ts @@ -87,7 +87,6 @@ const moduleNameLabelMap: Record = { designate: 'Designate', rancher: 'Rancher', masakari: 'Masakari', - senlin: 'Senlin', watcher: 'Watcher', zookeeper: 'ZooKeeper', kafka: 'Kafka', From 1d3bf53d29cb165d69297edfffd95adf60207b0f Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Mon, 14 Sep 2026 15:20:48 +0800 Subject: [PATCH 3/3] fix(gpu): give the mock cards the deviceProfile the schema now requires CI's Check and Build jobs fail with twelve TS2741s, one per mock card: src/mocks/gpu.ts(17,3): error TS2741: Property 'deviceProfile' is missing in type '{...}' but required in type 'Omit' Not caused by this branch's monasca and senlin work. Re-pinning the cube-cos-openapi submodule from a34418d to the merged tip -- which the two earlier commits here said to do -- advanced it by three commits, not one: 9495246 feat(gpu): document a pgpu card's device profile 664909d docs(health): drop monasca from the schema 6217dc4 docs(health): drop senlin from the schema 9495246 is someone else's, landed in the schema without its cube-cos-ui counterpart. It adds deviceProfile to ListNodeGPUCardsResponseDataInner as required-and-nullable (`string | null`), so every object typed against that interface must carry the key. mockGpuCards is declared `Omit[]`, so all twelve fail. This branch is simply the first UI PR to bump the submodule past it. Values follow the field's documented semantics: only a pgpu card has a profile, so the three pgpu cards get one and the other nine are null -- which is what the schema says of every other resource type, not a placeholder. The three names are what the product would actually create. CubeCOS builds them in os_device_profile_create (cubecos core/sdk_sh/modules/sdk_os.sh): the bracketed model out of the PCI id, lowercased, spaces to underscores, suffixed with the resource-unit count. So an RTX 4090 reporting `[GeForce RTX 4090]` yields geforce_rtx_4090_1. Fixture-only. No UI source reads deviceProfile yet -- the field is schema and SDK so far -- and the mocks are msw handlers, so nothing shipped changes. Verified with pnpm lint (tsc across the workspace, eslint, prettier), web-app:build, and the full suite: 121 tests, 7 files, all clean. Worth the feature owner's attention: no fixture now exercises the null-on-a-pgpu-card branch the field's description calls out -- a pgpu card whose profile has not been created yet or could not be looked up. Left alone rather than invented, since that is a choice about their feature. Signed-off-by: Jim Lin Co-authored-by: Eandalf Co-Authored-By: Claude Opus 5 (1M context) --- packages/cube-frontend-web-app/src/mocks/gpu.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/cube-frontend-web-app/src/mocks/gpu.ts b/packages/cube-frontend-web-app/src/mocks/gpu.ts index 3e148d00..b261ad3c 100644 --- a/packages/cube-frontend-web-app/src/mocks/gpu.ts +++ b/packages/cube-frontend-web-app/src/mocks/gpu.ts @@ -30,6 +30,7 @@ const mockGpuCards: Omit[] = [ GPUSupportResourceType.MigBackedVgpu, ], sriovVgpuProfileCountLimit: 10, + deviceProfile: null, vram: { allocatedMiB: 32768, totalMiB: 81920, @@ -118,6 +119,7 @@ const mockGpuCards: Omit[] = [ GPUSupportResourceType.MigBackedVgpu, ], sriovVgpuProfileCountLimit: 10, + deviceProfile: null, vram: { allocatedMiB: 0, totalMiB: 4096000, @@ -191,6 +193,7 @@ const mockGpuCards: Omit[] = [ GPUSupportResourceType.MigBackedVgpu, ], sriovVgpuProfileCountLimit: 10, + deviceProfile: null, vram: { allocatedMiB: 0, totalMiB: 81920, @@ -225,6 +228,7 @@ const mockGpuCards: Omit[] = [ GPUSupportResourceType.SriovVgpu, ], sriovVgpuProfileCountLimit: 10, + deviceProfile: null, vram: { allocatedMiB: 12000, totalMiB: 16384, @@ -312,6 +316,7 @@ const mockGpuCards: Omit[] = [ GPUSupportResourceType.SriovVgpu, ], sriovVgpuProfileCountLimit: 10, + deviceProfile: null, vram: { allocatedMiB: 0, totalMiB: 12288, @@ -356,6 +361,7 @@ const mockGpuCards: Omit[] = [ GPUSupportResourceType.SriovVgpu, ], sriovVgpuProfileCountLimit: 10, + deviceProfile: null, vram: { allocatedMiB: 0, totalMiB: 16384, @@ -384,6 +390,7 @@ const mockGpuCards: Omit[] = [ }, supportResourceTypes: [GPUSupportResourceType.Pgpu], sriovVgpuProfileCountLimit: null, + deviceProfile: 'geforce_rtx_4090_1', vram: { allocatedMiB: null, totalMiB: null, @@ -427,6 +434,7 @@ const mockGpuCards: Omit[] = [ }, supportResourceTypes: [GPUSupportResourceType.Pgpu], sriovVgpuProfileCountLimit: null, + deviceProfile: 'geforce_rtx_4080_1', vram: { allocatedMiB: null, totalMiB: null, @@ -455,6 +463,7 @@ const mockGpuCards: Omit[] = [ }, supportResourceTypes: [GPUSupportResourceType.Pgpu], sriovVgpuProfileCountLimit: null, + deviceProfile: null, vram: { allocatedMiB: 0, totalMiB: 16384, @@ -487,6 +496,7 @@ const mockGpuCards: Omit[] = [ GPUSupportResourceType.MigBackedVgpu, ], sriovVgpuProfileCountLimit: 10, + deviceProfile: 'h100_80gb_pcie_1', vram: { allocatedMiB: null, totalMiB: null, @@ -533,6 +543,7 @@ const mockGpuCards: Omit[] = [ GPUSupportResourceType.SriovVgpu, ], sriovVgpuProfileCountLimit: 10, + deviceProfile: null, vram: { allocatedMiB: 0, totalMiB: 49152, @@ -578,6 +589,7 @@ const mockGpuCards: Omit[] = [ GPUSupportResourceType.MigBackedVgpu, ], sriovVgpuProfileCountLimit: 8, + deviceProfile: null, vram: { allocatedMiB: 0, totalMiB: 24576,