Skip to content

Add compose ps flags#2509

Merged
AkihiroSuda merged 1 commit into
containerd:mainfrom
tanghaowillow:add-compose-ps-flags
Sep 21, 2023
Merged

Add compose ps flags#2509
AkihiroSuda merged 1 commit into
containerd:mainfrom
tanghaowillow:add-compose-ps-flags

Conversation

@tanghaowillow
Copy link
Copy Markdown
Contributor

Add missing flags for the compose ps command.
Fixes #2502

@tanghaowillow tanghaowillow force-pushed the add-compose-ps-flags branch 2 times, most recently from e5a58a4 to e7d5a5d Compare September 16, 2023 08:59
Comment thread cmd/nerdctl/compose_ps_linux_test.go Outdated
)

func TestComposePs(t *testing.T) {
testutil.DockerIncompatible(t)
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.

Why?

Copy link
Copy Markdown
Contributor Author

@tanghaowillow tanghaowillow Sep 19, 2023

Choose a reason for hiding this comment

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

removed

// stop and restart a single service.
base.ComposeCmd("-f", comp.YAMLFullPath(), "stop", "db").AssertOK()
base.ComposeCmd("-f", comp.YAMLFullPath(), "ps", "db").AssertOutContainsAny("Exit", "exited")
base.ComposeCmd("-f", comp.YAMLFullPath(), "ps", "db", "-a").AssertOutContainsAny("Exit", "exited")
Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda Sep 16, 2023

Choose a reason for hiding this comment

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

DockerIncompatible() can be now probably removed

// 1.1 `compose create` should create service container (in `created` status)
base.ComposeCmd("-f", comp.YAMLFullPath(), "create").AssertOK()
base.ComposeCmd("-f", comp.YAMLFullPath(), "ps", "svc0").AssertOutContainsAny("Created", "created")
base.ComposeCmd("-f", comp.YAMLFullPath(), "ps", "svc0", "-a").AssertOutContainsAny("Created", "created")
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.

DockerIncompatible() can be now probably removed

Comment thread cmd/nerdctl/compose_ps.go
composePsCommand.Flags().BoolP("quiet", "q", false, "Only display container IDs")
composePsCommand.Flags().Bool("services", false, "Display services")
composePsCommand.Flags().BoolP("all", "a", false, "Show all containers (default shows just running)")
return composePsCommand
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.

@AkihiroSuda
Copy link
Copy Markdown
Member

Please squash commits

Signed-off-by: tanghao <tanghao1996.seu@gmail.com>
Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda left a comment

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 9cbd1fe into containerd:main Sep 21, 2023
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.

some flags of compose ps are missing

2 participants