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

Fix: Helm Release fails with "the server could not find the requested resource" #2677

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

EronWright
Copy link
Contributor

@EronWright EronWright commented Nov 28, 2023

Proposed changes

Kudos to @cbley-da for identifying the root cause and to @pdf for suggesting a fix, here!

This PR fixes an intermittent problem that resembles:

 kubernetes:helm.sh/v3:Release (mongodb):
    error: 1 error occurred:
    	* Helm release "mongodb/mongodb-456643ba" failed to initialize completely. Use Helm CLI to investigate.: failed to become available within allocated timeout. Error: 
          Helm Release mongodb/mongodb-456643ba: release mongodb-456643ba failed, and has been rolled back due to atomic being set: 
          failed to create resource: the server could not find the requested resource

The problem was that a Go struct (containing a client-go rest config) was being shared and mutated by numerous independent routines. The solution was to copy the struct.

Related issues (optional)

Closes #2481

@EronWright EronWright requested a review from a team November 28, 2023 22:44
@EronWright EronWright added the kind/bug Some behavior is incorrect or out of spec label Nov 28, 2023
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (d90d153) 18.62% compared to head (0e0fbe8) 18.41%.

Files Patch % Lines
provider/pkg/provider/kubeconfig.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2677      +/-   ##
==========================================
- Coverage   18.62%   18.41%   -0.22%     
==========================================
  Files          47       47              
  Lines        9587     9589       +2     
==========================================
- Hits         1786     1766      -20     
- Misses       7697     7724      +27     
+ Partials      104       99       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Does the PR have any schema changes?

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

Copy link
Contributor

@rquitales rquitales left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@EronWright EronWright enabled auto-merge (squash) November 28, 2023 22:53
@EronWright EronWright merged commit b045235 into master Nov 28, 2023
20 checks passed
@EronWright EronWright deleted the issue-2481 branch November 28, 2023 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helm Release tries to call non-existent resources
2 participants