hammerkit 2.1.0 → 2.2.0-next.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/build.schema.json +126 -28
- package/dist/cli.js +5 -0
- package/dist/dashboard/assets/graph-canvas-D6GMgkoe.js +8 -0
- package/dist/dashboard/assets/index-BNq9j5Jo.js +23 -0
- package/dist/dashboard/assets/index-DP3_hKOe.css +2 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/docker/item-network.js +6 -5
- package/dist/docker/remove-orphaned-containers.js +5 -4
- package/dist/environment/replace-env-variables.js +8 -5
- package/dist/environment/run-source-envs.js +2 -1
- package/dist/executer/archive-task-entry.js +1 -1
- package/dist/executer/check-readiness.js +8 -4
- package/dist/executer/docker-healthcheck.js +73 -0
- package/dist/executer/docker-service.js +21 -15
- package/dist/executer/event-cache.js +5 -1
- package/dist/executer/runner-commands.js +36 -0
- package/dist/file/get-file-context.js +4 -7
- package/dist/harness/connect.js +12 -8
- package/dist/harness/reconnect.js +141 -0
- package/dist/harness/sandbox-client.js +241 -33
- package/dist/harness/service-tools.js +11 -2
- package/dist/kubernetes/ensure-kubernetes-deployment-exists.js +62 -14
- package/dist/kubernetes/ensure-persistent-data.js +1 -1
- package/dist/kubernetes/follow-pod-logs.js +8 -5
- package/dist/kubernetes/kept-claims.js +38 -14
- package/dist/kubernetes/sandbox-runner.js +526 -156
- package/dist/kubernetes/store-kubernetes-data.js +18 -3
- package/dist/kubernetes/sync-changes.js +463 -0
- package/dist/kubernetes/volumes.js +23 -1
- package/dist/network/healthcheck-request.js +38 -0
- package/dist/optimizer/get-work-cache-stats.js +7 -0
- package/dist/optimizer/work-task-cache-description.js +5 -3
- package/dist/planner/image-build.js +5 -0
- package/dist/planner/service-definition.js +2 -1
- package/dist/planner/utils/append-work-service.js +12 -4
- package/dist/planner/utils/dependency-outputs.js +7 -6
- package/dist/planner/validate.js +41 -0
- package/dist/planner/work-healthcheck.js +23 -2
- package/dist/planner/work-item-status.js +12 -2
- package/dist/planner/work-runtime-aggregate.js +1 -0
- package/dist/planner/work-runtime-docker.js +33 -6
- package/dist/planner/work-runtime-kubernetes.js +313 -70
- package/dist/planner/work-runtime-local.js +8 -4
- package/dist/planner/work-secret.js +33 -11
- package/dist/planner/work-service-id.js +30 -6
- package/dist/planner/work-service.js +2 -2
- package/dist/program.js +19 -1
- package/dist/remote/annotations.js +8 -2
- package/dist/remote/bundle.js +6 -8
- package/dist/remote/device-login.js +4 -1
- package/dist/remote/remote-commands.js +16 -7
- package/dist/remote/remote-status.js +1 -1
- package/dist/remote/remote-work-commands.js +220 -68
- package/dist/remote/server-client.js +38 -40
- package/dist/schema/build-file-base-task-schema.js +16 -1
- package/dist/schema/build-file-image-build-schema.js +5 -8
- package/dist/schema/build-file-service-container-healthcheck.js +25 -7
- package/dist/schema/reference-parser.js +108 -43
- package/dist/schema/work-scope-parser.js +8 -0
- package/dist/secrets/prefetch-secrets.js +20 -1
- package/dist/server/artifacts-api.js +56 -0
- package/dist/server/borrowed-quota.js +216 -0
- package/dist/server/capacity.js +18 -6
- package/dist/server/definitions-api.js +62 -8
- package/dist/server/executor.js +117 -30
- package/dist/server/http.js +4 -1
- package/dist/server/keep-artifacts.js +230 -0
- package/dist/server/kubernetes-backend.js +292 -79
- package/dist/server/kubernetes-sandbox-storage.js +86 -24
- package/dist/server/overview.js +73 -9
- package/dist/server/paging.js +167 -0
- package/dist/server/plan.js +16 -1
- package/dist/server/run-access.js +24 -0
- package/dist/server/run-artifacts.js +171 -0
- package/dist/server/run-logs.js +25 -1
- package/dist/server/run-request.js +11 -0
- package/dist/server/run-source-environment.js +1 -1
- package/dist/server/run-worker.js +267 -33
- package/dist/server/runs.js +531 -105
- package/dist/server/sandbox-files-api.js +27 -12
- package/dist/server/sandbox-files.js +12 -10
- package/dist/server/sandbox-follow.js +54 -0
- package/dist/server/sandbox-pod.js +1 -1
- package/dist/server/sandbox-storage.js +38 -1
- package/dist/server/sandbox-sync.js +392 -0
- package/dist/server/sandboxes-api.js +116 -19
- package/dist/server/sandboxes.js +38 -3
- package/dist/server/server-config.js +73 -2
- package/dist/server/server.js +169 -38
- package/dist/server/task-order.js +56 -0
- package/dist/utils/project-path.js +20 -0
- package/dist/utils/tar-files.js +52 -0
- package/dist/utils/tar.js +37 -1
- package/package.json +1 -1
- package/dist/dashboard/assets/graph-canvas-DtJSpova.js +0 -8
- package/dist/dashboard/assets/index-BndChMep.css +0 -2
- package/dist/dashboard/assets/index-DRSwIRXd.js +0 -17
package/build.schema.json
CHANGED
|
@@ -56,6 +56,31 @@
|
|
|
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
|
+
},
|
|
59
84
|
"envs": {
|
|
60
85
|
"$ref": "#/definitions/hammerkit/properties/envs",
|
|
61
86
|
"description": "Environment values for the current build task\nhttps://hammerkit.dev/docs/build-file/environment-variables"
|
|
@@ -376,23 +401,13 @@
|
|
|
376
401
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/description"
|
|
377
402
|
},
|
|
378
403
|
"extend": {
|
|
379
|
-
"
|
|
404
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/extend"
|
|
405
|
+
},
|
|
406
|
+
"abstract": {
|
|
407
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/abstract"
|
|
380
408
|
},
|
|
381
409
|
"reset": {
|
|
382
|
-
"
|
|
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
|
-
}
|
|
410
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/reset"
|
|
396
411
|
},
|
|
397
412
|
"envs": {
|
|
398
413
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/envs"
|
|
@@ -544,10 +559,13 @@
|
|
|
544
559
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/description"
|
|
545
560
|
},
|
|
546
561
|
"extend": {
|
|
547
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/
|
|
562
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/extend"
|
|
563
|
+
},
|
|
564
|
+
"abstract": {
|
|
565
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/abstract"
|
|
548
566
|
},
|
|
549
567
|
"reset": {
|
|
550
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/
|
|
568
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/reset"
|
|
551
569
|
},
|
|
552
570
|
"envs": {
|
|
553
571
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/envs"
|
|
@@ -634,8 +652,11 @@
|
|
|
634
652
|
"extend": {
|
|
635
653
|
"type": "string"
|
|
636
654
|
},
|
|
655
|
+
"abstract": {
|
|
656
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/abstract"
|
|
657
|
+
},
|
|
637
658
|
"reset": {
|
|
638
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/
|
|
659
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/reset"
|
|
639
660
|
},
|
|
640
661
|
"envs": {
|
|
641
662
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/envs"
|
|
@@ -776,19 +797,96 @@
|
|
|
776
797
|
"type": "boolean"
|
|
777
798
|
},
|
|
778
799
|
"healthcheck": {
|
|
779
|
-
"
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
"
|
|
800
|
+
"anyOf": [
|
|
801
|
+
{
|
|
802
|
+
"type": "object",
|
|
803
|
+
"properties": {
|
|
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
|
|
783
815
|
},
|
|
784
|
-
|
|
785
|
-
"
|
|
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
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"type": "object",
|
|
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
|
|
786
887
|
}
|
|
787
|
-
},
|
|
788
|
-
"required": [
|
|
789
|
-
"cmd"
|
|
790
888
|
],
|
|
791
|
-
"
|
|
889
|
+
"description": "exactly one of cmd, http or tcp, and how long it may take to pass"
|
|
792
890
|
},
|
|
793
891
|
"init": {
|
|
794
892
|
"type": "string",
|
package/dist/cli.js
CHANGED
|
@@ -54,6 +54,9 @@ 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);
|
|
57
60
|
await this.prepareSecrets(true);
|
|
58
61
|
}
|
|
59
62
|
(0, check_for_loop_1.checkForLoop)(workTree);
|
|
@@ -170,6 +173,8 @@ class Cli {
|
|
|
170
173
|
// Ordered execution plan with predicted cache decisions, reusing the explain
|
|
171
174
|
// engine — executes nothing, starts nothing, performs no cache push/pull.
|
|
172
175
|
async dryRun(options) {
|
|
176
|
+
// fails where the run would
|
|
177
|
+
(0, prefetch_secrets_1.requireReadableSecrets)(this.workTree);
|
|
173
178
|
await this.prepareSecrets();
|
|
174
179
|
return (0, dry_run_1.planDryRun)(this.workTree, options?.cacheDefault ?? 'checksum', this.environment);
|
|
175
180
|
}
|