Skip to content

feat(ENG-11221): modify alpine upstream rsa fields#284

Open
poconnor-cloud wants to merge 1 commit intomasterfrom
ENG-11221-poconnor-alpine-rsa-cli
Open

feat(ENG-11221): modify alpine upstream rsa fields#284
poconnor-cloud wants to merge 1 commit intomasterfrom
ENG-11221-poconnor-alpine-rsa-cli

Conversation

@poconnor-cloud
Copy link
Copy Markdown

Description

Add CLI support for the new RSA signature verification fields on Alpine upstreams. The web-server API now exposes rsa_key_inline, rsa_key_url, rsa_verification, and rsa_verification_status on Alpine upstream configs. This change surfaces those fields in the cloudsmith upstream alpine ls table output.

Create and update commands require no changes since they pass JSON config directly to the API.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Other (please describe)

Additional Notes

Requires a cloudsmith-api SDK bump when the new SDK version ships with the updated AlpineUpstream model; until then, the fields will gracefully show empty strings via

Copilot AI review requested due to automatic review settings April 8, 2026 18:34
@poconnor-cloud poconnor-cloud requested a review from a team as a code owner April 8, 2026 18:34
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

Adds CLI table output support for Alpine upstream RSA signature verification fields, aligning cloudsmith upstream alpine ls with newly exposed API configuration properties.

Changes:

  • Appends Alpine-only RSA fields to upstream table rows (rsa_key_inline, rsa_key_url, rsa_verification, rsa_verification_status).
  • Adds corresponding Alpine-only table headers for the new RSA fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +78 to +81
row.append(click.style(str(u.get("rsa_verification", "")), fg="yellow"))
row.append(
click.style(str(u.get("rsa_verification_status", "")), fg="yellow")
)
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.
Comment on lines +69 to +76
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",
)
)
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.
@poconnor-cloud poconnor-cloud changed the title modify alpine upstream rsa fields feat(ENG-11221): modify alpine upstream rsa fields Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants