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

fix: remove default platform option from linter tests #5103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsternberg
Copy link
Collaborator

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.

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]>
@jsternberg
Copy link
Collaborator Author

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 InvalidBaseImagePlatform. For example, could this interfere with multi-platform builds?

attrs := lintTest.FrontendAttrs
if attrs == nil {
attrs = map[string]string{
"platform": "linux/amd64,linux/arm64",
Copy link
Member

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.

Copy link
Collaborator

@daghack daghack Jun 28, 2024

Choose a reason for hiding this comment

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

88b2f70efa

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.

Copy link
Member

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?

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.

None yet

3 participants