nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: docker/compose-cli
Pull request #1649 (2021-05-06 09:19:23)

compose ps list stopped containers. -a is used to include oneoff
**What I did**
Fix behaviour of `compose ps -a` flag, so that `ps` always list stopped services, and `-a` is used to also include one_off containers (created by run command)

**Related issue**
close https://github.com/docker/compose-cli/issues/1552


Patch:
diff --git a/local/compose/ps.go b/local/compose/ps.go
index d2ee7c35..99cd6c13 100644
--- a/local/compose/ps.go
+++ b/local/compose/ps.go
@@ -26,7 +26,11 @@ import (
 )
 
 func (s *composeService) Ps(ctx context.Context, projectName string, options compose.PsOptions) ([]compose.ContainerSummary, error) {
-	containers, err := s.getContainers(ctx, projectName, oneOffInclude, options.All, options.Services...)
+	oneOff := oneOffExclude
+	if options.All {
+		oneOff = oneOffInclude
+	}
+	containers, err := s.getContainers(ctx, projectName, oneOff, true, options.Services...)
 	if err != nil {
 		return nil, err
 	}


Test patch:
diff --git a/local/compose/ps_test.go b/local/compose/ps_test.go
index 619bd33f..3ea5faac 100644
--- a/local/compose/ps_test.go
+++ b/local/compose/ps_test.go
@@ -37,7 +37,9 @@ func TestPs(t *testing.T) {
 	tested.apiClient = api
 
 	ctx := context.Background()
-	listOpts := apitypes.ContainerListOptions{Filters: filters.NewArgs(projectFilter(testProject)), All: false}
+	args := filters.NewArgs(projectFilter(testProject))
+	args.Add("label", "com.docker.compose.oneoff=False")
+	listOpts := apitypes.ContainerListOptions{Filters: args, All: true}
 	c1, inspect1 := containerDetails("service1", "123", "Running", "healthy")
 	c2, inspect2 := containerDetails("service1", "456", "Running", "")
 	c2.Ports = []apitypes.Port{{PublicPort: 80, PrivatePort: 90, IP: "localhost"}}
Repository: docker/compose-cli
Pull request #1953 (2021-07-26 14:41:47)

Post-login msg: Ignore if password is empty
Signed-off-by: Amine Chouki <amine.chouki@docker.com>

**What I did**
Do not display the post-login message (to promote Personal Access Tokens) if the password is empty. This is more of a future proof check in case we introduce SSO or equivalent.


Patch:
diff --git a/cli/mobycli/pat_suggest.go b/cli/mobycli/pat_suggest.go
index 24e5363c..c406b4b9 100644
--- a/cli/mobycli/pat_suggest.go
+++ b/cli/mobycli/pat_suggest.go
@@ -65,6 +65,9 @@ func isUsingDefaultRegistry(cmdArgs []string) bool {
 }
 
 func isUsingPassword(pass string) bool {
+	if pass == "" { // ignore if no password (or SSO)
+		return false
+	}
 	if _, err := uuid.ParseUUID(pass); err == nil {
 		return false
 	}


Test patch:
diff --git a/cli/mobycli/pat_suggest_test.go b/cli/mobycli/pat_suggest_test.go
index 8d229829..9fe4fff4 100644
--- a/cli/mobycli/pat_suggest_test.go
+++ b/cli/mobycli/pat_suggest_test.go
@@ -74,6 +74,11 @@ func TestIsUsingPassword(t *testing.T) {
 			"mypass",
 			true,
 		},
+		{
+			"no password or sso",
+			"",
+			false,
+		},
 		{
 			"personal access token",
 			"1508b8bd-b80c-452d-9a7a-ee5607c41bcd",
Repository: docker/compose-cli
Pull request #2143 (2022-04-13 21:02:08)

Add extension commands in command metrics
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>

**What I did**
Run generate commands to add commands from extensions CLI plugin


<!-- optional tests
You can add a / mention to run tests executed by default only on main branch :
* `test-kube` to run Kube E2E tests
* `test-aci` to run ACI E2E tests
* `test-ecs` to run ECS E2E tests
* `test-windows` to run tests & E2E tests on windows
-->

**(not mandatory) A picture of a cute animal, if possible in relation with what you did**



Patch:
diff --git a/cli/metrics/commands.go b/cli/metrics/commands.go
index cae0e6a8..c7c483e3 100644
--- a/cli/metrics/commands.go
+++ b/cli/metrics/commands.go
@@ -35,7 +35,9 @@ var managementCommands = []string{
 	"container",
 	"context",
 	"create",
+	"dev",
 	"ecs",
+	"extension",
 	"image",
 	"imagetools",
 	"key",
@@ -75,6 +77,7 @@ var commands = []string{
 	"convert",
 	"cp",
 	"create",
+	"debug",
 	"demote",
 	"deploy",
 	"df",
@@ -118,6 +121,7 @@ var commands = []string{
 	"remove",
 	"rename",
 	"render",
+	"reset",
 	"restart",
 	"revoke",
 	"rm",
@@ -138,6 +142,7 @@ var commands = []string{
 	"stop",
 	"tag",
 	"top",
+	"ui-source",
 	"uninstall",
 	"unlock",
 	"unlock-key",


Test patch:
diff --git a/cli/metrics/metrics_test.go b/cli/metrics/metrics_test.go
index 5c4a7175..48aeb022 100644
--- a/cli/metrics/metrics_test.go
+++ b/cli/metrics/metrics_test.go
@@ -173,6 +173,11 @@ func TestGetCommand(t *testing.T) {
 			args:     []string{"--debug", "compose", "-f", "titi.yaml", "up"},
 			expected: "compose up",
 		},
+		{
+			name:     "extension install myorg/my-extension",
+			args:     []string{"extension", "install", "myorg/my-extension"},
+			expected: "extension install",
+		},
 	}
 
 	for _, testCase := range testCases {