hammerkit 2.1.0-next.8 → 2.1.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/build.schema.json +28 -126
- package/dist/cli.js +0 -5
- package/dist/dashboard/assets/graph-canvas-DtJSpova.js +8 -0
- package/dist/dashboard/assets/index-BndChMep.css +2 -0
- package/dist/dashboard/assets/{index-CE5PSB3y.js → index-DRSwIRXd.js} +9 -15
- package/dist/dashboard/index.html +2 -2
- package/dist/docker/item-network.js +5 -6
- package/dist/docker/remove-orphaned-containers.js +4 -5
- package/dist/environment/replace-env-variables.js +5 -8
- package/dist/environment/run-source-envs.js +1 -2
- package/dist/executer/check-readiness.js +4 -8
- package/dist/executer/deadline.js +63 -10
- package/dist/executer/docker-service.js +15 -21
- package/dist/executer/execute-work-task.js +15 -3
- package/dist/harness/sandbox-client.js +1 -0
- package/dist/harness/service-tools.js +25 -1
- package/dist/kubernetes/cluster-state.js +48 -14
- package/dist/kubernetes/ensure-kubernetes-deployment-exists.js +14 -62
- package/dist/kubernetes/ensure-persistent-data.js +14 -3
- package/dist/kubernetes/kept-claims.js +9 -12
- package/dist/kubernetes/resources.js +5 -1
- package/dist/optimizer/work-task-cache-description.js +3 -5
- package/dist/planner/image-build.js +0 -5
- package/dist/planner/service-definition.js +1 -2
- package/dist/planner/utils/append-work-service.js +4 -12
- package/dist/planner/utils/dependency-outputs.js +6 -7
- package/dist/planner/validate.js +0 -41
- package/dist/planner/work-healthcheck.js +2 -23
- package/dist/planner/work-runtime-docker.js +1 -24
- package/dist/planner/work-runtime-kubernetes.js +16 -37
- package/dist/planner/work-secret.js +11 -33
- package/dist/planner/work-service-id.js +6 -30
- package/dist/planner/work-service.js +2 -2
- package/dist/program.js +1 -19
- package/dist/remote/annotations.js +31 -11
- package/dist/remote/collect-bundle.js +3 -2
- package/dist/remote/remote-status.js +1 -1
- package/dist/remote/remote-work-commands.js +50 -7
- package/dist/schema/build-file-base-task-schema.js +1 -16
- package/dist/schema/build-file-image-build-schema.js +8 -5
- package/dist/schema/build-file-service-container-healthcheck.js +7 -25
- package/dist/schema/reference-parser.js +43 -108
- package/dist/schema/work-scope-parser.js +0 -8
- package/dist/secrets/prefetch-secrets.js +1 -20
- package/dist/server/capacity.js +6 -18
- package/dist/server/endpoints.js +52 -32
- package/dist/server/kubernetes-backend.js +28 -114
- package/dist/server/kubernetes-sandbox-storage.js +2 -3
- package/dist/server/overview.js +1 -7
- package/dist/server/plan.js +0 -8
- package/dist/server/public-paths.js +52 -0
- package/dist/server/run-request.js +52 -1
- package/dist/server/run-retry.js +6 -0
- package/dist/server/run-source-environment.js +1 -1
- package/dist/server/runs.js +6 -4
- package/dist/server/sandbox-files-api.js +12 -27
- package/dist/server/sandbox-files.js +2 -3
- package/dist/server/sandbox-pod.js +1 -1
- package/dist/server/sandboxes-api.js +14 -65
- package/dist/server/sandboxes.js +3 -19
- package/dist/server/server-config.js +2 -59
- package/dist/server/server.js +20 -8
- package/dist/server/service-runs.js +41 -8
- package/package.json +1 -1
- package/dist/dashboard/assets/graph-canvas-BFnEN5i0.js +0 -8
- package/dist/dashboard/assets/index-Dt3ITvRO.css +0 -2
- package/dist/executer/docker-healthcheck.js +0 -73
- package/dist/network/healthcheck-request.js +0 -38
- package/dist/server/borrowed-quota.js +0 -216
package/build.schema.json
CHANGED
|
@@ -56,31 +56,6 @@
|
|
|
56
56
|
"description": {
|
|
57
57
|
"type": "string"
|
|
58
58
|
},
|
|
59
|
-
"extend": {
|
|
60
|
-
"type": "string"
|
|
61
|
-
},
|
|
62
|
-
"abstract": {
|
|
63
|
-
"type": "boolean"
|
|
64
|
-
},
|
|
65
|
-
"reset": {
|
|
66
|
-
"type": "array",
|
|
67
|
-
"items": {
|
|
68
|
-
"type": "string",
|
|
69
|
-
"enum": [
|
|
70
|
-
"deps",
|
|
71
|
-
"needs",
|
|
72
|
-
"src",
|
|
73
|
-
"generates",
|
|
74
|
-
"cmds",
|
|
75
|
-
"mounts",
|
|
76
|
-
"envs",
|
|
77
|
-
"labels",
|
|
78
|
-
"build",
|
|
79
|
-
"secrets",
|
|
80
|
-
"capAdd"
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
59
|
"envs": {
|
|
85
60
|
"$ref": "#/definitions/hammerkit/properties/envs",
|
|
86
61
|
"description": "Environment values for the current build task\nhttps://hammerkit.dev/docs/build-file/environment-variables"
|
|
@@ -401,13 +376,23 @@
|
|
|
401
376
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/description"
|
|
402
377
|
},
|
|
403
378
|
"extend": {
|
|
404
|
-
"
|
|
405
|
-
},
|
|
406
|
-
"abstract": {
|
|
407
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/abstract"
|
|
379
|
+
"type": "string"
|
|
408
380
|
},
|
|
409
381
|
"reset": {
|
|
410
|
-
"
|
|
382
|
+
"type": "array",
|
|
383
|
+
"items": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"enum": [
|
|
386
|
+
"deps",
|
|
387
|
+
"needs",
|
|
388
|
+
"src",
|
|
389
|
+
"generates",
|
|
390
|
+
"cmds",
|
|
391
|
+
"mounts",
|
|
392
|
+
"envs",
|
|
393
|
+
"labels"
|
|
394
|
+
]
|
|
395
|
+
}
|
|
411
396
|
},
|
|
412
397
|
"envs": {
|
|
413
398
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/envs"
|
|
@@ -559,13 +544,10 @@
|
|
|
559
544
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/description"
|
|
560
545
|
},
|
|
561
546
|
"extend": {
|
|
562
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/
|
|
563
|
-
},
|
|
564
|
-
"abstract": {
|
|
565
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/abstract"
|
|
547
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/1/properties/extend"
|
|
566
548
|
},
|
|
567
549
|
"reset": {
|
|
568
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/
|
|
550
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/1/properties/reset"
|
|
569
551
|
},
|
|
570
552
|
"envs": {
|
|
571
553
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/envs"
|
|
@@ -652,11 +634,8 @@
|
|
|
652
634
|
"extend": {
|
|
653
635
|
"type": "string"
|
|
654
636
|
},
|
|
655
|
-
"abstract": {
|
|
656
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/abstract"
|
|
657
|
-
},
|
|
658
637
|
"reset": {
|
|
659
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/
|
|
638
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/1/properties/reset"
|
|
660
639
|
},
|
|
661
640
|
"envs": {
|
|
662
641
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/envs"
|
|
@@ -797,96 +776,19 @@
|
|
|
797
776
|
"type": "boolean"
|
|
798
777
|
},
|
|
799
778
|
"healthcheck": {
|
|
800
|
-
"
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
"
|
|
804
|
-
"cmd": {
|
|
805
|
-
"type": "string"
|
|
806
|
-
},
|
|
807
|
-
"timeout": {
|
|
808
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/timeout"
|
|
809
|
-
}
|
|
810
|
-
},
|
|
811
|
-
"required": [
|
|
812
|
-
"cmd"
|
|
813
|
-
],
|
|
814
|
-
"additionalProperties": false
|
|
815
|
-
},
|
|
816
|
-
{
|
|
817
|
-
"type": "object",
|
|
818
|
-
"properties": {
|
|
819
|
-
"http": {
|
|
820
|
-
"type": "object",
|
|
821
|
-
"properties": {
|
|
822
|
-
"port": {
|
|
823
|
-
"type": "integer",
|
|
824
|
-
"minimum": 1,
|
|
825
|
-
"maximum": 65535
|
|
826
|
-
},
|
|
827
|
-
"path": {
|
|
828
|
-
"type": "string",
|
|
829
|
-
"pattern": "^\\/"
|
|
830
|
-
},
|
|
831
|
-
"scheme": {
|
|
832
|
-
"type": "string",
|
|
833
|
-
"enum": [
|
|
834
|
-
"http",
|
|
835
|
-
"https"
|
|
836
|
-
]
|
|
837
|
-
},
|
|
838
|
-
"status": {
|
|
839
|
-
"type": "array",
|
|
840
|
-
"items": {
|
|
841
|
-
"type": "integer",
|
|
842
|
-
"minimum": 100,
|
|
843
|
-
"maximum": 599
|
|
844
|
-
},
|
|
845
|
-
"minItems": 1
|
|
846
|
-
}
|
|
847
|
-
},
|
|
848
|
-
"required": [
|
|
849
|
-
"port"
|
|
850
|
-
],
|
|
851
|
-
"additionalProperties": false,
|
|
852
|
-
"description": "GET <scheme>://<service>:<port><path>, healthy on one of status (default any 2xx or 3xx)"
|
|
853
|
-
},
|
|
854
|
-
"timeout": {
|
|
855
|
-
"$ref": "#/definitions/hammerkit/properties/services/additionalProperties/anyOf/0/properties/healthcheck/anyOf/0/properties/timeout"
|
|
856
|
-
}
|
|
857
|
-
},
|
|
858
|
-
"required": [
|
|
859
|
-
"http"
|
|
860
|
-
],
|
|
861
|
-
"additionalProperties": false
|
|
779
|
+
"type": "object",
|
|
780
|
+
"properties": {
|
|
781
|
+
"cmd": {
|
|
782
|
+
"type": "string"
|
|
862
783
|
},
|
|
863
|
-
{
|
|
864
|
-
"
|
|
865
|
-
"properties": {
|
|
866
|
-
"tcp": {
|
|
867
|
-
"type": "object",
|
|
868
|
-
"properties": {
|
|
869
|
-
"port": {
|
|
870
|
-
"$ref": "#/definitions/hammerkit/properties/services/additionalProperties/anyOf/0/properties/healthcheck/anyOf/1/properties/http/properties/port"
|
|
871
|
-
}
|
|
872
|
-
},
|
|
873
|
-
"required": [
|
|
874
|
-
"port"
|
|
875
|
-
],
|
|
876
|
-
"additionalProperties": false,
|
|
877
|
-
"description": "healthy once <port> takes a connection"
|
|
878
|
-
},
|
|
879
|
-
"timeout": {
|
|
880
|
-
"$ref": "#/definitions/hammerkit/properties/services/additionalProperties/anyOf/0/properties/healthcheck/anyOf/0/properties/timeout"
|
|
881
|
-
}
|
|
882
|
-
},
|
|
883
|
-
"required": [
|
|
884
|
-
"tcp"
|
|
885
|
-
],
|
|
886
|
-
"additionalProperties": false
|
|
784
|
+
"timeout": {
|
|
785
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/timeout"
|
|
887
786
|
}
|
|
787
|
+
},
|
|
788
|
+
"required": [
|
|
789
|
+
"cmd"
|
|
888
790
|
],
|
|
889
|
-
"
|
|
791
|
+
"additionalProperties": false
|
|
890
792
|
},
|
|
891
793
|
"init": {
|
|
892
794
|
"type": "string",
|
package/dist/cli.js
CHANGED
|
@@ -54,9 +54,6 @@ class Cli {
|
|
|
54
54
|
start: async () => {
|
|
55
55
|
(0, work_network_1.applyNetworkCeiling)(workTree, type === 'down' ? null : options?.network ?? null);
|
|
56
56
|
if (type !== 'down') {
|
|
57
|
-
// every secret of what runs, not only those of task ids: a secret this machine can't
|
|
58
|
-
// read fails the run before any of it starts
|
|
59
|
-
(0, prefetch_secrets_1.requireReadableSecrets)(workTree);
|
|
60
57
|
await this.prepareSecrets(true);
|
|
61
58
|
}
|
|
62
59
|
(0, check_for_loop_1.checkForLoop)(workTree);
|
|
@@ -173,8 +170,6 @@ class Cli {
|
|
|
173
170
|
// Ordered execution plan with predicted cache decisions, reusing the explain
|
|
174
171
|
// engine — executes nothing, starts nothing, performs no cache push/pull.
|
|
175
172
|
async dryRun(options) {
|
|
176
|
-
// fails where the run would
|
|
177
|
-
(0, prefetch_secrets_1.requireReadableSecrets)(this.workTree);
|
|
178
173
|
await this.prepareSecrets();
|
|
179
174
|
return (0, dry_run_1.planDryRun)(this.workTree, options?.cacheDefault ?? 'checksum', this.environment);
|
|
180
175
|
}
|