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: upgrade hook job npe #8780

Open
wants to merge 1 commit into
base: release-0.9
Choose a base branch
from

Conversation

sophon-zt
Copy link
Contributor

No description provided.

@sophon-zt sophon-zt requested a review from a team as a code owner January 9, 2025 09:39
@github-actions github-actions bot added the size/S Denotes a PR that changes 10-29 lines. label Jan 9, 2025
@sophon-zt sophon-zt linked an issue Jan 9, 2025 that may be closed by this pull request
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.66%. Comparing base (17a521d) to head (2dddfd7).

Additional details and impacted files
@@               Coverage Diff               @@
##           release-0.9    #8780      +/-   ##
===============================================
+ Coverage        64.56%   64.66%   +0.09%     
===============================================
  Files              359      359              
  Lines            46301    46301              
===============================================
+ Hits             29896    29941      +45     
+ Misses           13725    13692      -33     
+ Partials          2680     2668      -12     
Flag Coverage Δ
unittests 64.66% <ø> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@apecloud-bot apecloud-bot added the approved PR Approved Test label Jan 10, 2025
func IgnoreKubeblocksHook(ctx context.Context, client *kubernetes.Clientset, ns string) bool {
deploy, err := GetKubeBlocksDeploy(ctx, client, ns, kubeblocksAppComponent)
if err != nil {
return false
Copy link
Contributor

Choose a reason for hiding this comment

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

The hook will continue running if an error occurs (e.g. network errors). Is it an expected behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is expected. If an error occurs, it should be handled by hook job. The hook job may be processed successfully, or it may fail and try again.

The only case in which upgrading can be ignored: the kubeblocks component is not deployed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, but if a network error occurs, you will not know whether the deployment exists. It would be better to return this error to main() and exit quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR Approved Test size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] kubeblocks helm upgrade-hook-job failed
4 participants