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

ci: enable DockerPluginSuite (integration-cli) #41559

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

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Oct 16, 2020

.
relates to #41533 (comment)

This enables the following tests;

./integration-cli/docker_cli_plugins_test.go:31:func (ps *DockerPluginSuite) TestPluginBasicOps(c *testing.T) {
./integration-cli/docker_cli_plugins_test.go:59:func (ps *DockerPluginSuite) TestPluginForceRemove(c *testing.T) {
./integration-cli/docker_cli_plugins_test.go:119:func (ps *DockerPluginSuite) TestPluginInstallDisable(c *testing.T) {
./integration-cli/docker_cli_plugins_test.go:147:func (ps *DockerPluginSuite) TestPluginSet(c *testing.T) {
./integration-cli/docker_cli_plugins_test.go:194:func (ps *DockerPluginSuite) TestPluginInstallArgs(c *testing.T) {
./integration-cli/docker_cli_plugins_test.go:209:func (ps *DockerPluginSuite) TestPluginInstallImage(c *testing.T) {
./integration-cli/docker_cli_plugins_test.go:223:func (ps *DockerPluginSuite) TestPluginEnableDisableNegative(c *testing.T) {
./integration-cli/docker_cli_plugins_test.go:242:func (ps *DockerPluginSuite) TestPluginCreate(c *testing.T) {
./integration-cli/docker_cli_plugins_test.go:271:func (ps *DockerPluginSuite) TestPluginInspect(c *testing.T) {
./integration-cli/docker_cli_plugins_test.go:329:func (ps *DockerPluginSuite) TestPluginIDPrefix(c *testing.T) {
./integration-cli/docker_cli_plugins_test.go:383:func (ps *DockerPluginSuite) TestPluginListDefaultFormat(c *testing.T) {

@thaJeztah
Copy link
Member Author

ARGH CI is failing, because it looks like some vanity domain went AWOL;

https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-41559/1/pipeline/207

[2020-10-16T10:48:26.792Z] #47 [golangci_lint 1/1] RUN --mount=type=cache,target=/root/.cache/go-build ...
[2020-10-16T10:48:26.792Z] #47 139.9 package 4d63.com/gochecknoglobals/checknoglobals: unrecognized import path "4d63.com/gochecknoglobals/checknoglobals" (parse https://4d63.com/gochecknoglobals/checknoglobals?go-get=1: no go-import meta tags ())

https://4d63.com/gochecknoglobals/checknoglobals?go-get=1: gives a 404

But https://4d63.com/gochecknoglobals/ exists (so import path should be 4d63.com/gochecknoglobals/ ??

@thaJeztah
Copy link
Member Author

Looks like this broke it golangci/golangci-lint#1422

But also means that (again) we're somehow installing golang-ci-lint master, not the specified version 😞

@thaJeztah
Copy link
Member Author

Need something similar to #41151 for golang-ci-lint

@thaJeztah
Copy link
Member Author

Opened #41560 to fix CI

@thaJeztah thaJeztah force-pushed the Jenkinsfile_DockerPluginSuite branch from d830503 to b55b2b8 Compare October 16, 2020 15:56
@thaJeztah
Copy link
Member Author

Rebased to get the fix from #41560 in

@cpuguy83
Copy link
Member

Nice, failing as expected without #41533

@thaJeztah
Copy link
Member Author

Ah, great that's what i wanted

@thaJeztah
Copy link
Member Author

rebased

@thaJeztah thaJeztah force-pushed the Jenkinsfile_DockerPluginSuite branch from b55b2b8 to 6324bd2 Compare October 22, 2020 18:57
Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah
Copy link
Member Author

This may be a genuine failure;

=== RUN   TestDockerPluginSuite/TestPluginInstallImage
    --- FAIL: TestDockerPluginSuite/TestPluginInstallImage (15.17s)
        docker_cli_plugins_test.go:220: assertion failed: expression is false: strings.Contains(out, `Encountered remote "application/vnd.docker.container.image.v1+json"(image) when fetching`)

Will have to update that test to see what the actual output is

@thaJeztah thaJeztah force-pushed the Jenkinsfile_DockerPluginSuite branch from 6324bd2 to f20fac5 Compare October 26, 2020 15:06
@@ -217,7 +217,7 @@ func (ps *DockerPluginSuite) TestPluginInstallImage(c *testing.T) {

out, _, err := dockerCmdWithError("plugin", "install", repoName)
assert.ErrorContains(c, err, "")
assert.Assert(c, strings.Contains(out, `Encountered remote "application/vnd.docker.container.image.v1+json"(image) when fetching`))
assert.Assert(c, strings.Contains(out, `Encountered remote "application/vnd.docker.container.image.v1+json"(image) when fetching`), out)
Copy link
Member

Choose a reason for hiding this comment

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

cmp.Contains should take care of this.

docker_cli_plugins_test.go:221: assertion failed: string "Error response from daemon: application/vnd.docker.distribution.manifest.v1+prettyjws not supported\n" does not contain "Encountered remote \"application/vnd.docker.container.image.v1+json\"(image) when fetching"

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, yes, I can replace those in this file.

Is the output it received here (application/vnd.docker.distribution.manifest.v1+prettyjws not supported) the expected output? (So should the test just be updated to match the other error?) or is there a bug at hand?

Copy link
Member

Choose a reason for hiding this comment

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

🤷 This looks like a schema1 manifest?
Seems like the media type changed as is, and then we've also moved this to use containerd distribution instead of docker/distribution.

It probably doesn't make sense to even support schema1 manifests for plugins... but I guess we could tell it to convert for us.

@thaJeztah thaJeztah force-pushed the Jenkinsfile_DockerPluginSuite branch 2 times, most recently from fa78597 to 3ab3d62 Compare October 27, 2020 19:47
@thaJeztah thaJeztah force-pushed the Jenkinsfile_DockerPluginSuite branch from 3ab3d62 to f1b4043 Compare June 25, 2021 11:11
@thaJeztah thaJeztah force-pushed the Jenkinsfile_DockerPluginSuite branch from f1b4043 to ba011fc Compare July 27, 2021 13:49
@neersighted
Copy link
Member

Closed for now as this CI-failing test is tracked in another issue and this step was removed from the Jenkinsfile

@thaJeztah thaJeztah force-pushed the Jenkinsfile_DockerPluginSuite branch from f01482d to 2d657cd Compare August 24, 2023 12:59
@thaJeztah
Copy link
Member Author

Interesting; getting some panics on Jenkins

=== RUN   TestDockerAPISuite/TestContainerAPICommit
    docker_api_containers_test.go:448: assertion failed: 
        Command:  /usr/local/cli-integration/docker run --name=testapicommit busybox /bin/sh -c touch /test
        ExitCode: 2
        Error:    exit status 2
        Stdout:   
        Stderr:   panic: runtime error: invalid memory address or nil pointer dereference
        [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x426bc]
        
        goroutine 1 [running]:
        github.com/docker/cli/cli/command/container.runContainer(0x40000c0480, 0x40004261e0, 0x4000418500, 0x400000c090)
        	/go/src/github.com/docker/cli/cli/command/container/run.go:171 +0x4dc
        github.com/docker/cli/cli/command/container.runRun(0x40000c0480, 0x913638?, 0x40000c0480?, 0x7e507a?)
        	/go/src/github.com/docker/cli/cli/command/container/run.go:94 +0xc4
        github.com/docker/cli/cli/command/container.NewRunCommand.func1(0x4000424fc0?, {0x4000364d20?, 0x5?, 0x5?})
        	/go/src/github.com/docker/cli/cli/command/container/run.go:48 +0xd8
        github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).execute(0x4000424fc0, {0x40000c4020, 0x5, 0x5})
        	/go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:646 +0x380
        github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x40000db680)
        	/go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:742 +0x21c
        github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).Execute(...)
        	/go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:695
        main.main()
        	/go/src/github.com/docker/cli/cmd/docker/docker.go:168 +0x74
        
        goroutine 19 [IO wait]:
        internal/poll.runtime_pollWait(0xffff70e3a918, 0x72)
        	/usr/local/go/src/runtime/netpoll.go:306 +0xa0
        internal/poll.(*pollDesc).wait(0x40003f6880?, 0x4000447000?, 0x0)
        	/usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x28
        internal/poll.(*pollDesc).waitRead(...)
        	/usr/local/go/src/internal/poll/fd_poll_runtime.go:89
        internal/poll.(*FD).Read(0x40003f6880, {0x4000447000, 0x1000, 0x1000})
        	/usr/local/go/src/internal/poll/fd_unix.go:167 +0x200
        net.(*netFD).Read(0x40003f6880, {0x4000447000?, 0x40000a6c28?, 0x158ac?})
        	/usr/local/go/src/net/fd_posix.go:55 +0x28
        net.(*conn).Read(0x40000be590, {0x4000447000?, 0x0?, 0x40000021a0?})
        	/usr/local/go/src/net/net.go:183 +0x34
        net/http.(*persistConn).Read(0x4000468900, {0x4000447000?, 0x15780?, 0x4000042060?})
        	/usr/local/go/src/net/http/transport.go:1943 +0x50
        bufio.(*Reader).fill(0x400046efc0)
        	/usr/local/go/src/bufio/bufio.go:106 +0xfc
        bufio.(*Reader).Peek(0x400046efc0, 0x1)
        	/usr/local/go/src/bufio/bufio.go:144 +0x60
        net/http.(*persistConn).readLoop(0x4000468900)
        	/usr/local/go/src/net/http/transport.go:2107 +0x140
        created by net/http.(*Transport).dialConn
        	/usr/local/go/src/net/http/transport.go:1765 +0x1154
        
        goroutine 20 [select]:
        net/http.(*persistConn).writeLoop(0x4000468900)
        	/usr/local/go/src/net/http/transport.go:2410 +0x9c
        created by net/http.(*Transport).dialConn
        	/usr/local/go/src/net/http/transport.go:1766 +0x119c
        
        goroutine 35 [syscall]:
        os/signal.signal_recv()
        	/usr/local/go/src/runtime/sigqueue.go:152 +0x30
        os/signal.loop()
        	/usr/local/go/src/os/signal/signal_unix.go:23 +0x1c
        created by os/signal.Notify.func1.1
        	/usr/local/go/src/os/signal/signal.go:151 +0x28
        
        
        Failures:
        ExitCode was 2 expected 0
        Expected no error
    --- FAIL: TestDockerAPISuite/TestContainerAPICommit (0.05s)

@vvoland
Copy link
Contributor

vvoland commented Aug 25, 2023

This is just a cli panic when attachContainer returns with error in v17.06.2-ce.
It was fixed in v17.07 (docker/cli#303).

@thaJeztah
Copy link
Member Author

Ah, thanks for that link! Can be fully ignored then (I thought I'd post it just in case there was something weird)

@thaJeztah thaJeztah force-pushed the Jenkinsfile_DockerPluginSuite branch from 2d657cd to c8e6159 Compare December 8, 2023 13:03
@thaJeztah thaJeztah changed the title Jenkinsfile: enable DockerPluginSuite (integration-cli) ci: enable DockerPluginSuite (integration-cli) Dec 8, 2023
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the Jenkinsfile_DockerPluginSuite branch from c8e6159 to 5f1884b Compare January 20, 2024 19:11
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.

None yet

4 participants