Skip to content

ADX-58 Fix command to List Artifacts with correct latest-version-id and visibility#968

Merged
nitinbhojwani merged 1 commit intomasterfrom
nitin/ADX-58-fix-artifacts-ls-command
Feb 28, 2026
Merged

ADX-58 Fix command to List Artifacts with correct latest-version-id and visibility#968
nitinbhojwani merged 1 commit intomasterfrom
nitin/ADX-58-fix-artifacts-ls-command

Conversation

@nitinbhojwani
Copy link
Copy Markdown
Contributor

What and Why

  • Fixes the command output of clarifai af ls to List Artifacts with correct latest-version-id and visibility

Tests

  • Unit test and Manual E2E Test

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the clarifai af ls command output to correctly display artifact latest version IDs and visibility information. The fix addresses an issue where these fields were not being properly extracted from the API response objects.

Changes:

  • Added three helper functions (_resolve_latest_version, _resolve_latest_version_id, _resolve_visibility) to robustly extract artifact metadata from varying response shapes
  • Updated the artifact list command to use these helpers and display visibility column
  • Added comprehensive test coverage for the new functionality

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
clarifai/cli/artifact.py Added helper functions to resolve artifact version ID and visibility from different response shapes; updated list command to use new helpers and display VISIBILITY column
tests/cli/test_artifact_cli.py Added new test for latest version and visibility resolution; updated existing test to mock proper artifact response structure

@github-actions
Copy link
Copy Markdown

Code Coverage

Package Line Rate Health
clarifai 45%
clarifai.cli 69%
clarifai.cli.templates 46%
clarifai.client 65%
clarifai.client.auth 67%
clarifai.constants 100%
clarifai.datasets 100%
clarifai.datasets.export 80%
clarifai.datasets.upload 75%
clarifai.datasets.upload.loaders 37%
clarifai.models 100%
clarifai.rag 0%
clarifai.runners 52%
clarifai.runners.models 64%
clarifai.runners.pipeline_steps 39%
clarifai.runners.pipelines 71%
clarifai.runners.utils 62%
clarifai.runners.utils.data_types 72%
clarifai.schema 100%
clarifai.urls 58%
clarifai.utils 61%
clarifai.utils.evaluation 16%
clarifai.workflows 95%
Summary 62% (10146 / 16440)

Minimum allowed line rate is 50%

@nitinbhojwani nitinbhojwani merged commit df54d34 into master Feb 28, 2026
19 of 21 checks passed
@nitinbhojwani nitinbhojwani deleted the nitin/ADX-58-fix-artifacts-ls-command branch February 28, 2026 05:36
@luv-bansal luv-bansal mentioned this pull request Mar 4, 2026
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