Skip to content
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

update-release command is swallowing errors #520

Open
ctlong opened this issue Jan 22, 2025 · 0 comments
Open

update-release command is swallowing errors #520

ctlong opened this issue Jan 22, 2025 · 0 comments
Labels

Comments

@ctlong
Copy link
Member

ctlong commented Jan 22, 2025

Describe the bug

kiln update-release... where release sources fail to authenticate returns a generic error that does not make it clear what the problem is.

E.g.

$ kiln update-release -n RELEASE -vf vars.yml -v VERSION
Searching for the release...
2025/01/21 17:31:23 could not execute "update-release": couldn't find "RELEASE" VERSION in any release source

Reproduction steps

  1. Have a Kilnfile with >2 release sources
  2. Misconfigure one of the access tokens or other creds for a release source
  3. Run kiln update-release... for a release from a release source that is set up correctly

Expected behavior

A good error message that indicates that the failure is with authenticating a specific release source, or skipping that release source and continuing to check all the other release sources.

Additional context

Error is swallowed here:

if err != nil {
if component.IsErrNotFound(err) {
return fmt.Errorf("error finding the release: %w", err)
}
return fmt.Errorf("couldn't find %q %s in any release source", u.Options.Name, u.Options.Version)
}

@ctlong ctlong added the bug label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant