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

chore: fix unstable UT in storageprovider_controller_test.go #8397

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

zjx20
Copy link
Contributor

@zjx20 zjx20 commented Nov 5, 2024

https://github.com/apecloud/kubeblocks/actions/runs/11622958513/job/32369246442

[FAILED] Unexpected error:
      <*errors.StatusError | 0xc0029db0e0>: 
      Operation cannot be fulfilled on storageproviders.dataprotection.kubeblocks.io "storageprovider-6jdjq": the object has been modified; please apply your changes to the latest version and try again
      {
          ErrStatus: {
              TypeMeta: {Kind: "", APIVersion: ""},
              ListMeta: {
                  SelfLink: "",
                  ResourceVersion: "",
                  Continue: "",
                  RemainingItemCount: nil,
              },
              Status: "Failure",
              Message: "Operation cannot be fulfilled on storageproviders.dataprotection.kubeblocks.io \"storageprovider-6jdjq\": the object has been modified; please apply your changes to the latest version and try again",
              Reason: "Conflict",
              Details: {
                  Name: "storageprovider-6jdjq",
                  Group: "dataprotection.kubeblocks.io",
                  Kind: "storageproviders",
                  UID: "",
                  Causes: nil,
                  RetryAfterSeconds: 0,
              },
              Code: 409,
          },
      }
  occurred
  In [It] at: /home/runner/work/kubeblocks/kubeblocks/controllers/dataprotection/storageprovider_controller_test.go:137 @ 11/01/24 02:10:35.318
------------------------------
••••••••••••••W1101 02:10:46.013852   31[417](https://github.com/apecloud/kubeblocks/actions/runs/11622958513/job/32369246442#step:6:418) reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1.CSIDriver ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.013937   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1alpha1.Restore ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.013997   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1alpha1.BackupPolicy ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.014056   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1alpha1.BackupPolicyTemplate ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.014112   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1alpha1.BackupSchedule ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.014681   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1alpha1.ActionSet ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.014761   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1.ComponentDefinition ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.014818   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1.VolumeSnapshot ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.014871   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1alpha1.Backup ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.014922   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1.StorageClass ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.014977   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1.PersistentVolumeClaim ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.015032   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1alpha1.StorageProvider ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.015097   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1alpha1.BackupRepo ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.015151   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1.Secret ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.015207   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1.CronJob ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.015372   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1.StatefulSet ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
W1101 02:10:46.015[450](https://github.com/apecloud/kubeblocks/actions/runs/11622958513/job/32369246442#step:6:451)   31417 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.2/tools/cache/reflector.go:229: watch of *v1.Pod ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding


Summarizing 1 Failure:
  [FAIL] StorageProvider controller StorageProvider controller test [It] should reconcile a StorageProvider base on the status of the CSI driver object
  /home/runner/work/kubeblocks/kubeblocks/controllers/dataprotection/storageprovider_controller_test.go:137

Ran 100 of 100 Specs in 79.165 seconds
FAIL! -- 99 Passed | 1 Failed | 0 Pending | 0 Skipped

@zjx20 zjx20 requested review from ldming, wangyelei and a team as code owners November 5, 2024 04:09
@github-actions github-actions bot added the size/S Denotes a PR that changes 10-29 lines. label Nov 5, 2024
@apecloud-bot
Copy link
Collaborator

This branch name is not following the standards: feature/|bugfix/|release/|hotfix/|support/|releasing/|dependabot/

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.28%. Comparing base (aeb5566) to head (34afe5e).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8397      +/-   ##
==========================================
+ Coverage   61.02%   61.28%   +0.25%     
==========================================
  Files         351      351              
  Lines       41797    41797              
==========================================
+ Hits        25507    25614     +107     
+ Misses      13986    13867     -119     
- Partials     2304     2316      +12     
Flag Coverage Δ
unittests 61.28% <ø> (+0.25%) ⬆️

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 Nov 5, 2024
@zjx20
Copy link
Contributor Author

zjx20 commented Nov 5, 2024

/approve

@zjx20 zjx20 merged commit 25b5850 into main Nov 5, 2024
38 checks passed
@zjx20 zjx20 deleted the chore/fix-unstable-ut branch November 5, 2024 08:31
@github-actions github-actions bot added this to the Release 0.9.2 milestone Nov 5, 2024
wangyelei pushed a commit that referenced this pull request Nov 11, 2024
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.

5 participants