Skip to content

Add predicate queued to taskRun to indicate that task is planned to be started in future - #317

Merged
afrittoli merged 6 commits into
cdevents:mainfrom
BaLiKfromUA:taskrun-queued
Jul 16, 2026
Merged

Add predicate queued to taskRun to indicate that task is planned to be started in future#317
afrittoli merged 6 commits into
cdevents:mainfrom
BaLiKfromUA:taskrun-queued

Conversation

@BaLiKfromUA

Copy link
Copy Markdown
Contributor

Changes

Closes #305

This PR introduces a new taskRun predicate: queued.

Consistent with other queued events, this predicate indicates that a task is waiting for the applicable preconditions to be satisfied before it can start running.

This is needed for two reasons:

  1. There is currently a small inconsistency between the predicates available for taskRun and the kinds of work that a task can represent. The testSuiteRun subject from Testing Events already supports a queued predicate. Since a task can represent a test run, adding queued to taskRun seems consistent with the specification:

    ...a set of Tasks to be performed, like performing a build, running some tests, publishing an artifact.

  2. There is currently no way to express a taskRun that has been scheduled for future execution but has not started yet. For example, a pipelineRun may already be started and in progress while one of its taskRuns is still queued.

    Note: As of July 2026, there is an ongoing discussion about introducing a separate Scheduler abstraction in CDEvents. Such an addition would not conflict with this PR. In the meantime, the queued predicate can serve as a practical compromise.

As an example for making this contribution, I've been using #145

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

@BaLiKfromUA

Copy link
Copy Markdown
Contributor Author

Validated JSONs locally:

>  cd tools && npm ci && npm run validate
....
taskrun queued: valid
....
50 out of 50 examples are valid

Signed-off-by: vyuhimenko <vyuhimenko@bloomberg.net>
Signed-off-by: vyuhimenko <valentin.yukhymenko@gmail.com>
Signed-off-by: vyuhimenko <vyuhimenko@bloomberg.net>
Signed-off-by: vyuhimenko <valentin.yukhymenko@gmail.com>
Signed-off-by: vyuhimenko <vyuhimenko@bloomberg.net>
Signed-off-by: vyuhimenko <valentin.yukhymenko@gmail.com>
Signed-off-by: vyuhimenko <vyuhimenko@bloomberg.net>
Signed-off-by: vyuhimenko <valentin.yukhymenko@gmail.com>
Signed-off-by: vyuhimenko <vyuhimenko@bloomberg.net>
Signed-off-by: vyuhimenko <valentin.yukhymenko@gmail.com>
Signed-off-by: Valentyn Yukhymenko <valentin.yukhymenko@gmail.com>
@BaLiKfromUA

Copy link
Copy Markdown
Contributor Author

@xibz @afrittoli this PR is ready for review, from my perspective. I've fixed all signing issues and last run of CI was green (+ I checked locally).

Thank you in advance for your review time :)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the Core Events specification by adding a new queued predicate for the taskRun subject, including the associated JSON Schema and a conformance example, and updating the Core Events documentation accordingly (per issue #305).

Changes:

  • Added a new JSON Schema for the taskRun.queued event.
  • Added a taskRun.queued conformance example event payload.
  • Updated core.md to list taskRun as supporting queued and to document the new event (and corrected taskName descriptions).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
schemas/taskrunqueued.json Introduces the JSON Schema for the taskRun.queued event.
core.md Documents the new taskRun.queued predicate/event and updates taskRun predicate listings.
conformance/taskrun_queued.json Adds an example payload for taskRun.queued conformance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread schemas/taskrunqueued.json
Comment thread core.md
Comment thread conformance/taskrun_queued.json

@afrittoli afrittoli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good!

Comment thread core.md
Comment thread core.md
Comment thread conformance/taskrun_queued.json
Comment thread schemas/taskrunqueued.json
@BaLiKfromUA

Copy link
Copy Markdown
Contributor Author

@afrittoli thank you a lot for review! I don't have merge access so please merge this PR if we don't wait for other maintainers.

But I am not in rush obviously, just don't know what it the process of merging in this repo :)

@afrittoli

Copy link
Copy Markdown
Member

@xibz @davidB if you're ok with this, we can squash-merge, unless @BaLiKfromUA prefers to squash and re-push.

@BaLiKfromUA

Copy link
Copy Markdown
Contributor Author

I am okay with squash-merge from your side.

@xibz

xibz commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@afrittoli no objections from me.

Thanks for the PR @BaLiKfromUA!

LGTM

@afrittoli
afrittoli merged commit af5496d into cdevents:main Jul 16, 2026
4 checks passed
@BaLiKfromUA
BaLiKfromUA deleted the taskrun-queued branch July 16, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Add predicate queued to taskRun to indicate that task is planned to be started in future

4 participants