Skip to content

fix(artifacts): gracefully handle listing empty artifacts#11157

Merged
ruhiparvatam merged 6 commits intomainfrom
ruhiparvatam/empty-artifact-cli
Jan 8, 2026
Merged

fix(artifacts): gracefully handle listing empty artifacts#11157
ruhiparvatam merged 6 commits intomainfrom
ruhiparvatam/empty-artifact-cli

Conversation

@ruhiparvatam
Copy link
Copy Markdown
Contributor

@ruhiparvatam ruhiparvatam commented Jan 7, 2026

Description

Listing artifacts via the wandb CLI crashes when an artifact exists but has no versions.

This PR catches empty artifacts gracefully and outputs a non-failing description instead of raising an error:
Output example:
<artifact-type-name> N/A 0 B <artifact-name> (no versions)

  • I updated CHANGELOG.unreleased.md, or it's not applicable

Testing

How was this PR tested?

  • This PR was tested locally with wandb cli, by running wandb artifact ls path/to/project

@ruhiparvatam ruhiparvatam requested a review from a team as a code owner January 7, 2026 22:31
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
wandb/cli/cli.py 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ruhiparvatam ruhiparvatam changed the title fix(artifacts): Gracefully handle listing empty artifacts fix(artifacts): gracefully handle listing empty artifacts Jan 7, 2026
Comment thread wandb/cli/cli.py Outdated
@ruhiparvatam ruhiparvatam enabled auto-merge (squash) January 8, 2026 16:08
@ruhiparvatam ruhiparvatam merged commit 3657b8f into main Jan 8, 2026
25 checks passed
@ruhiparvatam ruhiparvatam deleted the ruhiparvatam/empty-artifact-cli branch January 8, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants