feat(ENG-11221): modify alpine upstream rsa fields#284
feat(ENG-11221): modify alpine upstream rsa fields#284poconnor-cloud wants to merge 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
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.
| row.append(click.style(str(u.get("rsa_verification", "")), fg="yellow")) | ||
| row.append( | ||
| click.style(str(u.get("rsa_verification_status", "")), fg="yellow") | ||
| ) |
There was a problem hiding this comment.
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.
| 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" | |
| ) | |
| ) |
| 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", | ||
| ) | ||
| ) |
There was a problem hiding this comment.
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.
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 lstable output.Create and update commands require no changes since they pass JSON config directly to the API.
Type of Change
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