Skip to content

update-release command is swallowing errors #520

@ctlong

Description

@ctlong

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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions