From 32b25bc01aa4fd4c947df7068683f6ecbb756023 Mon Sep 17 00:00:00 2001 From: apostasie Date: Fri, 9 Aug 2024 10:54:16 -0700 Subject: [PATCH 1/2] Disable test retries Signed-off-by: apostasie --- .github/workflows/test.yml | 35 +++++------------------------------ Dockerfile | 6 +++--- 2 files changed, 8 insertions(+), 33 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 224878934ce..0955a006d80 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -93,12 +93,7 @@ jobs: docker run --privileged --rm tonistiigi/binfmt --install linux/arm64 docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7 - name: "Run integration tests" - uses: nick-fields/retry@v3 - with: - timeout_minutes: 30 - max_attempts: 2 - retry_on: error - command: docker run -t --rm --privileged test-integration + run: docker run -t --rm --privileged test-integration test-integration-ipv6: runs-on: "ubuntu-${{ matrix.ubuntu }}" @@ -149,12 +144,7 @@ jobs: # On the other side, using the host network is easier at configuration. # Besides, each job is running on a different instance, which means using host network here # is safe and has no side effects on others. - uses: nick-fields/retry@v3 - with: - timeout_minutes: 30 - max_attempts: 2 - retry_on: error - command: docker run --network host -t --rm --privileged test-integration-ipv6 + run: docker run --network host -t --rm --privileged test-integration-ipv6 test-integration-rootless: runs-on: "ubuntu-${{ matrix.ubuntu }}" @@ -224,12 +214,7 @@ jobs: fi echo "WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622}" >>$GITHUB_ENV - name: "Test (network driver=slirp4netns, port driver=builtin)" - uses: nick-fields/retry@v3 - with: - timeout_minutes: 30 - max_attempts: 2 - retry_on: error - command: docker run -t --rm --privileged -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} ${TEST_TARGET} + run: docker run -t --rm --privileged -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} ${TEST_TARGET} cross: runs-on: ubuntu-24.04 @@ -279,19 +264,9 @@ jobs: run: | sudo apt-get install -y expect - name: "Ensure that the integration test suite is compatible with Docker" - uses: nick-fields/retry@v3 - with: - timeout_minutes: 30 - max_attempts: 2 - retry_on: error - command: go test -timeout 20m -v -exec sudo ./cmd/nerdctl/... -args -test.target=docker -test.kill-daemon + run: go test -timeout 20m -v -exec sudo ./cmd/nerdctl/... -args -test.target=docker -test.kill-daemon - name: "Ensure that the IPv6 integration test suite is compatible with Docker" - uses: nick-fields/retry@v3 - with: - timeout_minutes: 30 - max_attempts: 2 - retry_on: error - command: go test -timeout 20m -v -exec sudo ./cmd/nerdctl/... -args -test.target=docker -test.kill-daemon -test.ipv6 + run: go test -timeout 20m -v -exec sudo ./cmd/nerdctl/... -args -test.target=docker -test.kill-daemon -test.ipv6 test-integration-windows: runs-on: windows-2022 diff --git a/Dockerfile b/Dockerfile index dca67237b11..4aa8448878b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -318,7 +318,7 @@ RUN curl -o nydus-static.tgz -fsSL --proto '=https' --tlsv1.2 "https://github.co tar xzf nydus-static.tgz && \ mv nydus-static/nydus-image nydus-static/nydusd nydus-static/nydusify /usr/bin/ && \ rm nydus-static.tgz -CMD ["gotestsum", "--format=testname", "--rerun-fails=2", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \ +CMD ["gotestsum", "--format=testname", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \ "--", "-timeout=60m", "-args", "-test.kill-daemon"] FROM test-integration AS test-integration-rootless @@ -343,7 +343,7 @@ VOLUME /home/rootless/.local/share RUN go test -o /usr/local/bin/nerdctl.test -c ./cmd/nerdctl COPY ./Dockerfile.d/test-integration-rootless.sh / CMD ["/test-integration-rootless.sh", \ - "gotestsum", "--format=testname", "--rerun-fails=2", "--raw-command", \ + "gotestsum", "--format=testname", "--raw-command", \ "--", "/usr/local/go/bin/go", "tool", "test2json", "-t", "-p", "github.com/containerd/nerdctl/v2/cmd/nerdctl", \ "/usr/local/bin/nerdctl.test", "-test.v", "-test.timeout=60m", "-test.kill-daemon"] @@ -353,7 +353,7 @@ COPY ./Dockerfile.d/home_rootless_.config_systemd_user_containerd.service.d_port RUN chown -R rootless:rootless /home/rootless/.config FROM test-integration AS test-integration-ipv6 -CMD ["gotestsum", "--format=testname", "--rerun-fails=2", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \ +CMD ["gotestsum", "--format=testname", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \ "--", "-timeout=60m", "-args", "-test.kill-daemon", "-test.ipv6"] FROM base AS demo From 58446ebc9a86bf5c4a6fc02624b38fa77acb23b6 Mon Sep 17 00:00:00 2001 From: apostasie Date: Tue, 13 Aug 2024 10:28:48 -0700 Subject: [PATCH 2/2] Debug IPFS/Compose failure Signed-off-by: apostasie --- cmd/nerdctl/ipfs_compose_linux_test.go | 5 +---- examples/compose-wordpress/docker-compose.stargz.yaml | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/cmd/nerdctl/ipfs_compose_linux_test.go b/cmd/nerdctl/ipfs_compose_linux_test.go index 3257fef88d3..4c409bd343c 100644 --- a/cmd/nerdctl/ipfs_compose_linux_test.go +++ b/cmd/nerdctl/ipfs_compose_linux_test.go @@ -32,6 +32,7 @@ import ( func TestIPFSComposeUp(t *testing.T) { testutil.DockerIncompatible(t) base := testutil.NewBase(t) + base.Args = append([]string{"--debug-full"}, base.Args...) iReg := testregistry.NewIPFSRegistry(base, nil, 0, nil, nil) t.Cleanup(func() { @@ -90,8 +91,6 @@ services: WORDPRESS_DB_PASSWORD: examplepass WORDPRESS_DB_NAME: exampledb volumes: - # workaround for https://github.com/containerd/stargz-snapshotter/issues/444 - - "/run" - wordpress:/var/www/html db: @@ -103,8 +102,6 @@ services: MYSQL_PASSWORD: examplepass MYSQL_RANDOM_ROOT_PASSWORD: '1' volumes: - # workaround for https://github.com/containerd/stargz-snapshotter/issues/444 - - "/run" - db:/var/lib/mysql volumes: diff --git a/examples/compose-wordpress/docker-compose.stargz.yaml b/examples/compose-wordpress/docker-compose.stargz.yaml index 90745ec9837..c5f6328ca6e 100644 --- a/examples/compose-wordpress/docker-compose.stargz.yaml +++ b/examples/compose-wordpress/docker-compose.stargz.yaml @@ -4,18 +4,12 @@ services: wordpress: image: ghcr.io/stargz-containers/wordpress:5.7-esgz - volumes: - # workaround for https://github.com/containerd/stargz-snapshotter/issues/444 - - "/run" extends: file: docker-compose.yaml service: wordpress db: image: ghcr.io/stargz-containers/mariadb:10.5-esgz - volumes: - # workaround for https://github.com/containerd/stargz-snapshotter/issues/444 - - "/run" extends: file: docker-compose.yaml service: db