@kici-dev/orchestrator 0.19.0 → 0.20.1
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/dist/cli/commands/shared/container-agent-image-check.d.ts +67 -0
- package/dist/cli.js +882 -678
- package/dist/db/migrations/160_execution_jobs_workflow_name.d.ts +16 -0
- package/dist/db/types.d.ts +6 -0
- package/dist/pipeline/dispatch-matched-workflow.d.ts +6 -0
- package/dist/pipeline/invoke-gate.d.ts +1 -1
- package/dist/pipeline/route-or-dispatch-jobs.d.ts +3 -1
- package/dist/pipeline/test-pipeline.d.ts +2 -0
- package/dist/provenance/backfill-run.d.ts +2 -0
- package/dist/reporting/execution-tracker.d.ts +19 -2
- package/dist/reporting/run-aggregator.d.ts +8 -0
- package/dist/reporting/run-workflow-names.d.ts +30 -0
- package/dist/server.js +51597 -51397
- package/dist/standalone.js +8386 -8209
- package/dist/ws/job-status-forward-frame.d.ts +2 -0
- package/installer-image-digests.json +3 -3
- package/package.json +5 -5
- package/sbom.spdx.json +53 -53
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The container-scaler agent image check `kici-admin orchestrator upgrade`
|
|
3
|
+
* runs before it restarts the service.
|
|
4
|
+
*
|
|
5
|
+
* A container scaler spawns each agent from the image its label set names, not
|
|
6
|
+
* from the upgraded orchestrator. So an upgrade leaves container agents on the
|
|
7
|
+
* old release when a label set pins an older `kici-agent:<version>`, or names
|
|
8
|
+
* the moving `:latest` tag with the default `imagePullPolicy: IfNotPresent`: a
|
|
9
|
+
* host that already pulled `:latest` keeps that image. The check only warns:
|
|
10
|
+
* it never rewrites the operator's scaler config and never stops the upgrade.
|
|
11
|
+
*/
|
|
12
|
+
import { type ScalerConfig } from '../../../scaler/types.js';
|
|
13
|
+
/** Why a container label set keeps spawning an old agent after the upgrade. */
|
|
14
|
+
export declare enum AgentImageIssue {
|
|
15
|
+
/** `:latest` (or no tag) with `IfNotPresent`: the host keeps the image it pulled. */
|
|
16
|
+
MovingTag = "moving-tag",
|
|
17
|
+
/** A `kici-agent:<version>` older than the release the upgrade installs. */
|
|
18
|
+
OlderPin = "older-pin"
|
|
19
|
+
}
|
|
20
|
+
export interface AgentImageFinding {
|
|
21
|
+
issue: AgentImageIssue;
|
|
22
|
+
scaler: string;
|
|
23
|
+
labels: string[];
|
|
24
|
+
image: string;
|
|
25
|
+
message: string;
|
|
26
|
+
}
|
|
27
|
+
/** An image reference split into its repository, tag and digest. */
|
|
28
|
+
export interface ImageRefParts {
|
|
29
|
+
repository: string;
|
|
30
|
+
tag: string | null;
|
|
31
|
+
digest: string | null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Split `[registry/]path/name[:tag][@digest]`. A `:` before the last `/` is a
|
|
35
|
+
* registry port, not a tag.
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseImageRef(image: string): ImageRefParts;
|
|
38
|
+
export interface CheckAgentImagesArgs {
|
|
39
|
+
config: ScalerConfig;
|
|
40
|
+
/** The release the upgrade installs, or null when the caller does not know it. */
|
|
41
|
+
targetVersion: string | null;
|
|
42
|
+
/** The main scaler config file, for the remedy text. */
|
|
43
|
+
scalerConfigPath: string;
|
|
44
|
+
/** The `KICI_SCALER_CONFIG_DIR` directory, when one is set. */
|
|
45
|
+
scalerConfigDir?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Every container-scaler label set whose agent image an upgrade to
|
|
49
|
+
* `targetVersion` leaves unchanged. An empty result means each agent image is
|
|
50
|
+
* pinned to the target (or newer), pulled on every spawn, or not a KiCI agent.
|
|
51
|
+
*/
|
|
52
|
+
export declare function checkContainerAgentImages(args: CheckAgentImagesArgs): AgentImageFinding[];
|
|
53
|
+
export interface WarnAgentImagesArgs {
|
|
54
|
+
envFilePath: string;
|
|
55
|
+
workingDirectory: string;
|
|
56
|
+
/** The release the upgrade installs, or null when the caller does not know it. */
|
|
57
|
+
targetVersion: string | null;
|
|
58
|
+
warn: (line: string) => void;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Print one warning per container label set whose agent image the upgrade
|
|
62
|
+
* leaves unchanged. Never throws, and stays silent when the env file or the
|
|
63
|
+
* scaler config cannot be read: the bare-metal `binaryPath` check, which runs
|
|
64
|
+
* first on the same files, already reports that.
|
|
65
|
+
*/
|
|
66
|
+
export declare function warnAboutContainerAgentImages(args: WarnAgentImagesArgs): Promise<void>;
|
|
67
|
+
//# sourceMappingURL=container-agent-image-check.d.ts.map
|