@serve.zone/interfaces 17.2.0 → 17.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +14 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/migration.d.ts +20 -1
- package/dist_ts/data/service.d.ts +7 -0
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/migration.ts +21 -1
- package/ts/data/service.ts +8 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-07-23 - 17.3.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add service image retention count option (data-service)
|
|
8
|
+
- Adds optional imageRetentionCount to service data definitions for configuring pushed image version retention.
|
|
9
|
+
- Documents the platform default retention count of 3 and protection for active desired or immutable deployments.
|
|
10
|
+
|
|
11
|
+
## 2026-07-22 - 17.2.1
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- persist exact original placement and target confirmation in service migration contracts
|
|
16
|
+
|
|
3
17
|
## 2026-07-22 - 17.2.0
|
|
4
18
|
|
|
5
19
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '17.
|
|
6
|
+
version: '17.3.0',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IServicePlacement } from './service.js';
|
|
1
2
|
export type TServiceMigrationStatus = 'running' | 'completed' | 'failed';
|
|
2
3
|
export type TServiceMigrationStepStatus = 'pending' | 'running' | 'completed' | 'failed' | 'skipped';
|
|
3
4
|
export type TServiceMigrationStepKey = 'validate' | 'stop-source' | 'snapshot' | 'restore' | 'deploy-target' | 'verify';
|
|
@@ -13,7 +14,9 @@ export interface IServiceMigrationStep {
|
|
|
13
14
|
* A node-to-node service migration orchestrated by Cloudly:
|
|
14
15
|
* gracefully stop everywhere -> snapshot data on the source ->
|
|
15
16
|
* restore on the target -> deploy pinned to the target -> verify.
|
|
16
|
-
*
|
|
17
|
+
* Until the target deployment is confirmed, failure rollback restores the
|
|
18
|
+
* exact original placement snapshot. Target confirmation is the durable
|
|
19
|
+
* commit point; after it, rollback must not reactivate the source placement.
|
|
17
20
|
*/
|
|
18
21
|
export interface IServiceMigration {
|
|
19
22
|
id: string;
|
|
@@ -23,6 +26,22 @@ export interface IServiceMigration {
|
|
|
23
26
|
targetNodeName: string;
|
|
24
27
|
/** Backup archive id used for the data move (migration-<id>). */
|
|
25
28
|
backupId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Exact placement captured before the migration mutates desired state.
|
|
31
|
+
* A non-null value is restored verbatim during pre-commit rollback. `null`
|
|
32
|
+
* means the service originally had no placement property, so rollback must
|
|
33
|
+
* remove that property. `undefined` is reserved for legacy records whose
|
|
34
|
+
* original placement is unknown and must not be interpreted as absent.
|
|
35
|
+
*/
|
|
36
|
+
originalPlacement?: IServicePlacement | null;
|
|
37
|
+
/**
|
|
38
|
+
* Timestamp at which the target deployment was positively verified and the
|
|
39
|
+
* migration crossed its durable commit point. While `null` or absent, a
|
|
40
|
+
* failure is pre-commit and restores `originalPlacement`; once set, failure
|
|
41
|
+
* handling must keep the target authoritative and must not restore source
|
|
42
|
+
* placement.
|
|
43
|
+
*/
|
|
44
|
+
targetDeploymentConfirmedAt?: number | null;
|
|
26
45
|
status: TServiceMigrationStatus;
|
|
27
46
|
steps: IServiceMigrationStep[];
|
|
28
47
|
startedAt: number;
|
|
@@ -148,6 +148,13 @@ export interface IService {
|
|
|
148
148
|
* For example, 3 for cores3 or coremongo
|
|
149
149
|
*/
|
|
150
150
|
maxReplicas?: number;
|
|
151
|
+
/**
|
|
152
|
+
* How many pushed image versions to keep for this service. Older
|
|
153
|
+
* versions beyond this count are pruned from the registry, always
|
|
154
|
+
* protecting versions referenced by the current desired state or an
|
|
155
|
+
* active immutable deployment. Absent means the platform default of 3.
|
|
156
|
+
*/
|
|
157
|
+
imageRetentionCount?: number;
|
|
151
158
|
/**
|
|
152
159
|
* Whether to enforce anti-affinity rules
|
|
153
160
|
* When true, tries to spread deployments across different BareMetal servers
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/migration.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { IServicePlacement } from './service.js';
|
|
2
|
+
|
|
1
3
|
export type TServiceMigrationStatus = 'running' | 'completed' | 'failed';
|
|
2
4
|
|
|
3
5
|
export type TServiceMigrationStepStatus = 'pending' | 'running' | 'completed' | 'failed' | 'skipped';
|
|
@@ -23,7 +25,9 @@ export interface IServiceMigrationStep {
|
|
|
23
25
|
* A node-to-node service migration orchestrated by Cloudly:
|
|
24
26
|
* gracefully stop everywhere -> snapshot data on the source ->
|
|
25
27
|
* restore on the target -> deploy pinned to the target -> verify.
|
|
26
|
-
*
|
|
28
|
+
* Until the target deployment is confirmed, failure rollback restores the
|
|
29
|
+
* exact original placement snapshot. Target confirmation is the durable
|
|
30
|
+
* commit point; after it, rollback must not reactivate the source placement.
|
|
27
31
|
*/
|
|
28
32
|
export interface IServiceMigration {
|
|
29
33
|
id: string;
|
|
@@ -33,6 +37,22 @@ export interface IServiceMigration {
|
|
|
33
37
|
targetNodeName: string;
|
|
34
38
|
/** Backup archive id used for the data move (migration-<id>). */
|
|
35
39
|
backupId?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Exact placement captured before the migration mutates desired state.
|
|
42
|
+
* A non-null value is restored verbatim during pre-commit rollback. `null`
|
|
43
|
+
* means the service originally had no placement property, so rollback must
|
|
44
|
+
* remove that property. `undefined` is reserved for legacy records whose
|
|
45
|
+
* original placement is unknown and must not be interpreted as absent.
|
|
46
|
+
*/
|
|
47
|
+
originalPlacement?: IServicePlacement | null;
|
|
48
|
+
/**
|
|
49
|
+
* Timestamp at which the target deployment was positively verified and the
|
|
50
|
+
* migration crossed its durable commit point. While `null` or absent, a
|
|
51
|
+
* failure is pre-commit and restores `originalPlacement`; once set, failure
|
|
52
|
+
* handling must keep the target authoritative and must not restore source
|
|
53
|
+
* placement.
|
|
54
|
+
*/
|
|
55
|
+
targetDeploymentConfirmedAt?: number | null;
|
|
36
56
|
status: TServiceMigrationStatus;
|
|
37
57
|
steps: IServiceMigrationStep[];
|
|
38
58
|
startedAt: number;
|
package/ts/data/service.ts
CHANGED
|
@@ -291,6 +291,14 @@ export interface IService {
|
|
|
291
291
|
* For example, 3 for cores3 or coremongo
|
|
292
292
|
*/
|
|
293
293
|
maxReplicas?: number;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* How many pushed image versions to keep for this service. Older
|
|
297
|
+
* versions beyond this count are pruned from the registry, always
|
|
298
|
+
* protecting versions referenced by the current desired state or an
|
|
299
|
+
* active immutable deployment. Absent means the platform default of 3.
|
|
300
|
+
*/
|
|
301
|
+
imageRetentionCount?: number;
|
|
294
302
|
|
|
295
303
|
/**
|
|
296
304
|
* Whether to enforce anti-affinity rules
|