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
Bug 1535182 - adding ability to retrieve an array of sub configs #655
Conversation
* Fixing registry unique name regression. * Adding ability to get an array of sub configs. * Handling the case that final object is an array will return an array now. * if not the final key, will still attempt to look into array based on name then type.
Changes Unknown when pulling da5a439 on shawn-hurley:bug-1535182 into ** on openshift:master**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, looks good to me.
} | ||
names[registry.RegistryName()] = true | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took me a while to get this, but yep it makes sense :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A Set
is too high level for go. Maps are much better. /s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly what I was thinking. Made my bugfix pretty trivial, thanks 👍
@@ -449,3 +450,13 @@ func convertAPIRbacToK8SRbac(apiRole *apirbac.ClusterRole) *rbac.ClusterRole { | |||
Rules: rules, | |||
} | |||
} | |||
|
|||
func validateRegistryNames(registrys []registries.Registry) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: registrys -> registries
Describe what this PR does and why we need it:
Adds ability for the config package to handle an array of elements
Changes proposed in this pull request
now.
the name then type.
Does this PR depend on another PR (Use this to track when PRs should be merged)
depends-on
Which issue this PR fixes (This will close that issue when PR gets merged)
fixes #644