Skip to content

fix: validate hcloud volume labels#1304

Merged
lukasmetzner merged 6 commits intomainfrom
fix-csi-driver-label-validation
Mar 30, 2026
Merged

fix: validate hcloud volume labels#1304
lukasmetzner merged 6 commits intomainfrom
fix-csi-driver-label-validation

Conversation

@lukasmetzner
Copy link
Copy Markdown
Contributor

@lukasmetzner lukasmetzner commented Mar 20, 2026

Validates Hetzner Cloud labels according to their specification in the API docs: https://docs.hetzner.cloud/reference/cloud#description/labels

If the label value exceeds 63 characters it is truncated from the left.

@lukasmetzner lukasmetzner requested a review from a team as a code owner March 20, 2026 08:19
@lukasmetzner lukasmetzner marked this pull request as draft March 20, 2026 08:20
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.14%. Comparing base (05251fb) to head (4e552f6).

Files with missing lines Patch % Lines
internal/driver/controller.go 88.23% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1304      +/-   ##
==========================================
+ Coverage   71.56%   73.14%   +1.57%     
==========================================
  Files          17       17              
  Lines        1477     1493      +16     
==========================================
+ Hits         1057     1092      +35     
+ Misses        334      314      -20     
- Partials       86       87       +1     
Flag Coverage Δ
e2e-controller 58.67% <29.41%> (+2.07%) ⬆️
e2e-node 58.67% <29.41%> (+2.07%) ⬆️
integration 3.26% <0.00%> (-0.05%) ⬇️
unit 41.46% <88.23%> (+0.49%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lukasmetzner
Copy link
Copy Markdown
Contributor Author

We could add additional steps such as truncating, or truncating + hash.

@lukasmetzner lukasmetzner force-pushed the fix-csi-driver-label-validation branch from 484bfbf to 713bdf7 Compare March 30, 2026 09:56
@lukasmetzner lukasmetzner marked this pull request as ready for review March 30, 2026 10:15
@lukasmetzner
Copy link
Copy Markdown
Contributor Author

We can't put ... in the beginning of the truncation as the API requires us to start with an alphanumeric character.

@lukasmetzner lukasmetzner merged commit 412c249 into main Mar 30, 2026
@lukasmetzner lukasmetzner deleted the fix-csi-driver-label-validation branch March 30, 2026 11:31
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.

2 participants