pulumi-kubernetes icon indicating copy to clipboard operation
pulumi-kubernetes copied to clipboard

Remove deprecated pkg/errors package

Open blampe opened this issue 9 months ago • 2 comments

errors.Wrap can mask bugs by returning nil errors where a non-nil error was intended. This is most common in situations where multiple errors are being checked and the wrong (nil) error is wrapped:

if err != nil {
    return err
}
if _, otherErr := f(...); otherErr != nil {
    return errors.Wrap(err, ...) // bug
}

From spot checking our usage I don't think we have any cases of this, but we should stop using the deprecated package to be safe. Additionally the native errors package now has Join and other helpers we should be using instead.

Most of this PR was programmatically generated.

blampe avatar May 02 '24 00:05 blampe

Does the PR have any schema changes?

Looking good! No breaking changes found. No new resources/functions.

github-actions[bot] avatar May 02 '24 00:05 github-actions[bot]

Codecov Report

Attention: Patch coverage is 0.81301% with 122 lines in your changes are missing coverage. Please review.

Project coverage is 29.99%. Comparing base (80d60f4) to head (333ebf0).

Files Patch % Lines
provider/pkg/provider/provider.go 0.00% 59 Missing :warning:
provider/pkg/provider/helm_release.go 0.00% 25 Missing :warning:
provider/pkg/await/deployment.go 0.00% 8 Missing :warning:
provider/pkg/await/ingress.go 0.00% 6 Missing :warning:
provider/pkg/provider/invoke_helm_template.go 0.00% 6 Missing :warning:
provider/pkg/await/service.go 0.00% 4 Missing :warning:
provider/pkg/await/statefulset.go 0.00% 4 Missing :warning:
provider/pkg/provider/invoke_kustomize.go 0.00% 4 Missing :warning:
provider/pkg/provider/yaml/v2/yaml.go 20.00% 4 Missing :warning:
provider/pkg/await/job.go 0.00% 1 Missing :warning:
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2990      +/-   ##
==========================================
+ Coverage   29.94%   29.99%   +0.05%     
==========================================
  Files          63       63              
  Lines        8353     8338      -15     
==========================================
  Hits         2501     2501              
+ Misses       5630     5615      -15     
  Partials      222      222              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 02 '24 00:05 codecov[bot]