Skip to content

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

Open
BaLiKfromUA wants to merge 5 commits into
cdevents:mainfrom
BaLiKfromUA:taskrun-queued
Open

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

Conversation

@BaLiKfromUA

Copy link
Copy Markdown

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:

Signed-off-by: vyuhimenko <vyuhimenko@bloomberg.net>
Signed-off-by: vyuhimenko <vyuhimenko@bloomberg.net>
Signed-off-by: vyuhimenko <vyuhimenko@bloomberg.net>
Signed-off-by: vyuhimenko <vyuhimenko@bloomberg.net>
Signed-off-by: vyuhimenko <vyuhimenko@bloomberg.net>
@BaLiKfromUA

Copy link
Copy Markdown
Author

Validated JSONs locally:

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

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

1 participant