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

static checks #8071

Merged
merged 3 commits into from
Aug 4, 2024
Merged

static checks #8071

merged 3 commits into from
Aug 4, 2024

Conversation

kaovilai
Copy link
Member

@kaovilai kaovilai commented Aug 1, 2024

  • Unused parameters
  • unused write to field Spec
  • tautological condition: non-nil != nil

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:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

kaovilai added 2 commits July 31, 2024 22:15
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
@kaovilai
Copy link
Member Author

kaovilai commented Aug 1, 2024

/kind changelog-not-required

@github-actions github-actions bot added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Aug 1, 2024
@github-actions github-actions bot added has-unit-tests and removed kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes labels Aug 1, 2024
@kaovilai
Copy link
Member Author

kaovilai commented Aug 1, 2024

/kind changelog-not-required

@github-actions github-actions bot added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Aug 1, 2024
Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 58.76%. Comparing base (7811b9f) to head (6d0d1aa).
Report is 2 commits behind head on main.

Files Patch % Lines
pkg/controller/restore_finalizer_controller.go 0.00% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

@kaovilai kaovilai closed this Aug 1, 2024
@kaovilai kaovilai reopened this Aug 1, 2024
@github-actions github-actions bot requested a review from reasonerjt August 1, 2024 13:18
Copy link
Contributor

@mateusoliveira43 mateusoliveira43 left a 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 {
Copy link
Collaborator

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

#8071 (comment)

Tried and got an error

@blackpiglet blackpiglet merged commit d4e743b into vmware-tanzu:main Aug 4, 2024
85 of 89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-unit-tests kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants