Skip to content

TEP-0192: Tekton Artifacts API - #1298

Open
vdemeester wants to merge 1 commit into
tektoncd:mainfrom
vdemeester:vdemeester/tep-0192-artifacts-api
Open

TEP-0192: Tekton Artifacts API#1298
vdemeester wants to merge 1 commit into
tektoncd:mainfrom
vdemeester:vdemeester/tep-0192-artifacts-api

Conversation

@vdemeester

Copy link
Copy Markdown
Member

Summary

This TEP introduces a declarative Artifact API for Tekton Tasks and Pipelines, replacing the manual provenance-JSON model from TEP-0147 Phase 1 (alpha, behind enable-artifacts feature flag).

Tasks declare spec.artifacts.inputs and spec.artifacts.outputs with two types:

  • type: content — the step writes data to a path; Tekton uploads, downloads, and verifies it transparently across Tasks.
  • type: reference — the step already pushed content elsewhere (e.g., buildah push); it writes a URI and digest so Tekton can record and propagate the reference.

Pipelines bind artifacts between Tasks with from: syntax, creating implicit DAG edges. The controller transparently fetches and verifies content artifacts before user steps execute.

Key Design Decisions

  • Replaces TEP-0147 Phase 1 alpha API ($(step.artifacts.path) manual JSON) — clean replacement, not coexistence. Feature is alpha behind flag, breaking change acceptable per API compatibility policy.
  • subject: true replaces buildOutput: true — maps directly to SLSA attestation subject, eliminates Chains' IMAGE_URL/IMAGE_DIGEST type-hinting convention.
  • Eliminates PVC Workspaces for common inter-task data patterns (clone→build, clone→test, build→sign).
  • Storage Provider interface for pluggable backends — the default OCI implementation is in the companion TEP-0193.

Relationship to Existing TEPs

/kind tep

@tekton-robot tekton-robot added the kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). label Aug 26, 2026
@tekton-robot
tekton-robot requested review from abayer and wlynch August 26, 2026 08:59
@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from vdemeester after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 26, 2026
@vdemeester

Copy link
Copy Markdown
Member Author

@waveywaves this is the new updated TEP 🙏🏼

Comment thread teps/0192-tekton-artifacts-api.md Outdated
|---------------------------------------------------------------------------------------|--------------------------------------------|
| `$(step.artifacts.path)` with JSON | `$(outputs.<name>.uri)` for references |
| `$(artifacts.path)` with JSON | `$(outputs.<name>.path)` for content |
| No `spec.artifacts` declaration | `spec.artifacts.outputs` declaration |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
| No `spec.artifacts` declaration | `spec.artifacts.outputs` declaration |
| No `spec.artifacts` declaration | `spec.artifacts.outputs`, `spec.artifacts.inputs` declaration |

Comment on lines +555 to +557
- name: test-results
description: JUnit test results
type: content

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to mention type ?? asking because its default and if we don't mention content will be considered right

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah this is more to be explicit in the example, but content would be the default.

6. `subject: true` for SLSA attestation subject identification.
7. `Provider` interface for pluggable storage backends.
8. Init container injection for downloading content artifacts.
9. Digest verification on upload and download.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this also should be done by init container ??

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes, it would be done by the same init container, most likely the entrypoint.

Comment thread teps/0192-tekton-artifacts-api.md Outdated
Comment on lines +649 to +650
external storage overhead. The entrypoint decides based on a configurable
size threshold (default 1KB).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

as this status controlled by Tekton apart from default value what are the other configurable sizes ??

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

hmm not sure I understand the question


**Must Have:**

1. Tasks declare `spec.artifacts.inputs` and `spec.artifacts.outputs`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

for the Tasks like git-clone which is already in use for many pipelines so if user want to use artifact way in their Pipeline instead of pvc what will be the path forward ??

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

good question, naively I thought we would publish a new version / variant of the git-clone task..
But maybe we could have something where artifact could be optionally used ? (seems complex though)

- E2E tests: full Pipeline with content and reference artifacts, storage
backend integration, digest verification.
- Backward compatibility: ensure `spec.results` continues working.
- Migration: verify removal of `$(step.artifacts.path)`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we also include performance benchmark

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

good point, we probably should.

@vdemeester
vdemeester force-pushed the vdemeester/tep-0192-artifacts-api branch from f64e6e2 to 705d776 Compare August 27, 2026 13:37
@tekton-robot

Copy link
Copy Markdown
Contributor

The following Tekton test failed:

Test name Commit Details Required Rerun command
pull-community-teps-lint 705d776 link true /test pull-community-teps-lint

Declarative spec.artifacts.inputs/outputs on TaskSpec with two artifact types:
- type: reference — step already pushed content, Tekton records uri+digest
- type: content — step writes data, Tekton handles upload/download/verify

Replaces TEP-0147 Phase 1 alpha API (step.artifacts.path manual JSON).
subject: true replaces buildOutput/IMAGE_URL type hinting for SLSA.
Provider interface for pluggable storage backends.
Pipeline-level artifact bindings with implicit DAG edges.
Eliminates PVC Workspaces for common inter-task data patterns.
@vdemeester
vdemeester force-pushed the vdemeester/tep-0192-artifacts-api branch from 705d776 to 2e7cd6f Compare August 27, 2026 13:57

When a Task has content artifact inputs (from Pipeline bindings or
PipelineRun inputs), the controller transparently fetches and verifies
the content before any user Steps execute. The fetch image is built and

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The fetch image is built and

are we adding new image called fetch??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants