Skip to content

Bugfix: removeVolumePrefixFromName#534

Merged
ChristianAtDell merged 3 commits into
mainfrom
usr/ccoff/vol-prefix-bugfix
Aug 8, 2025
Merged

Bugfix: removeVolumePrefixFromName#534
ChristianAtDell merged 3 commits into
mainfrom
usr/ccoff/vol-prefix-bugfix

Conversation

@ChristianAtDell

@ChristianAtDell ChristianAtDell commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Description

#529 introduced a bug with trimming prefixes. This PR handles that with a cleaner prefix-trim, and adds unit tests.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
https://github.com/dell/csm/issues/1896

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

See unit tests attached. It was also tested with an image built that has passed OCP E2E tests.

JacobGros
JacobGros previously approved these changes Aug 8, 2025

@JacobGros JacobGros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM
Might be a good idea to add a UT for a case where the prefix occurs multiple times in the volume name.

JacobGros
JacobGros previously approved these changes Aug 8, 2025
Comment thread pkg/node/node_test.go Outdated

@JacobGros JacobGros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actions

github-actions Bot commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/csi-powerstore/pkg/node 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/csi-powerstore/pkg/node/node.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/dell/csi-powerstore/pkg/node/node_test.go

@donatwork donatwork left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The comment seems unnecessary but I'll ignore it for now :)

@ChristianAtDell ChristianAtDell merged commit 53d6447 into main Aug 8, 2025
6 checks passed
@ChristianAtDell ChristianAtDell deleted the usr/ccoff/vol-prefix-bugfix branch August 8, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants