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

tests: frontend/dockerfile: add dockerfile lint tests for WCOW #5221

Merged

Conversation

profnandaa
Copy link
Collaborator

@profnandaa profnandaa commented Aug 7, 2024

A number of integration tests were initially skipped on Windows, waiting for their platform-specific translations. See #4485.

This commit enables all the dockerfile linter tests that had been skipped before. Some of the tests did not need any platform specific change since the lint warning were being generated before actual image pull.

@profnandaa profnandaa force-pushed the tests-4485-part-3-dockerfile-lint branch from 558b623 to e4830ca Compare August 8, 2024 09:45
@profnandaa profnandaa force-pushed the tests-4485-part-3-dockerfile-lint branch from e4830ca to 2e92e16 Compare August 20, 2024 08:23
@profnandaa profnandaa marked this pull request as ready for review August 20, 2024 09:31
@profnandaa
Copy link
Collaborator Author

PS. potential merge conflict with #5103 depending on which one lands first.

@profnandaa profnandaa force-pushed the tests-4485-part-3-dockerfile-lint branch from 2e92e16 to 586c206 Compare September 9, 2024 06:47
@profnandaa
Copy link
Collaborator Author

rebased with the latest master.

@profnandaa
Copy link
Collaborator Author

CI failure is unrelated, looks like we need to extend the timeout for the Linux tests too or what new thing could be causing the long waits? @crazy-max

image

@crazy-max
Copy link
Member

Looks like we need to extend the timeout for the Linux tests

Can you give the link to this github actions log? Can't find anything related to this for linux tests.

@profnandaa
Copy link
Collaborator Author

Looks like we need to extend the timeout for the Linux tests

Can you give the link to this github actions log? Can't find anything related to this for linux tests.

@crazy-max -- my bad, this was meant for PR #5139 - https://github.com/moby/buildkit/actions/runs/10769264268/job/29860319420?pr=5139

@profnandaa profnandaa force-pushed the tests-4485-part-3-dockerfile-lint branch from 586c206 to 7e89de8 Compare September 10, 2024 06:51
`)
`,
`
FROM nanoserver AS base
Copy link
Member

Choose a reason for hiding this comment

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

For these Dockerfiles that only differ by the base image define baseImage := integration.UnixOrWindow() instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd thought fmt.Sprintf will be a little ugly but let me fix that...

Copy link
Member

Choose a reason for hiding this comment

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

Can also + integration.UnixOrWindow() + if that is cleaner

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Coz some come in between, might be better to use fmt.Sprintf. I've made here, and the other instances in the PR. PTAL.

@@ -235,7 +235,7 @@ func init() {

images := integration.UnixOrWindows(
[]string{"busybox:latest", "alpine:latest"},
[]string{"nanoserver:latest", "nanoserver:plus"})
[]string{"nanoserver:latest", "nanoserver:plus", "nanoserver:plus-busybox"})
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure these are needed? I don't see busybox:stable ? @daghack

Maybe the test can be rewritten using different tagnames so that we don't need to pull more images just to check the tag string.

@profnandaa profnandaa force-pushed the tests-4485-part-3-dockerfile-lint branch 2 times, most recently from 5c3c98c to c5e8bb3 Compare September 11, 2024 05:33
A number of integration tests were initially skipped on Windows,
waiting for their platform-specific translations. See moby#4485.

This commit enables all the dockerfile linter tests that had
been skipped before.

Some of the tests did not need any platform specific change
since the lint warning were being generated before actual
image pull.

Signed-off-by: Anthony Nandaa <[email protected]>
@profnandaa profnandaa force-pushed the tests-4485-part-3-dockerfile-lint branch from c5e8bb3 to aa096eb Compare September 11, 2024 06:41
@profnandaa
Copy link
Collaborator Author

CI failure looks unrelated?

=== Failed
=== FAIL: client TestClientGatewayIntegration/TestClientGatewayContainerExecPipe/worker=containerd (13.22s)
    build_test.go:508: 
        	Error Trace:	/src/client/build_test.go:508

@thompson-shaun thompson-shaun added this to the v0.17.0 milestone Sep 12, 2024
@tonistiigi tonistiigi merged commit ef2ffe9 into moby:master Sep 12, 2024
92 checks passed
@profnandaa profnandaa deleted the tests-4485-part-3-dockerfile-lint branch September 13, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants