-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: remove default platform option from linter tests #5103
base: master
Are you sure you want to change the base?
Conversation
The progress stream would set the platform to `linux/amd64` and `linux/arm64` during testing. This would trigger the `InvalidBaseImagePlatform` rule whenever an image was pulled (usually alpine). This removes that option as it shouldn't be necessary to run the tests. Signed-off-by: Jonathan A. Sternberg <[email protected]>
I have a small concern with this PR. It seems to fix the tests, but I'm concerned that it may be masking a bug in |
attrs := lintTest.FrontendAttrs | ||
if attrs == nil { | ||
attrs = map[string]string{ | ||
"platform": "linux/amd64,linux/arm64", |
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.
@daghack That was the original intention for this? I guess to check som warning deduplication. In this is needed then it should only be ignored on certain tests (although if it is needed then why isn't the same checked for unmarshal tests). Alternatively there should be some specific tests that specifically check for multi-platform cases.
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.
It seems like it was just a way to keep an old default for the tests when a specific test didn't pass in specific frontend attributes. The old default came because I was emulating where I saw it elsewhere in tests—there shouldn't be any problems with removing 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.
But do we have tests that cover deduplication on warnings. So that when user is building multiple platforms when they do not get the same warnings twice?
The progress stream would set the platform to
linux/amd64
andlinux/arm64
during testing. This would trigger theInvalidBaseImagePlatform
rule whenever an image was pulled (usually alpine).This removes that option as it shouldn't be necessary to run the tests.