artifact: parent is a full artifact reference, not a bare version - #7963
Conversation
Replaces ArtifactSpec.parent_version and ProducedArtifact.parent_version
(same field numbers — the string fields shipped in v2.0.46 but nothing
consumes them yet, so a clean break beats a reserved graveyard) with
parent_artifact, a core.ArtifactVersionId.
A bare version string could only express lineage within one artifact
name. A full reference lets a version record derivation across
artifacts — a model deriving from a dataset version — while keeping the
common same-name case as terse as before: empty key fields inherit the
child's own scope and name, so {version: "v1"} still means "the v1 of
this same artifact".
The parent must live in the artifact's own org/project/domain (same
convention as ArtifactSource provenance). Everything else is unchanged:
stored as given, never resolved, dangling parents legal, immutable
after creation. The ListArtifacts children filter becomes the
parent_name + parent_version EQUAL pair, always together, replacing the
name-scoped parent_version filter.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VzRDrkwWaxeTpqB4WS165m
Signed-off-by: Haytham Abuelfutuh <haytham@union.ai>
There was a problem hiding this comment.
🟡 Changes recommended
The new parent_artifact fields remove prior max-length validation and the produced-artifact docs don’t clearly state the same-scope constraint described in the PR, which can lead to oversized identifiers and consumer confusion.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the artifact lineage schema to reference a full parent artifact version identifier (rather than a bare version string), enabling derivation links across different artifact names while keeping field numbers stable.
Changes:
- Replaces
parent_versionstring fields withparent_artifact(core.ArtifactVersionId) inArtifactSpecandProducedArtifact(wire-breaking by design). - Updates
ListArtifactsRequestdocumentation to describe the new children-filter pair (parent_name+parent_version). - Regenerates Go/Python/TypeScript bindings and related generated artifacts (validate code, swagger).
File summaries
| File | Description |
|---|---|
| flyteidl2/task/common.proto | Updates ProducedArtifact to use parent_artifact instead of parent_version. |
| flyteidl2/artifact/artifact.proto | Updates ArtifactSpec to use parent_artifact instead of parent_version. |
| flyteidl2/artifact/artifact_service.proto | Updates ListArtifacts filter documentation to the new parent filter pair. |
| gen/go/flyteidl2/task/common.pb.go | Regenerated Go bindings for ProducedArtifact.parent_artifact. |
| gen/go/flyteidl2/task/common.pb.validate.go | Regenerated Go validation scaffolding for embedded parent_artifact. |
| gen/go/flyteidl2/artifact/artifact.pb.go | Regenerated Go bindings for ArtifactSpec.parent_artifact. |
| gen/go/flyteidl2/artifact/artifact.pb.validate.go | Regenerated Go validation scaffolding for embedded parent_artifact. |
| gen/go/flyteidl2/artifact/artifact_service.pb.go | Regenerated Go bindings with updated request docs. |
| gen/go/gateway/flyteidl2/connector/service.swagger.json | Regenerated swagger reflecting parent_artifact in ProducedArtifact schema. |
| gen/python/flyteidl2/task/common_pb2.py | Regenerated Python protobuf module for ProducedArtifact.parent_artifact. |
| gen/python/flyteidl2/task/common_pb2.pyi | Regenerated Python typing stubs for ProducedArtifact.parent_artifact. |
| gen/python/flyteidl2/artifact/artifact_pb2.py | Regenerated Python protobuf module for ArtifactSpec.parent_artifact. |
| gen/python/flyteidl2/artifact/artifact_pb2.pyi | Regenerated Python typing stubs for ArtifactSpec.parent_artifact. |
| gen/ts/flyteidl2/task/common_pb.ts | Regenerated TS bindings for ProducedArtifact.parentArtifact. |
| gen/ts/flyteidl2/artifact/artifact_pb.ts | Regenerated TS bindings for ArtifactSpec.parentArtifact. |
| gen/ts/flyteidl2/artifact/artifact_service_pb.ts | Regenerated TS bindings with updated request docs. |
Review details
Files not reviewed (7)
- gen/go/flyteidl2/artifact/artifact.pb.go: Generated file
- gen/go/flyteidl2/artifact/artifact.pb.validate.go: Generated file
- gen/go/flyteidl2/artifact/artifact_service.pb.go: Generated file
- gen/go/flyteidl2/task/common.pb.go: Generated file
- gen/go/flyteidl2/task/common.pb.validate.go: Generated file
- gen/python/flyteidl2/artifact/artifact_pb2.py: Generated file
- gen/python/flyteidl2/task/common_pb2.py: Generated file
- Files reviewed: 9/18 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // to exist (publication order is not guaranteed), so readers walking lineage | ||
| // must tolerate a dangling parent. Immutable after creation. | ||
| string parent_version = 7 [(buf.validate.field).string.max_len = 255]; | ||
| core.ArtifactVersionId parent_artifact = 7; |
There was a problem hiding this comment.
| // the produced artifact's own scope and name, so a bare {version: "v1"} | ||
| // declares the previous version of this same artifact as parent; a set name | ||
| // records cross-artifact derivation. | ||
| flyteidl2.core.ArtifactVersionId parent_artifact = 6; |
There was a problem hiding this comment.
Addressed in the follow-up #7964 — same constraints as the sibling comment on artifact.proto; ArtifactVersionId.version is bounded at 255 like the parent_version string was. The cloud service also enforces these lengths server-side at CreateArtifact.
| // it derives a new version from one it consumed, so the resulting lineage | ||
| // branches instead of reading as a linear chain. Empty key fields inherit | ||
| // the produced artifact's own scope and name, so a bare {version: "v1"} | ||
| // declares the previous version of this same artifact as parent; a set name | ||
| // records cross-artifact derivation. |
There was a problem hiding this comment.
Addressed in the follow-up #7964 — the ProducedArtifact.parent_artifact comment now states explicitly that only the name may differ and non-empty org/project/domain must match the produced artifact's own scope (cross-project/domain lineage is rejected at registration).
Why
Follow-up to #7955 on review feedback: a bare
parent_versionstring can only express lineage within one artifact name. Pointing at a full artifact reference lets a version record derivation across artifacts — a model deriving from a dataset version — which a version string cannot say.What
ArtifactSpec.parent_version(string) →ArtifactSpec.parent_artifact(core.ArtifactVersionId), same field number 7.ProducedArtifact.parent_version→ProducedArtifact.parent_artifact, same field number 6.{version: "v1"}still means "the v1 of this same artifact". Scope is constrained to the artifact's own org/project/domain (same convention asArtifactSource).ListArtifactschildren filter becomes theparent_name+parent_versionEQUAL pair (always together), replacing the name-scopedparent_versionfilter — children may now live under any name in the project.Companion service rework lands in unionai/cloud#18093.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VzRDrkwWaxeTpqB4WS165m