-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
static checks #8071
static checks #8071
Conversation
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
/kind changelog-not-required |
/kind changelog-not-required |
https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/nilness#cond:~:text=p%20%3A%3D%20%26v%0A...%0Aif%20p%20!%3D%20nil%20%7B%20//%20tautological%20condition%0A%7D Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8071 +/- ##
==========================================
- Coverage 58.79% 58.76% -0.04%
==========================================
Files 357 358 +1
Lines 29841 30107 +266
==========================================
+ Hits 17545 17692 +147
- Misses 10851 10967 +116
- Partials 1445 1448 +3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid similar problems in the future, we need to fix #7581
@@ -311,7 +311,7 @@ func (ctx *finalizerContext) patchDynamicPVWithVolumeInfo() (errs results.Result | |||
// We are handling a common but specific scenario where a PVC is in a pending state and uses a storage class with | |||
// VolumeBindingMode set to WaitForFirstConsumer. In this case, the PV patch step is skipped to avoid | |||
// failures due to the PVC not being bound, which could cause a timeout and result in a failed restore. | |||
if pvc != nil && pvc.Status.Phase == v1.ClaimPending { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we do pvc.status == nil?
That could be nil right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried and got an error
Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes #(issue)
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.