Skip to content

chore(volume): Add nil pointer checks and tests for outputResult func… #623

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

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

Fyusel
Copy link
Contributor

@Fyusel Fyusel commented Feb 21, 2025

fixes: #574

@marceljk
Copy link
Contributor

volumeLabel, err := iaasUtils.GetVolumeName(ctx, apiClient, model.ProjectId, model.VolumeId)
if err != nil {
p.Debug(print.ErrorLevel, "get volume name: %v", err)
volumeLabel = model.VolumeId
}

Could you add an additional check here if the volume name is empty? If it's empty, it should use the volumeId as label
This would solve this issue #574

@Fyusel Fyusel force-pushed the ft/add-nil-checks-volume branch from 31084ad to 99fc799 Compare February 24, 2025 11:15
@rubenhoenle rubenhoenle merged commit b5c5cad into main Feb 25, 2025
3 checks passed
@rubenhoenle rubenhoenle deleted the ft/add-nil-checks-volume branch February 25, 2025 10: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.

cli: stackit volume delete prints empty name
3 participants