acoustic-carpenter-78188
08/01/2026, 12:41 AMArtifactSource provenance to ArtifactSpec (field 6), recording what produced an artifact — complementing created_by (who created it, added in #7733).
message TaskActionSource {
common.ActionIdentifier action = 1; // the producing action
uint32 attempt = 2; // producing attempt; retries are distinct provenance
}
message ArtifactSource {
oneof source {
TaskActionSource task_action = 1; // produced by a task action
string external_ref = 2; // imported from an external system
}
}
• task_action — set when publishing from inside a running task, or when the backend extracts artifacts from task outputs (produces_artifacts). Uses the existing `common.ActionIdentifier`; no new import direction.
• external_ref — opaque reference (URI, model id, dataset id, …) for artifacts imported from outside Flyte.
• unset — manually created; no explicit NONE variant needed.
TaskActionSource is a dedicated message rather than common.ActionAttemptIdentifier because producing attempts are 0-based while that identifier validates attempt > 0 (1-based semantics used by cache/cluster/dataproxy).
Why
• "Which action/run produced this artifact" is the natural list filter once artifacts are queryable.
• The planned publish path for backend-extracted generated_artifacts needs exactly this field.
• Immutable, client-declared at creation; SDK stamps task_action automatically in-task.
Wire-compatible: new field number only; old readers ignore it.
Follow-ups (separate PRs)
• Artifact service: persist source (normalized columns) + filter support
• SDK: auto-stamp task_action in-task; flyte create artifact --external-ref
🤖 Generated with Claude Code
flyteorg/flyteacoustic-carpenter-78188
08/01/2026, 8:24 PM