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

ANXKUBE-1123: fix InstanceType when disk_type is missing #292

Merged
2 commits merged into from
Apr 25, 2024

Conversation

ghost
Copy link

@ghost ghost commented Apr 25, 2024

Checklist

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request

@ghost ghost self-assigned this Apr 25, 2024
@ghost ghost force-pushed the fix-instance-type-missing-diskperformancetype branch from bcfe140 to 7276bf2 Compare April 25, 2024 11:08
Copy link
Collaborator

@LittleFox94 LittleFox94 left a comment

Choose a reason for hiding this comment

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

should fix the problem just fine and you can merge it like this, but I would have refactored to code close to what I wrote in chat ^^

components := []string{
	fmt.Sprintf("C%v", cores),
	fmt.Sprintf("M%v", ram),
	largestDisk.DiskType, // ok, this would be added in an if(largestDisk) { append.. }
}
instanceType := strings.Join(
	slices.DeleteFunc(
		components,
		func(s string) bool { return s == "" },
	),
	"-",
)

Copy link

codeclimate bot commented Apr 25, 2024

Code Climate has analyzed commit 9155382 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 57.4% (0.1% change).

View more on Code Climate.

@ghost ghost force-pushed the fix-instance-type-missing-diskperformancetype branch from ede854e to 9155382 Compare April 25, 2024 11:34
@LittleFox94 LittleFox94 added bug Something isn't working maintenance patch labels Apr 25, 2024
@ghost ghost merged commit 71f470c into main Apr 25, 2024
9 checks passed
@nachtjasmin nachtjasmin deleted the fix-instance-type-missing-diskperformancetype branch July 22, 2024 07:24
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maintenance patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant