Skip to content

Add ArtifactService.ListArtifactNames (distinct names with version counts) - #7748

Merged
kumare3 merged 1 commit into
mainfrom
ketan/artifact-list-names
Aug 2, 2026
Merged

Add ArtifactService.ListArtifactNames (distinct names with version counts)#7748
kumare3 merged 1 commit into
mainfrom
ketan/artifact-list-names

Conversation

@kumare3

@kumare3 kumare3 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What

Adds ArtifactService.ListArtifactNames: lists distinct artifact names within a project, one entry per name.

rpc ListArtifactNames(ListArtifactNamesRequest) returns (ListArtifactNamesResponse);

message ArtifactGroup {
  Artifact latest = 1;   // the most recently created version's full record
  uint64 versions = 2;   // total versions published under the name
}
  • Ordered by the latest version's creation time, newest first
  • Token pagination + name CONTAINS filter via the common ListRequest
  • Scoped by ProjectIdentifier (org stamped server-side, same as ListArtifacts)

Why

ListArtifacts pages 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

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>
Copilot AI review requested due to automatic review settings August 1, 2026 23:28
@github-actions github-actions Bot added the flyte2 label Aug 1, 2026

Copilot AI left a comment

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.

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 ListArtifactNames RPC 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>
@kumare3
kumare3 merged commit 4085889 into main Aug 2, 2026
25 checks passed
@kumare3
kumare3 deleted the ketan/artifact-list-names branch August 2, 2026 01:47
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants