Skip to content

Conversation

@Mia-Cross
Copy link
Contributor

This PR adds the option to configure the root volume's name.
The Instance API generated the original name of a root volume according to the image it's based on, but this name can be changed after the server's creation, which will be done by the renameRootVolumeIfNeeded function.

The Read function has been modified to fetch volume information from the right source (e.g. the name attribute was always empty for SBS volumes).

In the tests, the check function serverHasNewVolume was a too permissive (for examples it didn't raise any error for empty names), so it has been modified to expect the exact name that the Instance API is going to generate, and not just filter out terraform-generated names.

Closes #3041

@Mia-Cross Mia-Cross self-assigned this Nov 7, 2025
@Mia-Cross Mia-Cross added enhancement instance Instance issues, bugs and feature requests priority:high New features labels Nov 7, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 0% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 1.76%. Comparing base (e9e8231) to head (c3be191).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/services/instance/server.go 0.00% 28 Missing ⚠️
internal/services/instance/types.go 0.00% 19 Missing ⚠️
internal/meta/extractors.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #3456      +/-   ##
=========================================
- Coverage    1.76%   1.76%   -0.01%     
=========================================
  Files         400     400              
  Lines       43839   43862      +23     
=========================================
- Hits          774     772       -2     
- Misses      42978   43002      +24     
- Partials       87      88       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement instance Instance issues, bugs and feature requests priority:high New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the possibility to specify the name for an instance root_volume

2 participants