From f4f6d5d7b495aa35ba8404e34fd28b17185089f4 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Tue, 14 Jul 2026 09:56:09 +0100 Subject: [PATCH 1/6] Create taskrunqueued.json Signed-off-by: vyuhimenko Signed-off-by: vyuhimenko --- schemas/taskrunqueued.json | 125 +++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 schemas/taskrunqueued.json diff --git a/schemas/taskrunqueued.json b/schemas/taskrunqueued.json new file mode 100644 index 0000000..daef6c5 --- /dev/null +++ b/schemas/taskrunqueued.json @@ -0,0 +1,125 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://cdevents.dev/0.6.0-draft/schema/taskrun-queued-event", + "properties": { + "context": { + "properties": { + "specversion": { + "type": "string", + "minLength": 1 + }, + "id": { + "type": "string", + "minLength": 1 + }, + "source": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + }, + "type": { + "type": "string", + "enum": [ + "dev.cdevents.taskrun.queued.0.1.0-draft" + ], + "default": "dev.cdevents.taskrun.queued.0.1.0-draft" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" + }, + "chainId": { + "type": "string", + "minLength": 1 + }, + "links": { + "$ref": "links/embeddedlinksarray" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "specversion", + "id", + "source", + "type", + "timestamp" + ] + }, + "subject": { + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "source": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + }, + "content": { + "properties": { + "taskName": { + "type": "string" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "pipelineRun": { + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "source": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "id" + ] + } + }, + "additionalProperties": false, + "type": "object" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "id", + "content" + ] + }, + "customData": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "string", + "contentEncoding": "base64" + } + ] + }, + "customDataContentType": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "context", + "subject" + ] +} From 63c700d776b36f99f71aab3101a8835b1c2536a3 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Wed, 15 Jul 2026 15:17:12 +0100 Subject: [PATCH 2/6] Create taskrun_queued.json Signed-off-by: vyuhimenko Signed-off-by: vyuhimenko --- conformance/taskrun_queued.json | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 conformance/taskrun_queued.json diff --git a/conformance/taskrun_queued.json b/conformance/taskrun_queued.json new file mode 100644 index 0000000..a24ee77 --- /dev/null +++ b/conformance/taskrun_queued.json @@ -0,0 +1,53 @@ +{ + "context": { + "specversion": "0.6.0-draft", + "id": "271069a8-fc18-44f1-b38f-9d70a1695819", + "chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b", + "source": "/event/source/123", + "type": "dev.cdevents.taskrun.queued.0.1.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom", + "links": [ + { + "linkType": "RELATION", + "linkKind": "TRIGGER", + "target": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "PATH", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "END", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + } + ] + }, + "subject": { + "id": "mySubject123", + "source": "/event/source/123", + "content": { + "taskName": "myTask", + "uri": "https://www.example.com/mySubject123", + "pipelineRun": { + "id": "mySubject123" + } + } + } +} From 7b2383a02acabd0aef8cae80cea156779bc7c87e Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Wed, 15 Jul 2026 15:37:00 +0100 Subject: [PATCH 3/6] Update core.md Signed-off-by: vyuhimenko Signed-off-by: vyuhimenko --- core.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/core.md b/core.md index 21fa3a4..2baf031 100644 --- a/core.md +++ b/core.md @@ -21,7 +21,7 @@ The definition of *pipelines* and *tasks* is an authoring process, and has no ev | Subject | Description | Predicates | |---------|-------------|------------| | [`pipelineRun`](#pipelinerun) | An instance of a *pipeline* | [`queued`](#pipelinerun-queued), [`started`](#pipelinerun-started), [`finished`](#pipelinerun-finished)| -| [`taskRun`](#taskrun) | An instance of a *task* | [`started`](#taskrun-started), [`finished`](#taskrun-finished)| +| [`taskRun`](#taskrun) | An instance of a *task* | [`queued`](#taskrun-queued), [`started`](#taskrun-started), [`finished`](#taskrun-finished)| ### `pipelineRun` @@ -109,6 +109,24 @@ A pipelineRun has finished, successfully or not. | outcome | `String (enum)` | outcome of a finished `pipelineRun` | `success`, `failure`, `cancel`, or `error` | `success`, `failure`, `cancel`, `error` | | errors | `String` | In case of error, canceled, or failed pipeline , provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `pipelineRun canceled by user`, `Unit tests failed`| | +### [`taskRun Queued`](conformance/taskrun_queued.json) + +TODO: add more docs. + +Adopters can choose to ignore these events if they don't apply to their use cases. + +- Event Type: __`dev.cdevents.taskrun.queued.0.1.0-draft`__ +- Predicate: queued +- Subject: [`taskRun`](#taskrun) + +| Field | Type | Description | Examples | Required | +|-------|------|-------------|----------|----------------------------| +| id | `String` | See [id](spec.md#id-subject)| `tenant1/12345-abcde`, `namespace/taskrun-1234` | ✅ | +| source | `URI-Reference` | [source](spec.md#source) from the context | | | +| taskName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | +| pipelineRun | `Object` ([`pipelineRun`](#pipelinerun)) | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`| | +| url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` | | + ### [`taskRun Started`](conformance/taskrun_started.json) A taskRun has started and it is running. From 2a2b57f5fe8718d875c74054778ca80e85c29150 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Wed, 15 Jul 2026 15:39:53 +0100 Subject: [PATCH 4/6] Update core.md Signed-off-by: vyuhimenko Signed-off-by: vyuhimenko --- core.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.md b/core.md index 2baf031..23c71a6 100644 --- a/core.md +++ b/core.md @@ -111,7 +111,7 @@ A pipelineRun has finished, successfully or not. ### [`taskRun Queued`](conformance/taskrun_queued.json) -TODO: add more docs. +This event represents when a taskRun has been queued for execution - and is waiting for applicable preconditions (resource availability, other tasks, etc.) to be fulfilled before actually executing. Adopters can choose to ignore these events if they don't apply to their use cases. From e6d2593192f5bc23631e3f0e5018338f60441ce9 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Wed, 15 Jul 2026 16:45:38 +0100 Subject: [PATCH 5/6] fix typos and add comment about sequence Signed-off-by: vyuhimenko Signed-off-by: vyuhimenko --- core.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core.md b/core.md index 23c71a6..2fcf57e 100644 --- a/core.md +++ b/core.md @@ -115,6 +115,8 @@ This event represents when a taskRun has been queued for execution - and is wait Adopters can choose to ignore these events if they don't apply to their use cases. +A `taskRun.queued` event may be followed by `taskRun.started` or `taskRun.finished` for the **same** subject. + - Event Type: __`dev.cdevents.taskrun.queued.0.1.0-draft`__ - Predicate: queued - Subject: [`taskRun`](#taskrun) @@ -123,7 +125,7 @@ Adopters can choose to ignore these events if they don't apply to their use case |-------|------|-------------|----------|----------------------------| | id | `String` | See [id](spec.md#id-subject)| `tenant1/12345-abcde`, `namespace/taskrun-1234` | ✅ | | source | `URI-Reference` | [source](spec.md#source) from the context | | | -| taskName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | +| taskName | `String` | The name of the task | `MyTask`, `Deploy to DEV stage` | | | pipelineRun | `Object` ([`pipelineRun`](#pipelinerun)) | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`| | | url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` | | @@ -139,7 +141,7 @@ A taskRun has started and it is running. |-------|------|-------------|----------|----------------------------| | id | `String` | See [id](spec.md#id-subject)| `tenant1/12345-abcde`, `namespace/taskrun-1234` | ✅ | | source | `URI-Reference` | [source](spec.md#source) from the context | | | -| taskName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | +| taskName | `String` | The name of the task | `MyTask`, `Deploy to DEV stage` | | | pipelineRun | `Object` ([`pipelineRun`](#pipelinerun)) | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`| | | url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` | | @@ -155,7 +157,7 @@ A taskRun has finished, successfully or not. |-------|------|-------------|----------|----------------------------| | id | `String` | See [id](spec.md#id-subject)| `tenant1/12345-abcde`, `namespace/taskrun-1234` | ✅ | | source | `URI-Reference` | [source](spec.md#source) from the context | | | -| taskName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | +| taskName | `String` | The name of the task | `MyTask`, `Deploy to DEV stage` | | | pipelineRun | `Object` ([`pipelineRun`](#pipelinerun)) | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`| | | url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` | | | outcome | `String (enum)` | outcome of a finished `taskRun` | `success`, `failure`, `cancel`, or `error` | `success`, `failure`, `cancel`, `error` | From e6b6477be43a8a3a02cfa41f16efa30ce0b1c136 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Thu, 16 Jul 2026 11:32:43 +0100 Subject: [PATCH 6/6] Fix another typo Signed-off-by: Valentyn Yukhymenko --- core.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.md b/core.md index 2fcf57e..03ef83d 100644 --- a/core.md +++ b/core.md @@ -52,7 +52,7 @@ associated, in which case it is acceptable to generate only taskRun events. |-------|------|-------------|----------| | id | `String` | See [id](spec.md#id-subject)| `tenant1/12345-abcde`, `namespace/taskrun-1234` | | source | `URI-Reference` | See [source](spec.md#source-subject) | | -| taskName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | +| taskName | `String` | The name of the task | `MyTask`, `Deploy to DEV stage` | | pipelineRun | `Object` ([`pipelineRun`](#pipelinerun)) | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`| | outcome | `String` | outcome of a finished `taskRun` | `success`, `failure`, `cancel`, or `error` | | url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` |