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

[controller] Fix naming bug by removing previous partUUID fix. Refactor name generation. Add test for device name. #21

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

AleksZimin
Copy link
Member

@AleksZimin AleksZimin commented Feb 1, 2024

Description

This PR removes a previous partUUID fix because it unintentionally broke the naming logic for block devices of type 'part'.
To improve testing and ensure accurate naming, we refactored the code to introduce a specific name generation function and added a test for this functionality.

Why do we need it, and what problem does it solve?

This PR corrects a bug introduced by a previous update that disrupted the correct naming of devices. By removing the problematic fix and adding a new test, it ensures that device names are generated correctly in the future, preventing confusion or errors in device identification.

What is the expected result?

The expected result is that the proper mechanism for naming devices will be back in place, making sure every device is named correctly. The added test will help minimize the chance of any future issues, ensuring a more dependable naming process.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Signed-off-by: Aleksandr Zimin <[email protected]>
@AleksZimin AleksZimin self-assigned this Feb 1, 2024
@AleksZimin AleksZimin added the bug Something isn't working label Feb 1, 2024
@AleksZimin AleksZimin requested a review from dxavx February 2, 2024 07:48
@AleksZimin AleksZimin changed the title [controller] Add test for device name. Remove unnecessary partUUID fix [controller] Fix bug in naming, remove previous partUUID fix. Refactor name generation. Add test for device name. Feb 2, 2024
@AleksZimin AleksZimin changed the title [controller] Fix bug in naming, remove previous partUUID fix. Refactor name generation. Add test for device name. [controller] Fix naming bug by removing previous partUUID fix. Refactor name generation. Add test for device name. Feb 2, 2024
@AleksZimin AleksZimin marked this pull request as ready for review February 2, 2024 09:33
@AleksZimin AleksZimin merged commit 8f3357d into main Feb 2, 2024
3 of 4 checks passed
@AleksZimin AleksZimin deleted the add-test-for-device-name branch February 2, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants