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

processor map values need - to prevent mapping to wrong processor #9

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

cfullen11
Copy link

This PR fixes a bug when mapping processors to instance types. When ranging over maps order is not guaranteed, even if order was enforced you could match instancetype abc to processor ab. By adding the hyphen we should ensure an exact prefix match.

Also added testing around this function we could add more testing in the future for the machine pools.

go fmt

lint

lint

move processors to its own package and use it in machines

move processors to its own package and use it in machines

add package comment

move get processor func to util

fmt

add period to comment

simplify the pointer defref
@mytunguyen mytunguyen merged commit ed02593 into nr-main Mar 28, 2024
3 checks passed
@mytunguyen mytunguyen deleted the bugfix-cpu-platform branch March 28, 2024 18:06
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.

3 participants