Skip to content

refactor(*): make "not found" error message user-friendly - #5460

Merged
bacongobbler merged 2 commits into
helm:masterfrom
selslack:fix/update-not-found-error-text
Mar 25, 2019
Merged

bacongobbler merged 2 commits into
helm:masterfrom
selslack:fix/update-not-found-error-text

Conversation

@selslack

Copy link
Copy Markdown

What this PR does / why we need it:
Improved error message for users experiencing error described in #1193.

Special notes for your reviewer:

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

@helm-bot helm-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 16, 2019
Comment thread pkg/kube/client.go Outdated
kind := info.Mapping.GroupVersionKind.Kind
return fmt.Errorf("no %s with the name %q found", kind, info.Name)
return fmt.Errorf(
"%s %q is not managed by Helm; delete the resource from the current cluster state to let Helm manage it",

@bacongobbler bacongobbler Mar 22, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we please change the error message to

kind %s with the name %q already exists in the cluster and wasn't defined in the previous release. Before upgrading, please either delete the resource from the cluster or remove it from the chart.

This error can also occur if another chart is managing the resource, so "is not managed by Helm" is not always true.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done.

Comment thread pkg/kube/client.go Outdated

originalInfo := original.Get(info)

// Resource exists in the current cluster state, but not in the current helm configuration

@bacongobbler bacongobbler Mar 22, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please change this to

The resource already exists in the cluster, but it wasn't defined in the previous release. In this case, we consider it to be a resource that was previously un-managed by the release and error out, asking for the user to intervene.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done.

@helm-bot helm-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 25, 2019
@bacongobbler
bacongobbler merged commit 15d5dee into helm:master Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants