Skip to content

chore: improving warnings on incorrect or absent configuration #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kieranmanning
Copy link

@kieranmanning kieranmanning commented Apr 12, 2025

Still in progress

What?

Improve Cloudsmith CLI user experience when encountering configuration issues or uncertainties

Why?

Currently, there are a number of potential pitfalls around config management for the Cloudsmith CLI. These include:

  1. No warnings when commands are passed non-existent profiles
  2. No warnings when commands are run with zero discovered configuration
  3. Normally remote commands appear to complete successfully despite not authenticating against, or reaching, any Cloudsmith instance

Acceptance Criteria (Is It Done?)

  1. Incorrect --profile values result in warnings to users
  2. The CLI expects to find some kind of accurate configuration and warns if not
  3. Commands which expect API responses warn when none are returned, indicating likely authentication failure

Screenshots

image

Copy link

@Copilot 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.

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

Files not reviewed (1)
  • .envrc: Language not supported

fg="yellow",
)
click.secho(
f"You're currently attemping to connect to Cloudsmith instance {cloudsmith_host}",
Copy link
Preview

Copilot AI Apr 12, 2025

Choose a reason for hiding this comment

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

The word 'attemping' is misspelled. It should be 'attempting'.

Suggested change
f"You're currently attemping to connect to Cloudsmith instance {cloudsmith_host}",
f"You're currently attempting to connect to Cloudsmith instance {cloudsmith_host}",

Copilot uses AI. Check for mistakes.

@@ -101,6 +102,9 @@ def get(ctx, opts, owner_repo, page, page_size):

click.echo("Getting list of repositories ... ", nl=False, err=use_stderr)

repo = None
Copy link
Preview

Copilot AI Apr 12, 2025

Choose a reason for hiding this comment

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

The variable 'repo' is assigned but never used. Consider removing it to clean up the code.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant