linode / linode-blockstorage-csi-driver

Container Storage Interface (CSI) Driver for Linode Block Storage
Apache License 2.0
68 stars 57 forks source link

Improve error handling for csi-sanity and fix for failing sanity tests #229

Closed komer3 closed 2 months ago

komer3 commented 2 months ago

Due to previous change with how we now handle getting mount source to close luks volume, it introduced test failures in the csi-sanity tests which went unnoticed. This PR fixes the issue and improved the error propagation from the csi-sanity script.

Example error from CSI-Sanity tests:

<*errors.errorString | 0xc000404230>{ s: "NodeUnstageVolume for volume ID 6076319-sanitynodefull17047E444ED144616 failed: rpc error: code = Internal desc = Failed to close the luks volume 6076319-sanitynodefull17047E444ED144616: rpc error: code = Internal desc = closeLuksMountSource failed to get mount source 6076319-sanitynodefull17047E444ED144616: invalid input: second part must start with 'pvc'", },

General:

Pull Request Guidelines:

  1. [ ] Does your submission pass tests?
  2. [ ] Have you added tests?
  3. [ ] Are you addressing a single feature in this PR?
  4. [ ] Are your commits atomic, addressing one change per commit?
  5. [ ] Are you following the conventions of the language?
  6. [ ] Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. [ ] Have you explained your rationale for why this feature is needed?
  8. [ ] Have you linked your PR to an open issue
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 38.46%. Comparing base (1fa133b) to head (9156e93). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/driver/errors.go 0.00% 2 Missing :warning:
internal/driver/nodeserver.go 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #229 +/- ## ========================================== - Coverage 38.58% 38.46% -0.13% ========================================== Files 24 24 Lines 1954 1955 +1 ========================================== - Hits 754 752 -2 - Misses 1165 1168 +3 Partials 35 35 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.