Skip to content

test: use compose rm for run cleanup - #5116

Merged
AkihiroSuda merged 1 commit into
containerd:mainfrom
subotac:fix/compose-test-cleanup
Aug 5, 2026
Merged

test: use compose rm for run cleanup#5116
AkihiroSuda merged 1 commit into
containerd:mainfrom
subotac:fix/compose-test-cleanup

Conversation

@subotac

@subotac subotac commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #5112.

Update compose run test cleanup to invoke compose rm with the test's compose file and project context. The cleanup continues to stop containers and remove anonymous volumes before running compose down.

Tests:

  • go test ./cmd/nerdctl/compose -run TestThisDoesNotExist
  • go test ./pkg/composer -run TestThisDoesNotExist
  • go test ./pkg/cmd/compose
  • git diff --check

@AkihiroSuda

Copy link
Copy Markdown
Member

Marking the PR as a draft as the CI is failing. Please click Ready for review when ready.

@AkihiroSuda
AkihiroSuda marked this pull request as draft August 1, 2026 19:13
@subotac
subotac marked this pull request as ready for review August 1, 2026 20:32
@AkihiroSuda
AkihiroSuda marked this pull request as draft August 2, 2026 15:35
@subotac

subotac commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

The remaining CI failures appear unrelated to this change:

  • Both ARM jobs failed during host provisioning with dpkg exit code 1, before the integration tests ran.
  • The Kubernetes job timed out in TestKubeCommitSave.
  • The old rootful Ubuntu job failed TestCreateFromOCIArchive.

All jobs exercising the changed Compose run tests passed, including Docker, regular rootful/rootless Linux, EL rootful/rootless, and old-rootless Linux. The corresponding ARM and old-rootful jobs also pass in the latest main test run, and Kubernetes passes in the latest main flaky-workflow run.

I attempted to rerun only the failed jobs, but GitHub requires repository admin permission for these upstream runs. Could you please rerun them?

@AkihiroSuda

Copy link
Copy Markdown
Member

Both ARM jobs failed during host provisioning with dpkg exit code 1, before the integration tests ran.

This was recently fixed in the main branch. Please try rebasing.

@subotac
subotac force-pushed the fix/compose-test-cleanup branch from 1b91a18 to c83e73b Compare August 3, 2026 10:27
@subotac

subotac commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

The full matrix has now completed. The rebase resolved the ARM provisioning failure, and none of the remaining failures is in the changed Compose test file.

The seven failed jobs consist of:

  • the Docker auto-remove attach race described above;
  • five failures in existing image save/load tests (TestSave, TestSaveQuiet, and TestLoadQuiet), with errors such as unrecognized image format, truncated archives, and short reads;
  • an old-rootful TestIPFSCompNoBuild failure caused by a Kubo API readiness timeout.

This PR only changes cmd/nerdctl/compose/compose_run_linux_test.go. More importantly, the exact base commit 5fbf7bdc also fails image-save tests in rootless and gomodjail jobs and TestIPFSCompNoBuild in rootful in the main workflow run. These failures therefore reproduce without this PR.

Could you please rerun the failed jobs?

@subotac

subotac commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the rerun. All rerun jobs except the gomodjail/rootless job are now green.

The remaining job passed the entire Compose package (cmd/nerdctl/compose, 7m48s) and failed only in the unchanged cmd/nerdctl/image/image_save_test.go:

  • TestSaveContent: the produced tar ended with Unexpected EOF in archive;
  • TestSave/Image_with_different_names,_by_id: loading the archive returned unrecognized image format.

That file is byte-identical to main. The first attempt of this same job failed a different image load test, and the exact base commit's main gomodjail job failed another image-save test. This is the same recurring image-archive flake and is unrelated to the Compose-only change.

Could you please rerun just this remaining job?

@subotac
subotac marked this pull request as ready for review August 3, 2026 12:18
Comment thread cmd/nerdctl/compose/compose_run_linux_test.go Outdated
Comment thread cmd/nerdctl/compose/compose_run_linux_test.go
@AkihiroSuda AkihiroSuda added this to the v2.4.0 milestone Aug 4, 2026
@AkihiroSuda AkihiroSuda added area/ci e.g., CI failure area/compose labels Aug 4, 2026
Signed-off-by: Subota Ivan <73706465+subotac@users.noreply.github.com>

@AkihiroSuda AkihiroSuda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda
AkihiroSuda merged commit fcaa66c into containerd:main Aug 5, 2026
80 of 86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci e.g., CI failure area/compose

Projects

None yet

Development

Successfully merging this pull request may close these issues.

testCase.Cleanup should use compose rm, not rm for cleaning up Compose tests

2 participants