Skip to content

Commit 5be92f5

Browse files
committed
Update tenants naming to use latest API types in stable/v1.26
1 parent 99a78b5 commit 5be92f5

File tree

4 files changed

+49
-9
lines changed

4 files changed

+49
-9
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
env:
1010
WEAVIATE_124: 1.24.20
1111
WEAVIATE_125: 1.25.7
12-
WEAVIATE_126: preview--30d0b3d
12+
WEAVIATE_126: preview--8758c8d
1313

1414
jobs:
1515
checks:

src/collections/deserialize/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,19 @@ export class Deserialize {
305305
private static activityStatusGRPC(status: TenantActivityStatus): Tenant['activityStatus'] {
306306
switch (status) {
307307
case TenantActivityStatus.TENANT_ACTIVITY_STATUS_COLD:
308+
case TenantActivityStatus.TENANT_ACTIVITY_STATUS_INACTIVE:
308309
return 'INACTIVE';
309310
case TenantActivityStatus.TENANT_ACTIVITY_STATUS_HOT:
311+
case TenantActivityStatus.TENANT_ACTIVITY_STATUS_ACTIVE:
310312
return 'ACTIVE';
311313
case TenantActivityStatus.TENANT_ACTIVITY_STATUS_FROZEN:
314+
case TenantActivityStatus.TENANT_ACTIVITY_STATUS_OFFLOADED:
312315
return 'OFFLOADED';
313316
case TenantActivityStatus.TENANT_ACTIVITY_STATUS_FREEZING:
317+
case TenantActivityStatus.TENANT_ACTIVITY_STATUS_OFFLOADING:
314318
return 'OFFLOADING';
315319
case TenantActivityStatus.TENANT_ACTIVITY_STATUS_UNFREEZING:
320+
case TenantActivityStatus.TENANT_ACTIVITY_STATUS_ONLOADING:
316321
return 'ONLOADING';
317322
default:
318323
throw new Error(`Unsupported tenant activity status: ${status}`);
@@ -334,7 +339,7 @@ export class Deserialize {
334339
case undefined:
335340
return 'ACTIVE';
336341
default:
337-
throw new Error(`Unsupported tenant activity status: ${status}`);
342+
return status;
338343
}
339344
}
340345

src/openapi/schema.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,10 +1289,20 @@ export interface definitions {
12891289
/** @description name of the tenant */
12901290
name?: string;
12911291
/**
1292-
* @description activity status of the tenant's shard. Optional for creating tenant (implicit `HOT`) and required for updating tenant. For creation, allowed values are `HOT` - tenant is fully active and `COLD` - tenant is inactive; no actions can be performed on tenant, tenant's files are stored locally. For updating, `HOT`, `COLD` and also `FROZEN` - as COLD, but files are stored on cloud storage. The following values are read-only and are set by the server for internal use: `FREEZING` - tenant is transitioning from HOT/COLD to FROZEN, `UNFREEZING` - tenant is transitioning from FROZEN to HOT/COLD
1292+
* @description activity status of the tenant's shard. Optional for creating tenant (implicit `ACTIVE`) and required for updating tenant. For creation, allowed values are `ACTIVE` - tenant is fully active and `INACTIVE` - tenant is inactive; no actions can be performed on tenant, tenant's files are stored locally. For updating, `ACTIVE`, `INACTIVE` and also `OFFLOADED` - as INACTIVE, but files are stored on cloud storage. The following values are read-only and are set by the server for internal use: `OFFLOADING` - tenant is transitioning from ACTIVE/INACTIVE to OFFLOADED, `ONLOADING` - tenant is transitioning from OFFLOADED to ACTIVE/INACTIVE. We still accept deprecated names `HOT` (now `ACTIVE`), `COLD` (now `INACTIVE`), `FROZEN` (now `OFFLOADED`), `FREEZING` (now `OFFLOADING`), `UNFREEZING` (now `ONLOADING`).
12931293
* @enum {string}
12941294
*/
1295-
activityStatus?: 'HOT' | 'COLD' | 'FROZEN' | 'FREEZING' | 'UNFREEZING';
1295+
activityStatus?:
1296+
| 'ACTIVE'
1297+
| 'INACTIVE'
1298+
| 'OFFLOADED'
1299+
| 'OFFLOADING'
1300+
| 'ONLOADING'
1301+
| 'HOT'
1302+
| 'COLD'
1303+
| 'FROZEN'
1304+
| 'FREEZING'
1305+
| 'UNFREEZING';
12961306
};
12971307
}
12981308

src/proto/v1/tenants.ts

Lines changed: 30 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)