nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: digitalocean/doctl
Pull request #1389 (2023-07-06 17:14:30)

uptime: move under monitoring
Moves the `uptime` command under monitoring.


Patch:
diff --git a/commands/doit.go b/commands/doit.go
index fad04358..8f7355ed 100644
--- a/commands/doit.go
+++ b/commands/doit.go
@@ -173,7 +173,6 @@ func addCommands() {
 	DoitCmd.AddCommand(OneClicks())
 	DoitCmd.AddCommand(Monitoring())
 	DoitCmd.AddCommand(Serverless())
-	DoitCmd.AddCommand(UptimeCheck())
 }
 
 func computeCmd() *Command {
diff --git a/commands/monitoring.go b/commands/monitoring.go
index 42461768..8d74b92a 100644
--- a/commands/monitoring.go
+++ b/commands/monitoring.go
@@ -40,6 +40,7 @@ in order to alert on resource consumption.`,
 	}
 
 	cmd.AddCommand(alertPolicies())
+	cmd.AddCommand(UptimeCheck())
 	return cmd
 }
 


Test patch:
diff --git a/commands/monitoring_test.go b/commands/monitoring_test.go
index 4eb65757..64750934 100644
--- a/commands/monitoring_test.go
+++ b/commands/monitoring_test.go
@@ -36,7 +36,7 @@ var (
 func TestAlertPolicyCommand(t *testing.T) {
 	cmd := Monitoring()
 	assert.NotNil(t, cmd)
-	assertCommandNames(t, cmd, "alert")
+	assertCommandNames(t, cmd, "alert", "uptime")
 	assertCommandNames(t, cmd.childCommands[0], "create", "delete", "get", "list", "update")
 }
Repository: appvia/kev
Pull request #700 (2022-11-08 17:46:34)

Increase default volume size from 100Mi to 1Gi
This PR changes the default persistent volume size from 100Mi to 1Gi.


Patch:
diff --git a/pkg/kev/config/defaults.go b/pkg/kev/config/defaults.go
index 15865f7..3cf5409 100644
--- a/pkg/kev/config/defaults.go
+++ b/pkg/kev/config/defaults.go
@@ -18,7 +18,7 @@ package config
 
 const (
 	// DefaultVolumeSize default value PV class
-	DefaultVolumeSize = "100Mi"
+	DefaultVolumeSize = "1Gi"
 
 	// DefaultVolumeStorageClass default PV storage class
 	DefaultVolumeStorageClass = ""


Test patch:
diff --git a/pkg/kev/kev_reconcile_test.go b/pkg/kev/kev_reconcile_test.go
index 35fd82a..d05e792 100644
--- a/pkg/kev/kev_reconcile_test.go
+++ b/pkg/kev/kev_reconcile_test.go
@@ -358,7 +358,7 @@ var _ = Describe("Reconcile", func() {
 					volExt := v.Extensions[config.K8SExtensionKey].(map[string]interface{})
 
 					Expect(v.Extensions).To(HaveLen(1), "failed for env: %s", env.Name)
-					Expect(volExt["size"]).To(Equal("100Mi"), "failed for env: %s", env.Name)
+					Expect(volExt["size"]).To(Equal("1Gi"), "failed for env: %s", env.Name)
 				}
 
 			})
diff --git a/pkg/kev/testdata/init-default/compose-yaml/output.yaml b/pkg/kev/testdata/init-default/compose-yaml/output.yaml
index 02a75cf..174a277 100644
--- a/pkg/kev/testdata/init-default/compose-yaml/output.yaml
+++ b/pkg/kev/testdata/init-default/compose-yaml/output.yaml
@@ -7,4 +7,4 @@ services:
 volumes:
   db_data:
     x-k8s:
-      size: 100Mi
+      size: 1Gi
Repository: appvia/kev
Pull request #312 (2020-10-19 13:54:14)

Stop reconciling kev.service.type
Resolves #311 


Patch:
diff --git a/pkg/kev/changeset.go b/pkg/kev/changeset.go
index 76da581..5268073 100644
--- a/pkg/kev/changeset.go
+++ b/pkg/kev/changeset.go
@@ -58,7 +58,6 @@ func newChangeset(dst *composeOverride, src *composeOverride) changeset {
 	detectServicesCreate(dst, src, &cset)
 	detectServicesDelete(dst, src, &cset)
 	detectServicesEnvironmentDelete(dst, src, &cset)
-	detectServicesUpdate(dst, src, &cset)
 	detectVolumesCreate(dst, src, &cset)
 	detectVolumesDelete(dst, src, &cset)
 	return cset
@@ -114,26 +113,6 @@ func detectServicesEnvironmentDelete(dst *composeOverride, src *composeOverride,
 	}
 }
 
-func detectServicesUpdate(dst *composeOverride, src *composeOverride, cset *changeset) {
-	srcSvcMapping := src.Services.Map()
-	for index, dstSvc := range dst.Services {
-		srcSvc, ok := srcSvcMapping[dstSvc.Name]
-		if !ok {
-			continue
-		}
-
-		if srcSvc.GetLabels()[config.LabelServiceType] != dstSvc.GetLabels()[config.LabelServiceType] {
-			cset.services = append(cset.services, change{
-				Type:   UPDATE,
-				Index:  index,
-				Parent: "labels",
-				Target: config.LabelServiceType,
-				Value:  srcSvc.GetLabels()[config.LabelServiceType],
-			})
-		}
-	}
-}
-
 func detectVolumesCreate(dst *composeOverride, src *composeOverride, cset *changeset) {
 	for srcVolKey, srcVolConfig := range src.Volumes {
 		if _, ok := dst.Volumes[srcVolKey]; !ok {


Test patch:
diff --git a/pkg/kev/kev_reconcile_test.go b/pkg/kev/kev_reconcile_test.go
index 5a03f2c..0eb38cf 100644
--- a/pkg/kev/kev_reconcile_test.go
+++ b/pkg/kev/kev_reconcile_test.go
@@ -184,9 +184,9 @@ var _ = Describe("Reconcile", func() {
 					Expect(s.Labels["kev.service.type"]).To(Equal("LoadBalancer"))
 				})
 
-				It("should update the label in all environments", func() {
+				It("should not update the label in all environments", func() {
 					s, _ := env.GetService("wordpress")
-					Expect(s.Labels["kev.service.type"]).To(Equal("ClusterIP"))
+					Expect(s.Labels["kev.service.type"]).To(Equal("LoadBalancer"))
 				})
 
 				It("should log the change summary using the debug level", func() {
@@ -195,11 +195,7 @@ var _ = Describe("Reconcile", func() {
 
 				It("should create a change summary", func() {
 					Expect(loggedMsgs).To(ContainSubstring(env.Name))
-					Expect(loggedMsgs).To(ContainSubstring("wordpress"))
-					Expect(loggedMsgs).To(ContainSubstring("updated"))
-					Expect(loggedMsgs).To(ContainSubstring(config.LabelServiceType))
-					Expect(loggedMsgs).To(ContainSubstring("LoadBalancer"))
-					Expect(loggedMsgs).To(ContainSubstring("ClusterIP"))
+					Expect(loggedMsgs).To(ContainSubstring("nothing to update"))
 				})
 
 				It("should not error", func() {
Repository: kumahq/kuma
Pull request #1155 (2020-11-13 15:37:57)

chore(kuma-cp) drop default sufix on the default traffic permission
### Summary

We changed the scope of Traffic Permissions on K8S to Cluster, so we can drop the prefix.

### Documentation

- [ ] None



Patch:
diff --git a/pkg/defaults/mesh/traffic_permission.go b/pkg/defaults/mesh/traffic_permission.go
index 872225cf3..cc8691a06 100644
--- a/pkg/defaults/mesh/traffic_permission.go
+++ b/pkg/defaults/mesh/traffic_permission.go
@@ -27,11 +27,9 @@ var defaultTrafficPermission = mesh_proto.TrafficPermission{
 	},
 }
 
-// Default traffic permission needs to be stored with default suffix so on K8S it will be stored in the default namespace
-// This will be dropped when TrafficPermission will be converted to Global Scope on K8S instead of Namespace Scope
 // TrafficPermission needs to contain mesh name inside it. Otherwise if the name is the same (ex. "allow-all") creating new mesh would fail because there is already resource of name "allow-all" which is unique key on K8S
 func defaultTrafficPermissionName(meshName string) string {
-	return fmt.Sprintf("allow-all-%s.default", meshName)
+	return fmt.Sprintf("allow-all-%s", meshName)
 }
 
 func createDefaultTrafficPermission(resManager manager.ResourceManager, meshName string) error {


Test patch:
diff --git a/pkg/core/managers/apis/mesh/mesh_manager_test.go b/pkg/core/managers/apis/mesh/mesh_manager_test.go
index 542180e1b..5ca012d3a 100644
--- a/pkg/core/managers/apis/mesh/mesh_manager_test.go
+++ b/pkg/core/managers/apis/mesh/mesh_manager_test.go
@@ -99,7 +99,7 @@ var _ = Describe("Mesh Manager", func() {
 			Expect(err).ToNot(HaveOccurred())
 
 			// and default TrafficPermission for the mesh exists
-			err = resStore.Get(context.Background(), &core_mesh.TrafficPermissionResource{}, store.GetByKey("allow-all-mesh-1.default", meshName))
+			err = resStore.Get(context.Background(), &core_mesh.TrafficPermissionResource{}, store.GetByKey("allow-all-mesh-1", meshName))
 			Expect(err).ToNot(HaveOccurred())
 		})
 
diff --git a/test/e2e/kuma_deploy_hybrid_test.go b/test/e2e/kuma_deploy_hybrid_test.go
index ac4dd89b5..1004d212e 100644
--- a/test/e2e/kuma_deploy_hybrid_test.go
+++ b/test/e2e/kuma_deploy_hybrid_test.go
@@ -240,7 +240,7 @@ metadata:
 			return stdout, err
 		}, "10s", "1s").Should(ContainSubstring("HTTP/1.1 200 OK"))
 
-		err := global.GetKumactlOptions().KumactlDelete("traffic-permission", "allow-all-default.default") // remove builtin traffic permission
+		err := global.GetKumactlOptions().KumactlDelete("traffic-permission", "allow-all-default") // remove builtin traffic permission
 		Expect(err).ToNot(HaveOccurred())
 
 		err = YamlUniversal(trafficPermissionAllTo2Remote)(global)