diff --git a/OMICRON_VERSION b/OMICRON_VERSION index c7ee013e6..f5466f872 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -6d241a7d21d11cb7979122bde9a906d8d4837d09 +e11a929aa2cbbd6e476cbcc836b871409492ff65 diff --git a/app/api/__generated__/API_VERSION b/app/api/__generated__/API_VERSION index d5f572486..926eb72d9 100644 --- a/app/api/__generated__/API_VERSION +++ b/app/api/__generated__/API_VERSION @@ -1 +1 @@ -2026091500.0.0 +2026110500.0.0 diff --git a/app/api/__generated__/Api.ts b/app/api/__generated__/Api.ts index a021b1bf4..6c536905d 100644 --- a/app/api/__generated__/Api.ts +++ b/app/api/__generated__/Api.ts @@ -2524,6 +2524,44 @@ export type ImageResultsPage = { nextPage?: string | null } +/** + * Describes whether a resource impacted by an active problem is currently impacted by that problem, or why it is no longer impacted. + */ +export type ImpactState = + /** The resource is currently impacted by the active problem. */ + | 'active' + + /** The resource has returned to a healthy state due to automated response or operator actions. It is no longer impacted by this problem, even if the problem remains active. */ + | 'recovered' + + /** The resource is no longer impacted by the problem because the resource has been removed from service by an operator action. + +This occurs when an operator (or Oxide support) expunges a hardware resource (such as a physical disk or compute sled), or when a virtual resource (such as an instance or virtual disk) is deleted. */ + | 'out_of_service' + +/** + * API resource types which may be impacted by a problem. + */ +export type ImpactedResource = + /** A sled. */ + | { id: string; resourceType: 'sled' } + /** A switch. */ + | { id: string; resourceType: 'switch' } + /** A switch port. */ + | { id: string; resourceType: 'switch_port' } + /** A physical disk. */ + | { id: string; resourceType: 'physical_disk' } + /** A virtual machine instance. */ + | { id: string; resourceType: 'instance' } + /** A virtual disk. */ + | { id: string; resourceType: 'disk' } + /** An image. */ + | { id: string; resourceType: 'image' } + /** A virtual disk snapshot. */ + | { id: string; resourceType: 'snapshot' } + /** A silo. */ + | { id: string; resourceType: 'silo' } + /** * Parameters for importing blocks with a bulk write */ @@ -3864,6 +3902,118 @@ export type ProbeInfoResultsPage = { nextPage?: string | null } +/** + * The state of a problem. + */ +export type ProblemState = + /** The condition represented by the problem is still ongoing. */ + | 'active' + + /** The system has determined that the problem no longer exists. + +A resolved problem never becomes active again. If a similar condition is detected again, a new problem with a new ID is created. + +Resolved problems are retained for historical purposes. */ + | 'resolved' + +/** + * An active or resolved problem detected by the fault management subsystem. + * + * Problems describe conditions in which some aspect of the system's operation is degraded. A problem is either *active*, if the condition is still ongoing, or *resolved*, once the fault management system has determined that the system is no longer impacted. The `state` field indicates whether a given problem is active or has been resolved. Resolved problems remain accessible for historical purposes. + * + * A problem's *impacts* refers to the resources which are affected by an active problem at a given time. Both hardware resources (e.g. sleds, physical disks, switches, et cetera) and user-created virtual resources (e.g. instances, virtual disks, and so on) may be impacted by a problem. The list of impacted resources may change over time, as the system detects additional impacted resources, or as resources recover due to automated or operator response to the problem. To view the list of resources currently impacted by a problem, use the `problem_impact_list` API endpoint. + * + * Problems may cause, and may be caused by, other problems. A problem may have multiple causes, and may result in any number of other problems. The resolution of a problem that causes other problems may, or may not, result in the resolution of the caused problems, depending on the nature of the problem. Conversely, problems caused by another problem may be resolved without resolving the causing problem, again depending on the nature of the particular issue. Use the `problem_cause_list` and `problem_consequences_list` API endpoints to list any problems causing or caused by a given problem, respectively. + * + * Alerts provide notifications regarding events that occurred over the course of an active problem. To view the list of alerts generated by a problem, use the `problem_alert_list` API endpoint. This list may be sorted by the alert's timestamp to provide a chronological view of the problem. + * + * Support bundles may be attached to a problem to provide additional diagnostic data for operators and Oxide support. Use the `problem_support_bundle_list` API endpoint to list the support bundles attached to a problem. + */ +export type Problem = { + /** A description of any actions an operator should take in response to this problem. + +This may change as the problem progresses. */ + actionRequired: string + /** The problem's class. + +Problem classes indicate the broad category of the issue that this problem represents, while its problem code represents the specific nature of the issue. The class is determined by the problem code: all problems with the same problem code will have the same class. + +Problem classes are represented by dot-separated strings, in which each segment is more specific than the last. For example, a problem related to a rack's power shelf will have the problem code `hardware.power_shelf`. */ + class: string + /** The problem code describing this problem. + +Problem codes are opaque numeric identifiers that indicate the nature of the issue a problem represents. They may be used to reference documentation and service instructions for that particular kind of problem, and to communicate with Oxide support. The problem code may change if the diagnosis of the problem changes, which creates a new revision. */ + code: number + /** A longer human-readable description of the problem. + +This may change as the problem progresses. */ + description: string + /** Unique, immutable, system-controlled identifier for each resource */ + id: string + /** The current revision number of this problem. + +The revision number is incremented each time the problem is updated. Changes to a problem's impact list, description, and relationships with other problems all increment the revision number. */ + revision: number + /** The current state of this problem. */ + state: ProblemState + /** A brief, human-readable summary of the problem. + +This is short enough to be used as a title. It is intended for display to humans, and is not a stable identifier. For a machine-consumable identifier, use the problem code field. */ + summary: string + /** Timestamp when this resource was created */ + timeCreated: Date + /** Timestamp when this resource was last modified */ + timeModified: Date + /** The time at which this problem entered its current `state`. + +For an active problem, this is the time at which the problem was first detected. For a resolved problem, this is the time at which the problem was determined to be resolved. */ + timeStateChanged: Date +} + +/** + * A resource impacted by a problem. + */ +export type ProblemImpact = { + /** ID of the problem impacting this resource. */ + problemId: string + /** A human-readable summary of how this resource is impacted by the problem. */ + reason: string + /** The impacted resource's type and ID. */ + resource: ImpactedResource + /** The revision of the problem in which this impact was added. */ + revisionAdded: number + /** Whether or not the resource remains impacted by the problem. */ + state: ImpactState + /** The time at which the system first determined this resource to be impacted by the problem. + +Note: impact to this resource may predate this timestamp. This represents the first time at which the system detected the impact to this resource and determine that it was due to this problem. */ + timeDetected: Date + /** The time at which this impact entered its current `state`. + +For an impact that is still active, this is the same as `time_detected`. Otherwise, this is the time at which the resource recovered or was removed from service. */ + timeStateChanged: Date +} + +/** + * A single page of results + */ +export type ProblemImpactResultsPage = { + /** list of items on this page of results */ + items: ProblemImpact[] + /** token used to fetch the next page of results (if any) */ + nextPage?: string | null +} + +/** + * A single page of results + */ +export type ProblemResultsPage = { + /** list of items on this page of results */ + items: Problem[] + /** token used to fetch the next page of results (if any) */ + nextPage?: string | null +} + /** * View of a Project */ @@ -3984,7 +4134,31 @@ export type Rack = { timeModified: Date } -export type RackMembershipAddSledsRequest = { sledIds: BaseboardId[] } +/** + * Instructs the system to override safety checks when adding a sled + */ +export type SledAddPrecheckOverrides = { + /** Add the requested sleds even if their software does not match the current target release + +This allows sleds to be added even when their SP, RoT, RoT bootloader, or host OS phase 1 images cannot be confirmed to match those expected by the control plane. Adding sleds with mismatched software is not supported since the control plane needs compatible versions in order to communicate with the sled. + +This override is provided for working around bugs and only in emergency situations. It should not generally be used. */ + allowUnverifiedSledSoftware?: boolean + /** Add the requested sleds even if the system has not settled on its current target release + +This allows sleds to be added when the system is in the middle of a software update or if it has recently been MUPdated and that MUPdate hasn't been resolved. This is not generally supported because in order for adding a sled to work, the versions of software on that sled must match the rest of the control plane, but that's not well-defined in these two cases. + +This override is provided for working around bugs and only in emergency situations. It should not generally be used. */ + allowWithoutSettledTargetRelease?: boolean +} + +export type RackMembershipAddSledsRequest = { + /** Optional overrides for various safety checks + +Overriding checks is dangerous and should only be done at the direction of Oxide support. */ + overridePrechecks?: SledAddPrecheckOverrides + sledIds: BaseboardId[] +} export type RackMembershipChangeState = 'in_progress' | 'committed' | 'aborted' @@ -4020,6 +4194,30 @@ export type RackResultsPage = { nextPage?: string | null } +/** + * A problem that is a cause or consequence of another problem + */ +export type RelatedProblem = { + /** ID of the related problem */ + id: string + /** A human-readable summary of why the problems are related. */ + reason: string + /** The revision of the requested problem in which this relationship was added. */ + revisionAdded: number + /** The current state of the related problem. */ + state: ProblemState +} + +/** + * A single page of results + */ +export type RelatedProblemResultsPage = { + /** list of items on this page of results */ + items: RelatedProblem[] + /** token used to fetch the next page of results (if any) */ + nextPage?: string | null +} + /** * A route to a destination network through a gateway address. */ @@ -5342,6 +5540,37 @@ export type UnadoptedPhysicalDiskResultsPage = { nextPage?: string | null } +/** + * View of an unadopted sled in an unadopted rack + * + * This is distinct from an `UninitializedSled`, which represents an uninitialized sled in an *adopted* rack; by contrast, this represents a sled in a rack that hasn't been adopted yet. + */ +export type UnadoptedSled = { + baseboardId: BaseboardId + lastStartErr?: string | null + sledAgentStarted: boolean + sledId: string +} + +/** + * View of a rack that's joined the underlay network but hasn't been adopted into the regional cluster yet + */ +export type UnadoptedRack = { + rackId: string + rackSubnet: Ipv6Net + unadoptedSleds: UnadoptedSled[] +} + +/** + * A single page of results + */ +export type UnadoptedRackResultsPage = { + /** list of items on this page of results */ + items: UnadoptedRack[] + /** token used to fetch the next page of results (if any) */ + nextPage?: string | null +} + /** * A sled that has not been added to an initialized rack yet */ @@ -6857,6 +7086,33 @@ export interface AuditLogListQueryParams { startTime?: Date } +export interface SiloCertificateListQueryParams { + limit?: number | null + pageToken?: string | null + silo?: NameOrId + sortBy?: NameOrIdSortMode +} + +export interface SiloCertificateCreateQueryParams { + silo: NameOrId +} + +export interface SiloCertificateViewPathParams { + certificate: NameOrId +} + +export interface SiloCertificateViewQueryParams { + silo?: NameOrId +} + +export interface SiloCertificateDeletePathParams { + certificate: NameOrId +} + +export interface SiloCertificateDeleteQueryParams { + silo?: NameOrId +} + export interface PhysicalDiskDisableAdoptionPathParams { physicalDiskAdoptionReqId: string } @@ -6920,6 +7176,12 @@ export interface RackMembershipAddSledsPathParams { rackId: string } +export interface RackListUnadoptedQueryParams { + limit?: number | null + pageToken?: string | null + sortBy?: IdSortMode +} + export interface SledListQueryParams { limit?: number | null pageToken?: string | null @@ -7231,6 +7493,73 @@ export interface NetworkingSwitchPortSettingsViewPathParams { port: NameOrId } +export interface ProblemListQueryParams { + limit?: number | null + pageToken?: string | null + sortBy?: TimeAndIdSortMode + state?: ProblemState +} + +export interface ProblemViewPathParams { + problemId: string +} + +export interface ProblemAlertListPathParams { + problemId: string +} + +export interface ProblemAlertListQueryParams { + alertClass?: AlertSubscription + endTime?: Date | null + limit?: number | null + pageToken?: string | null + sortBy?: TimeAndIdSortMode + startTime?: Date | null +} + +export interface ProblemCausesListPathParams { + problemId: string +} + +export interface ProblemCausesListQueryParams { + limit?: number | null + pageToken?: string | null + sortBy?: IdSortMode + state?: ProblemState +} + +export interface ProblemConsequencesListPathParams { + problemId: string +} + +export interface ProblemConsequencesListQueryParams { + limit?: number | null + pageToken?: string | null + sortBy?: IdSortMode + state?: ProblemState +} + +export interface ProblemImpactListPathParams { + problemId: string +} + +export interface ProblemImpactListQueryParams { + limit?: number | null + pageToken?: string | null + sortBy?: IdSortMode + state?: ImpactState +} + +export interface ProblemSupportBundlesListPathParams { + problemId: string +} + +export interface ProblemSupportBundlesListQueryParams { + limit?: number | null + pageToken?: string | null + sortBy?: TimeAndIdSortMode +} + export interface ScimTokenListQueryParams { silo: NameOrId } @@ -7738,7 +8067,7 @@ export class Api { * Pulled from info.version in the OpenAPI schema. Sent in the * `api-version` header on all requests. */ - apiVersion = '2026091500.0.0' + apiVersion = '2026110500.0.0' constructor({ host = '', baseParams = {}, token }: ApiConfig = {}) { this.host = host @@ -8393,7 +8722,7 @@ export class Api { }) }, /** - * List certificates for external endpoints + * List TLS certificates in current silo */ certificateList: ( { query = {} }: { query?: CertificateListQueryParams }, @@ -8407,7 +8736,7 @@ export class Api { }) }, /** - * Create system-wide x.509 certificate + * Create TLS certificate in current silo */ certificateCreate: ( { body }: { body: CertificateCreate }, @@ -8421,7 +8750,7 @@ export class Api { }) }, /** - * Fetch certificate + * Fetch TLS certificate in current silo */ certificateView: ( { path }: { path: CertificateViewPathParams }, @@ -8434,7 +8763,7 @@ export class Api { }) }, /** - * Delete certificate + * Delete TLS certificate in current silo */ certificateDelete: ( { path }: { path: CertificateDeletePathParams }, @@ -10097,6 +10426,72 @@ export class Api { ...params, }) }, + /** + * List TLS certificates in silo + */ + siloCertificateList: ( + { query = {} }: { query?: SiloCertificateListQueryParams }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/certificates`, + method: 'GET', + query, + ...params, + }) + }, + /** + * Create TLS certificate in silo + */ + siloCertificateCreate: ( + { query, body }: { query: SiloCertificateCreateQueryParams; body: CertificateCreate }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/certificates`, + method: 'POST', + body, + query, + ...params, + }) + }, + /** + * Fetch TLS certificate in silo + */ + siloCertificateView: ( + { + path, + query = {}, + }: { path: SiloCertificateViewPathParams; query?: SiloCertificateViewQueryParams }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/certificates/${path.certificate}`, + method: 'GET', + query, + ...params, + }) + }, + /** + * Delete TLS certificate in silo + */ + siloCertificateDelete: ( + { + path, + query = {}, + }: { + path: SiloCertificateDeletePathParams + query?: SiloCertificateDeleteQueryParams + }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/certificates/${path.certificate}`, + method: 'DELETE', + query, + ...params, + }) + }, /** * Enable adoption of a physical disk for general use */ @@ -10270,6 +10665,20 @@ export class Api { ...params, }) }, + /** + * List unadopted racks + */ + rackListUnadopted: ( + { query = {} }: { query?: RackListUnadoptedQueryParams }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/hardware/racks-unadopted`, + method: 'GET', + query, + ...params, + }) + }, /** * List sleds */ @@ -11288,6 +11697,121 @@ export class Api { ...params, }) }, + /** + * List problems + */ + problemList: ( + { query = {} }: { query?: ProblemListQueryParams }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/problems`, + method: 'GET', + query, + ...params, + }) + }, + /** + * Fetch problem + */ + problemView: ({ path }: { path: ProblemViewPathParams }, params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/problems/${path.problemId}`, + method: 'GET', + ...params, + }) + }, + /** + * List alerts for problem + */ + problemAlertList: ( + { + path, + query = {}, + }: { path: ProblemAlertListPathParams; query?: ProblemAlertListQueryParams }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/problems/${path.problemId}/alerts`, + method: 'GET', + query, + ...params, + }) + }, + /** + * List causes of problem + */ + problemCausesList: ( + { + path, + query = {}, + }: { path: ProblemCausesListPathParams; query?: ProblemCausesListQueryParams }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/problems/${path.problemId}/causes`, + method: 'GET', + query, + ...params, + }) + }, + /** + * List consequences of problem + */ + problemConsequencesList: ( + { + path, + query = {}, + }: { + path: ProblemConsequencesListPathParams + query?: ProblemConsequencesListQueryParams + }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/problems/${path.problemId}/consequences`, + method: 'GET', + query, + ...params, + }) + }, + /** + * List resources impacted by problem + */ + problemImpactList: ( + { + path, + query = {}, + }: { path: ProblemImpactListPathParams; query?: ProblemImpactListQueryParams }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/problems/${path.problemId}/impacts`, + method: 'GET', + query, + ...params, + }) + }, + /** + * List support bundles attached to problem + */ + problemSupportBundlesList: ( + { + path, + query = {}, + }: { + path: ProblemSupportBundlesListPathParams + query?: ProblemSupportBundlesListQueryParams + }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/problems/${path.problemId}/support-bundles`, + method: 'GET', + query, + ...params, + }) + }, /** * List SCIM tokens */ diff --git a/app/api/__generated__/OMICRON_VERSION b/app/api/__generated__/OMICRON_VERSION index fc3991af5..2af4629c1 100644 --- a/app/api/__generated__/OMICRON_VERSION +++ b/app/api/__generated__/OMICRON_VERSION @@ -1,2 +1,2 @@ # generated file. do not update manually. see docs/update-pinned-api.md -6d241a7d21d11cb7979122bde9a906d8d4837d09 +e11a929aa2cbbd6e476cbcc836b871409492ff65 diff --git a/app/api/__generated__/msw-handlers.ts b/app/api/__generated__/msw-handlers.ts index 4e6268760..e8539f3b9 100644 --- a/app/api/__generated__/msw-handlers.ts +++ b/app/api/__generated__/msw-handlers.ts @@ -22,6 +22,10 @@ import * as schema from './validate' type HandlerResult = Json | StrictResponse> type StatusCode = number +// For endpoints that respond with something other than JSON or a 204 (e.g., +// binary download, HEAD, redirect). The handler can return a Response to +// set headers or a body. +type StatusOrResponse = StatusCode | Response // these are used for turning our nice JS-ified API types back into the original // API JSON types (snake cased and dates as strings) for use in our mock API @@ -49,7 +53,7 @@ export interface MSWHandlers { deviceAuthRequest: (params: { req: Request cookies: Record - }) => Promisable + }) => Promisable /** `POST /device/confirm` */ deviceAuthConfirm: (params: { body: Json @@ -60,7 +64,7 @@ export interface MSWHandlers { deviceAccessToken: (params: { req: Request cookies: Record - }) => Promisable + }) => Promisable /** `GET /experimental/v1/probes` */ probeList: (params: { query: Api.ProbeListQueryParams @@ -93,7 +97,7 @@ export interface MSWHandlers { path: Api.LoginSamlPathParams req: Request cookies: Record - }) => Promisable + }) => Promisable /** `GET /v1/affinity-groups` */ affinityGroupList: (params: { query: Api.AffinityGroupListQueryParams @@ -678,7 +682,7 @@ export interface MSWHandlers { query: Api.InstanceSerialConsoleStreamQueryParams req: Request cookies: Record - }) => Promisable + }) => Promisable /** `GET /v1/instances/:instance/ssh-public-keys` */ instanceSshPublicKeyList: (params: { path: Api.InstanceSshPublicKeyListPathParams @@ -1004,6 +1008,33 @@ export interface MSWHandlers { req: Request cookies: Record }) => Promisable> + /** `GET /v1/system/certificates` */ + siloCertificateList: (params: { + query: Api.SiloCertificateListQueryParams + req: Request + cookies: Record + }) => Promisable> + /** `POST /v1/system/certificates` */ + siloCertificateCreate: (params: { + query: Api.SiloCertificateCreateQueryParams + body: Json + req: Request + cookies: Record + }) => Promisable> + /** `GET /v1/system/certificates/:certificate` */ + siloCertificateView: (params: { + path: Api.SiloCertificateViewPathParams + query: Api.SiloCertificateViewQueryParams + req: Request + cookies: Record + }) => Promisable> + /** `DELETE /v1/system/certificates/:certificate` */ + siloCertificateDelete: (params: { + path: Api.SiloCertificateDeletePathParams + query: Api.SiloCertificateDeleteQueryParams + req: Request + cookies: Record + }) => Promisable /** `PUT /v1/system/hardware/disk-adoption-request` */ physicalDiskEnableAdoption: (params: { body: Json @@ -1079,6 +1110,12 @@ export interface MSWHandlers { req: Request cookies: Record }) => Promisable> + /** `GET /v1/system/hardware/racks-unadopted` */ + rackListUnadopted: (params: { + query: Api.RackListUnadoptedQueryParams + req: Request + cookies: Record + }) => Promisable> /** `GET /v1/system/hardware/sleds` */ sledList: (params: { query: Api.SledListQueryParams @@ -1519,6 +1556,53 @@ export interface MSWHandlers { req: Request cookies: Record }) => Promisable> + /** `GET /v1/system/problems` */ + problemList: (params: { + query: Api.ProblemListQueryParams + req: Request + cookies: Record + }) => Promisable> + /** `GET /v1/system/problems/:problemId` */ + problemView: (params: { + path: Api.ProblemViewPathParams + req: Request + cookies: Record + }) => Promisable> + /** `GET /v1/system/problems/:problemId/alerts` */ + problemAlertList: (params: { + path: Api.ProblemAlertListPathParams + query: Api.ProblemAlertListQueryParams + req: Request + cookies: Record + }) => Promisable> + /** `GET /v1/system/problems/:problemId/causes` */ + problemCausesList: (params: { + path: Api.ProblemCausesListPathParams + query: Api.ProblemCausesListQueryParams + req: Request + cookies: Record + }) => Promisable> + /** `GET /v1/system/problems/:problemId/consequences` */ + problemConsequencesList: (params: { + path: Api.ProblemConsequencesListPathParams + query: Api.ProblemConsequencesListQueryParams + req: Request + cookies: Record + }) => Promisable> + /** `GET /v1/system/problems/:problemId/impacts` */ + problemImpactList: (params: { + path: Api.ProblemImpactListPathParams + query: Api.ProblemImpactListQueryParams + req: Request + cookies: Record + }) => Promisable> + /** `GET /v1/system/problems/:problemId/support-bundles` */ + problemSupportBundlesList: (params: { + path: Api.ProblemSupportBundlesListPathParams + query: Api.ProblemSupportBundlesListQueryParams + req: Request + cookies: Record + }) => Promisable> /** `GET /v1/system/scim/tokens` */ scimTokenList: (params: { query: Api.ScimTokenListQueryParams @@ -1736,31 +1820,31 @@ export interface MSWHandlers { path: Api.SupportBundleDownloadPathParams req: Request cookies: Record - }) => Promisable + }) => Promisable /** `HEAD /v1/system/support-bundles/:bundleId/download` */ supportBundleHead: (params: { path: Api.SupportBundleHeadPathParams req: Request cookies: Record - }) => Promisable + }) => Promisable /** `GET /v1/system/support-bundles/:bundleId/download/:file` */ supportBundleDownloadFile: (params: { path: Api.SupportBundleDownloadFilePathParams req: Request cookies: Record - }) => Promisable + }) => Promisable /** `HEAD /v1/system/support-bundles/:bundleId/download/:file` */ supportBundleHeadFile: (params: { path: Api.SupportBundleHeadFilePathParams req: Request cookies: Record - }) => Promisable + }) => Promisable /** `GET /v1/system/support-bundles/:bundleId/index` */ supportBundleIndex: (params: { path: Api.SupportBundleIndexPathParams req: Request cookies: Record - }) => Promisable + }) => Promisable /** `POST /v1/system/timeseries/query` */ systemTimeseriesQuery: (params: { body: Json @@ -2979,6 +3063,26 @@ export function makeHandlers(handlers: MSWHandlers): HttpHandler[] { '/v1/system/audit-log', handler(handlers['auditLogList'], schema.AuditLogListParams, null) ), + http.get( + '/v1/system/certificates', + handler(handlers['siloCertificateList'], schema.SiloCertificateListParams, null) + ), + http.post( + '/v1/system/certificates', + handler( + handlers['siloCertificateCreate'], + schema.SiloCertificateCreateParams, + schema.CertificateCreate + ) + ), + http.get( + '/v1/system/certificates/:certificate', + handler(handlers['siloCertificateView'], schema.SiloCertificateViewParams, null) + ), + http.delete( + '/v1/system/certificates/:certificate', + handler(handlers['siloCertificateDelete'], schema.SiloCertificateDeleteParams, null) + ), http.put( '/v1/system/hardware/disk-adoption-request', handler( @@ -3051,6 +3155,10 @@ export function makeHandlers(handlers: MSWHandlers): HttpHandler[] { schema.RackMembershipAddSledsRequest ) ), + http.get( + '/v1/system/hardware/racks-unadopted', + handler(handlers['rackListUnadopted'], schema.RackListUnadoptedParams, null) + ), http.get( '/v1/system/hardware/sleds', handler(handlers['sledList'], schema.SledListParams, null) @@ -3480,6 +3588,42 @@ export function makeHandlers(handlers: MSWHandlers): HttpHandler[] { '/v1/system/policy', handler(handlers['systemPolicyUpdate'], null, schema.FleetRolePolicy) ), + http.get( + '/v1/system/problems', + handler(handlers['problemList'], schema.ProblemListParams, null) + ), + http.get( + '/v1/system/problems/:problemId', + handler(handlers['problemView'], schema.ProblemViewParams, null) + ), + http.get( + '/v1/system/problems/:problemId/alerts', + handler(handlers['problemAlertList'], schema.ProblemAlertListParams, null) + ), + http.get( + '/v1/system/problems/:problemId/causes', + handler(handlers['problemCausesList'], schema.ProblemCausesListParams, null) + ), + http.get( + '/v1/system/problems/:problemId/consequences', + handler( + handlers['problemConsequencesList'], + schema.ProblemConsequencesListParams, + null + ) + ), + http.get( + '/v1/system/problems/:problemId/impacts', + handler(handlers['problemImpactList'], schema.ProblemImpactListParams, null) + ), + http.get( + '/v1/system/problems/:problemId/support-bundles', + handler( + handlers['problemSupportBundlesList'], + schema.ProblemSupportBundlesListParams, + null + ) + ), http.get( '/v1/system/scim/tokens', handler(handlers['scimTokenList'], schema.ScimTokenListParams, null) diff --git a/app/api/__generated__/nexus-console.ts b/app/api/__generated__/nexus-console.ts index e5a59a336..306908495 100644 --- a/app/api/__generated__/nexus-console.ts +++ b/app/api/__generated__/nexus-console.ts @@ -20,7 +20,7 @@ export const nexusSecurityHeaders = { /** Dropshot path templates that Nexus serves the console's index.html on */ export const nexusConsoleRoutes = [ '/', - '/access', + '/access/{path:.*}', '/device/success', '/device/verify', '/images/{path:.*}', diff --git a/app/api/__generated__/timeseries-metadata.ts b/app/api/__generated__/timeseries-metadata.ts index 45d90c437..0950835c2 100644 --- a/app/api/__generated__/timeseries-metadata.ts +++ b/app/api/__generated__/timeseries-metadata.ts @@ -426,6 +426,31 @@ export const targets: Partial`. The script does the following two steps: + 1. Updates [`OMICRON_VERSION`](/OMICRON_VERSION) with new Omicron commit hash + 1. Updates the generated API client by running `npm run gen-api`. This will automatically check out the omicron commit specified in `OMICRON_VERSION`. It also snapshots timeseries descriptions and units from omicron's oximeter schema files, which the API doesn't return, and the paths Nexus serves the console on, which a test checks against the console's routes, and the Content-Security-Policy Nexus serves the console with, which the dev and preview servers use. If you forget this step, a safety test in `app/api` will fail. 1. Run `npm run tsc` and fix any type errors introduced by changes to the generated code. New endpoints must be added to the handler map in `mock-api/msw/handlers.ts`; use `NotImplemented` unless the UI needs them. 1. Commit and push to a branch diff --git a/mock-api/msw/handlers.ts b/mock-api/msw/handlers.ts index 1b7ef7fb9..e4e3e2815 100644 --- a/mock-api/msw/handlers.ts +++ b/mock-api/msw/handlers.ts @@ -2123,9 +2123,6 @@ export const handlers = makeHandlers({ return 204 }, - // the generated handler type only allows status code returns for binary - // endpoints, but the dispatcher passes Response instances through untouched - // @ts-expect-error supportBundleHead({ path, cookies }) { requireFleetViewer(cookies) const bundle = lookupById(db.supportBundles, path.bundleId) @@ -3110,10 +3107,22 @@ export const handlers = makeHandlers({ probeDelete: NotImplemented, probeList: NotImplemented, probeView: NotImplemented, + problemAlertList: NotImplemented, + problemCausesList: NotImplemented, + problemConsequencesList: NotImplemented, + problemImpactList: NotImplemented, + problemList: NotImplemented, + problemSupportBundlesList: NotImplemented, + problemView: NotImplemented, + rackListUnadopted: NotImplemented, rackMembershipAbort: NotImplemented, rackMembershipAddSleds: NotImplemented, rackMembershipStatus: NotImplemented, rackView: NotImplemented, + siloCertificateCreate: NotImplemented, + siloCertificateDelete: NotImplemented, + siloCertificateList: NotImplemented, + siloCertificateView: NotImplemented, siloPolicyUpdate: NotImplemented, siloPolicyView: NotImplemented, siloUserList: NotImplemented, diff --git a/package-lock.json b/package-lock.json index 1ab36f1fb..c5b44255b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,7 +57,7 @@ }, "devDependencies": { "@commander-js/extra-typings": "^15.0.0", - "@oxide/openapi-gen-ts": "~0.16.0", + "@oxide/openapi-gen-ts": "~0.17.0", "@playwright/test": "^1.61.0", "@react-router/dev": "^8.3.1", "@types/md5": "^2.3.5", @@ -1334,9 +1334,9 @@ } }, "node_modules/@oxide/openapi-gen-ts": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@oxide/openapi-gen-ts/-/openapi-gen-ts-0.16.0.tgz", - "integrity": "sha512-ydlApz64Oly2R9UUZBp92SkwfjxBUdvOQ/CgSuWE8d1c3WUkIg7TszWMscEoR8TIViAk9/KCafTq0mULVg+B5w==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@oxide/openapi-gen-ts/-/openapi-gen-ts-0.17.0.tgz", + "integrity": "sha512-9a/S+sBueGL4BT4uiYo7V8ibBH0rVKV9pJR4fD9KIyx1VWpIGpmtWIx73Wn47lUUPwy/LLlDFG2hjRo4P5PWrQ==", "dev": true, "license": "MPL-2.0", "dependencies": { diff --git a/package.json b/package.json index ce223eb0f..7ebefde28 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ }, "devDependencies": { "@commander-js/extra-typings": "^15.0.0", - "@oxide/openapi-gen-ts": "~0.16.0", + "@oxide/openapi-gen-ts": "~0.17.0", "@playwright/test": "^1.61.0", "@react-router/dev": "^8.3.1", "@types/md5": "^2.3.5",