-
Notifications
You must be signed in to change notification settings - Fork 661
Use data driven approach when detecting Alpine:edge and Debian:sid #2556
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
Conversation
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
|
||
// fields populated in the constructor | ||
|
||
major string |
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.
I think having these unexported fields on an exported struct with exported fields including Version
will lead to confusion about populating them. I think we should just remove these and parse the Version string at times it's requested, unless there's a notable performance issue.
|
||
// TODO: this is a temporary workaround... in the long term the mock should more strongly enforce | ||
// data overrides and not require this kind of logic being baked into mocks directly. | ||
func mimicV6DistroTypeOverrides(t distro.Type) distro.Type { |
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.
Are there some tests that rely on this? Longer term, I would prefer if we had a separate step the matchers performed to query the provider for OSes, instead of pushing this logic into the stores where it is opaque. I think that could end up being more clear how the overall matching process works and would potentially avoid having this.
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.
Longer term I'd hope to not have matching that is test specific and matching that is for production. This code was added to get the mocks to pass and is not used in production.
This removes client-side logic for identifying edge or unstable distro kinds and instead leverages the existing OS overrides table for this matching.
Before these changes:
After these changes (needs a local DB build):