From 2ce480051ed62b864ccd2f6a3d5536e9c0cc6d33 Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Fri, 22 Nov 2024 10:50:04 -0800 Subject: [PATCH 01/14] add json-schema spec for the workflow --- json-schema/workflow.schema.json | 107 +++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 json-schema/workflow.schema.json diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json new file mode 100644 index 00000000..15e3fcec --- /dev/null +++ b/json-schema/workflow.schema.json @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Workflow", + "type": "object", + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/definitions/Task" + }, + "description": "Worfklow tasks." + }, + "name": { + "type": "string", + "description": "The name of the workflow." + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Optional parameters for the workflow." + }, + "schedule": { + "type": "string", + "description": "Optional schedule in cron format." + }, + "timezone": { + "type": "string", + "description": "Timezone for the schedule." + } + }, + "required": [ + "tasks", + "name" + ], + "definitions": { + "Task": { + "type": "object", + "properties": { + "input_uri": { + "type": "string", + "description": "The URI of the input file." + }, + "runtime_environment_name": { + "type": "string", + "description": "Name of the runtime environment." + }, + "runtime_environment_parameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Parameters for the runtime environment." + }, + "output_formats": { + "type": "array", + "items": { + "type": "string" + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Task-specific parameters." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags for categorizing the job." + }, + "name": { + "type": "string", + "description": "Name of the job." + }, + "compute_type": { + "type": "string", + "description": "Type of compute resource to use." + }, + "package_input_folder": { + "type": "boolean", + "description": "Whether to package the input folder." + }, + "depends_on": { + "type": "array", + "items": { + "type": "string" + }, + "description": "DAG node IDs of tasks this task depends on." + }, + "node_id": { + "type": "string", + "description": "DAG node ID of this task." + } + }, + "required": [ + "input_uri", + "name", + "node_id" + ] + } + } +} \ No newline at end of file From 5d9bbab623ad633b71499b002214f7723a36943d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 18:51:27 +0000 Subject: [PATCH 02/14] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- json-schema/workflow.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index 15e3fcec..ff1911f0 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -104,4 +104,4 @@ ] } } -} \ No newline at end of file +} From 2733ec23e3c7df22aa160fcaafc8a96f944b0be9 Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Fri, 22 Nov 2024 19:07:28 -0800 Subject: [PATCH 03/14] add version field at the schema top level --- json-schema/workflow.schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index ff1911f0..6877f646 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "version": "0.0.1", "title": "Workflow", "type": "object", "properties": { From b1343c9f45140a78082bded9c9ea3b89e361b5dc Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Fri, 22 Nov 2024 21:13:51 -0800 Subject: [PATCH 04/14] run prettier --- json-schema/workflow.schema.json | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index 6877f646..b8154383 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -31,10 +31,7 @@ "description": "Timezone for the schedule." } }, - "required": [ - "tasks", - "name" - ], + "required": ["tasks", "name"], "definitions": { "Task": { "type": "object", @@ -98,11 +95,7 @@ "description": "DAG node ID of this task." } }, - "required": [ - "input_uri", - "name", - "node_id" - ] + "required": ["input_uri", "name", "node_id"] } } } From e6f17c062f5b7c4252491453dfdbf9e6f1ca8bc8 Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Mon, 16 Dec 2024 21:50:09 -0800 Subject: [PATCH 05/14] add schemaVersion property --- json-schema/workflow.schema.json | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index b8154383..60c40094 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -4,6 +4,10 @@ "title": "Workflow", "type": "object", "properties": { + "schemaVersion": { + "type": "string", + "default": "0.0.1" + }, "tasks": { "type": "array", "items": { @@ -31,7 +35,10 @@ "description": "Timezone for the schedule." } }, - "required": ["tasks", "name"], + "required": [ + "tasks", + "name" + ], "definitions": { "Task": { "type": "object", @@ -95,7 +102,11 @@ "description": "DAG node ID of this task." } }, - "required": ["input_uri", "name", "node_id"] + "required": [ + "input_uri", + "name", + "node_id" + ] } } -} +} \ No newline at end of file From c15ca4cea10382ae46891864e3e9a430cc66e7c4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 05:50:30 +0000 Subject: [PATCH 06/14] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- json-schema/workflow.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index 60c40094..c10784c4 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -109,4 +109,4 @@ ] } } -} \ No newline at end of file +} From c1979501caa0d5c5dd977f9d439a7060f2e3f924 Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Wed, 18 Dec 2024 17:09:07 -0800 Subject: [PATCH 07/14] clarify depends_on description --- json-schema/workflow.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index c10784c4..7cb5e96d 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -95,7 +95,7 @@ "items": { "type": "string" }, - "description": "DAG node IDs of tasks this task depends on." + "description": "DAG node IDs of tasks this task depends on (upstream dependencies)." }, "node_id": { "type": "string", @@ -109,4 +109,4 @@ ] } } -} +} \ No newline at end of file From b2c04210db1e3ce551649588c71adb6b663237d3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 01:09:21 +0000 Subject: [PATCH 08/14] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- json-schema/workflow.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index 7cb5e96d..528778b2 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -109,4 +109,4 @@ ] } } -} \ No newline at end of file +} From 8148af44cb551b59e61e0a9331462602c37a3138 Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Thu, 19 Dec 2024 11:06:42 -0800 Subject: [PATCH 09/14] make depends_on an array of objects with id prop, not array of str --- json-schema/workflow.schema.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index 528778b2..ccc6d4b2 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -92,10 +92,18 @@ }, "depends_on": { "type": "array", + "description": "DAG node IDs of tasks this task depends on (upstream dependencies).", "items": { - "type": "string" - }, - "description": "DAG node IDs of tasks this task depends on (upstream dependencies)." + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } }, "node_id": { "type": "string", From 7ebee47e918ed88fe440f6653bf75cbd2ef8a91e Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Thu, 19 Dec 2024 11:07:22 -0800 Subject: [PATCH 10/14] make depends_on requiered --- json-schema/workflow.schema.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index ccc6d4b2..eb473eb2 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -113,8 +113,9 @@ "required": [ "input_uri", "name", - "node_id" + "node_id", + "depends_on" ] } } -} +} \ No newline at end of file From 4c65df1de77eb538da2a6dd88efaddaea96961d2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 19:07:46 +0000 Subject: [PATCH 11/14] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- json-schema/workflow.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index eb473eb2..d160529e 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -118,4 +118,4 @@ ] } } -} \ No newline at end of file +} From 3abc70fdf7d9af7fa13b20cf7e98fcb99daefa33 Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Thu, 19 Dec 2024 11:17:16 -0800 Subject: [PATCH 12/14] rename depends_on id property to node_id --- json-schema/workflow.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index d160529e..e2ec07f4 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -96,7 +96,7 @@ "items": { "type": "object", "properties": { - "id": { + "node_id": { "type": "string" } }, From 9777599ea83e0ad81992f485977651036fb32896 Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Thu, 19 Dec 2024 11:28:58 -0800 Subject: [PATCH 13/14] rename depends_on id property to node_id --- json-schema/workflow.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index e2ec07f4..e46fedad 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -101,7 +101,7 @@ } }, "required": [ - "id" + "node_id" ] } }, @@ -118,4 +118,4 @@ ] } } -} +} \ No newline at end of file From faaff872d36ceb06b1fb2fb9cd655aebb27c0b63 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 19:29:09 +0000 Subject: [PATCH 14/14] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- json-schema/workflow.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-schema/workflow.schema.json b/json-schema/workflow.schema.json index e46fedad..5fd6d33f 100644 --- a/json-schema/workflow.schema.json +++ b/json-schema/workflow.schema.json @@ -118,4 +118,4 @@ ] } } -} \ No newline at end of file +}