Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions cloudsmith_cli/cli/commands/upstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@ def build_row(u):
click.style(fmt_bool(u["verify_ssl"]), fg="green"),
]

if upstream_fmt == "alpine":
# RSA verification fields are alpine-only
row.append(
click.style(
maybe_truncate_string(str(u.get("rsa_key_inline", "") or "")),
fg="yellow",
)
)
Comment on lines +69 to +76
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

The new Alpine-only RSA columns are only exercised in the pretty/table output path, but the existing upstream command tests cover JSON output only. Add/extend a CLI test that runs cloudsmith upstream alpine ls with the default (pretty) output and asserts the RSA headers/values are present to prevent regressions in column alignment/order.

Copilot uses AI. Check for mistakes.
row.append(click.style(str(u.get("rsa_key_url", "") or ""), fg="yellow"))
row.append(click.style(str(u.get("rsa_verification", "")), fg="yellow"))
row.append(
click.style(str(u.get("rsa_verification_status", "")), fg="yellow")
)
Comment on lines +78 to +81
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

rsa_verification / rsa_verification_status are rendered with str(u.get(..., "")) and will show the literal string "None" if the API returns nulls for these optional fields. Use the same or "" pattern as the other optional columns so unset values display as empty strings in table output.

Suggested change
row.append(click.style(str(u.get("rsa_verification", "")), fg="yellow"))
row.append(
click.style(str(u.get("rsa_verification_status", "")), fg="yellow")
)
row.append(
click.style(str(u.get("rsa_verification", "") or ""), fg="yellow")
)
row.append(
click.style(
str(u.get("rsa_verification_status", "") or ""), fg="yellow"
)
)

Copilot uses AI. Check for mistakes.

if upstream_fmt == "deb":
# `Component`, `Distribution Versions` and `Upstream Distribution` are deb-only
row.append(click.style(str(u.get("component", None)), fg="yellow"))
Expand Down Expand Up @@ -104,6 +118,12 @@ def build_row(u):
"Verify SSL",
]

if upstream_fmt == "alpine":
headers.append("RSA Key Inline")
headers.append("RSA Key URL")
headers.append("RSA Verification")
headers.append("RSA Verification Status")

if upstream_fmt == "deb":
headers.append("Component")
headers.append("Distribution Versions")
Expand Down
Loading