Add ArtifactService.ListArtifactNames (distinct names with version counts) - #7748
Merged
Conversation
Lists distinct artifact names within a project — one ArtifactGroup per name carrying the latest version's full record plus the total version count, ordered by the latest version's creation time (newest first). Token pagination and the name CONTAINS filter ride the common.ListRequest. ListArtifacts pages over individual versions, so building a grouped per-name view client-side is O(total versions) and cannot produce correct version counts; this pushes the grouping to the service where it is one indexed query. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new ArtifactService.ListArtifactNames RPC to support listing distinct artifact names within a project, returning the latest version’s full Artifact record plus a total version count per name. This extends the existing artifact service API to support efficient “catalog”/grouped views without paging through individual versions.
Changes:
- Added
ListArtifactNamesRPC and new messages:ListArtifactNamesRequest,ArtifactGroup,ListArtifactNamesResponse. - Regenerated client/server bindings for Go (gRPC + Connect), Python (grpc + connect), Rust (tonic), and TypeScript.
- Updated Go validation stubs for the new messages.
Reviewed changes
Copilot reviewed 7 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| flyteidl2/artifact/artifact_service.proto | Defines the new RPC and request/response/message types for grouped listing by artifact name. |
| gen/go/flyteidl2/artifact/artifact_service.pb.go | Regenerated Go protobuf types to include the new RPC messages. |
| gen/go/flyteidl2/artifact/artifact_service_grpc.pb.go | Regenerated Go gRPC client/server stubs with ListArtifactNames. |
| gen/go/flyteidl2/artifact/artifact_service.pb.validate.go | Regenerated Go validation code for the newly added messages. |
| gen/go/flyteidl2/artifact/artifactconnect/artifact_service.connect.go | Regenerated Go Connect client/handler wiring for the new RPC. |
| gen/python/flyteidl2/artifact/artifact_service_pb2.py | Regenerated Python protobuf message definitions including new RPC messages. |
| gen/python/flyteidl2/artifact/artifact_service_pb2.pyi | Regenerated Python typing stubs for the new messages. |
| gen/python/flyteidl2/artifact/artifact_service_pb2_grpc.py | Regenerated Python gRPC client/server stubs to include ListArtifactNames. |
| gen/python/flyteidl2/artifact/artifact_service_connect.py | Regenerated Python Connect bindings to include list_artifact_names. |
| gen/rust/src/flyteidl2.artifact.rs | Regenerated Rust prost message types for the new request/response/group messages. |
| gen/rust/src/flyteidl2.artifact.tonic.rs | Regenerated Rust tonic client/server stubs with list_artifact_names. |
| gen/ts/flyteidl2/artifact/artifact_service_pb.ts | Regenerated TypeScript protobuf/service descriptors and types for the new RPC/messages. |
Files not reviewed (5)
- gen/go/flyteidl2/artifact/artifact_service.pb.go: Generated file
- gen/go/flyteidl2/artifact/artifact_service.pb.validate.go: Generated file
- gen/go/flyteidl2/artifact/artifact_service_grpc.pb.go: Generated file
- gen/go/flyteidl2/artifact/artifactconnect/artifact_service.connect.go: Generated file
- gen/python/flyteidl2/artifact/artifact_service_pb2.py: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kumare3
added a commit
to flyteorg/flyte-sdk
that referenced
this pull request
Aug 1, 2026
flyte get artifact -> distinct artifact names (latest info +
version count), via the new
ArtifactService.ListArtifactNames
(flyteorg/flyte#7748); --search filters
flyte get artifact <name> -> every version of the name, newest first
flyte get artifact <name> <version> -> details of the pinned version
Adds Artifact.list_names (ArtifactGroup wrapper: name, versions count,
latest) and the protocol method. --all-versions is gone: name-only now lists
versions. Requires the flyteidl2 release containing ListArtifactNames; until
then test with a dev wheel from the flyte2 branch.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
kumare3
added a commit
to flyteorg/flyte-sdk
that referenced
this pull request
Aug 2, 2026
## What Records `ArtifactSource` provenance when publishing artifacts (builds on flyteorg/flyte#7745, stacked on #191): - **`Artifact.create(..., external_ref=...)`** — record an opaque external-system reference (URI, model id, …) as the artifact's source. - **Automatic in-task stamping** — when `Artifact.create` runs inside a task and no `external_ref` is given, the producing task action (`run`/`action`/`attempt`) is stamped from the task context. Scope fields are left empty; the server inherits the artifact's own org/project/domain. - **`flyte create artifact --external-ref <ref>`** CLI flag. - **Filter by source** — `Artifact.listall(source_run=..., source_action=..., source_external_ref=...)` and matching `flyte get artifact --source-run/--source-action/--source-external-ref` flags: every artifact produced by a run/action (or imported from the same external ref) is discoverable. Uses generic `ListRequest` EQUAL filters; no extra proto surface. - **`Artifact.source`** display property (`run r1/a0 (attempt 2)` / the external ref), shown in the rich repr. - **`flyte get artifact` restructured** around the new `ArtifactService.ListArtifactNames` (flyteorg/flyte#7748): bare `flyte get artifact` lists distinct names (latest info + version count, `--search`); `flyte get artifact <name>` lists every version; `flyte get artifact <name> <version>` shows details. Adds `Artifact.list_names` (`ArtifactGroup` wrapper). ## Status⚠️ Partially blocked on the **next** flyteidl2 release: `ListArtifactNames` is in flyteorg/flyte#7748 (unreleased). Everything else targets the released 2.0.34. Verified with a dev wheel from the #7748 branch: full artifact test suite, mypy, ty green; all three CLI forms devbox-e2e-verified. Server side is in the cloud `artifacts` branch: normalized `source_*` columns, scope validation, oneof round-trip, and the actions→artifact-service replication pipeline. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com> Co-authored-by: Ketan Umare <kumare3@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
EngHabu
approved these changes
Aug 2, 2026
kumare3
added a commit
to flyteorg/flyte-sdk
that referenced
this pull request
Aug 2, 2026
flyteidl2 2.0.35 (adds ArtifactService.ListArtifactNames, flyteorg/flyte#7748) is released on PyPI and crates.io — the last unreleased dependency of this branch. Bump the pin across root pyproject, rs_controller Python + Cargo, and the ray plugin; relock root, Cargo.lock, and all plugin locks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
kumare3
added a commit
to flyteorg/flyte-sdk
that referenced
this pull request
Aug 2, 2026
## What Records `ArtifactSource` provenance when publishing artifacts (builds on flyteorg/flyte#7745, stacked on #191): - **`Artifact.create(..., external_ref=...)`** — record an opaque external-system reference (URI, model id, …) as the artifact's source. - **Automatic in-task stamping** — when `Artifact.create` runs inside a task and no `external_ref` is given, the producing task action (`run`/`action`/`attempt`) is stamped from the task context. Scope fields are left empty; the server inherits the artifact's own org/project/domain. - **`flyte create artifact --external-ref <ref>`** CLI flag. - **Filter by source** — `Artifact.listall(source_run=..., source_action=..., source_external_ref=...)` and matching `flyte get artifact --source-run/--source-action/--source-external-ref` flags: every artifact produced by a run/action (or imported from the same external ref) is discoverable. Uses generic `ListRequest` EQUAL filters; no extra proto surface. - **`Artifact.source`** display property (`run r1/a0 (attempt 2)` / the external ref), shown in the rich repr. - **`flyte get artifact` restructured** around the new `ArtifactService.ListArtifactNames` (flyteorg/flyte#7748): bare `flyte get artifact` lists distinct names (latest info + version count, `--search`); `flyte get artifact <name>` lists every version; `flyte get artifact <name> <version>` shows details. Adds `Artifact.list_names` (`ArtifactGroup` wrapper). ## Status⚠️ Partially blocked on the **next** flyteidl2 release: `ListArtifactNames` is in flyteorg/flyte#7748 (unreleased). Everything else targets the released 2.0.34. Verified with a dev wheel from the #7748 branch: full artifact test suite, mypy, ty green; all three CLI forms devbox-e2e-verified. Server side is in the cloud `artifacts` branch: normalized `source_*` columns, scope validation, oneof round-trip, and the actions→artifact-service replication pipeline. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Ketan Umare <16888709+kumare3@users.noreply.github.com> Co-authored-by: Ketan Umare <kumare3@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
kumare3
added a commit
to flyteorg/flyte-sdk
that referenced
this pull request
Aug 2, 2026
flyteidl2 2.0.35 (adds ArtifactService.ListArtifactNames, flyteorg/flyte#7748) is released on PyPI and crates.io — the last unreleased dependency of this branch. Bump the pin across root pyproject, rs_controller Python + Cargo, and the ray plugin; relock root, Cargo.lock, and all plugin locks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
ArtifactService.ListArtifactNames: lists distinct artifact names within a project, one entry per name.nameCONTAINS filter via the commonListRequestProjectIdentifier(org stamped server-side, same asListArtifacts)Why
ListArtifactspages over individual versions. A grouped per-name view (artifact catalogs/list UIs) built client-side is O(total versions) — an artifact with hundreds of versions starves discovery of the next name — and cannot produce correct per-name version counts. Server-side this is a single indexed query (DISTINCT ON (name)+ window count in the reference implementation).Follows up #7733 (ArtifactService) and #7745 (ArtifactSource provenance).
🤖 Generated with Claude Code