nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: Azure/ARO-RP
Pull request #1439 (2021-04-13 16:52:25)

revert "remove group.ManagedBy change in development, don't believe it's necessary"
it turns out it is currently necessary because if the ManagedBy flag is
set in e2e, the clean script won't clean up the RG :-(



Patch:
diff --git a/pkg/cluster/deploystorage.go b/pkg/cluster/deploystorage.go
index 6f2390eb9..acae7946c 100644
--- a/pkg/cluster/deploystorage.go
+++ b/pkg/cluster/deploystorage.go
@@ -71,6 +71,11 @@ func (m *manager) ensureResourceGroup(ctx context.Context) error {
 		Location:  &m.doc.OpenShiftCluster.Location,
 		ManagedBy: to.StringPtr(m.doc.OpenShiftCluster.ID),
 	}
+	if m.env.IsDevelopmentMode() {
+		// TODO: ideally this should be removed, but removing it causes the
+		// purge script to ignore RGs in CI E2E.  Fix that at the same time.
+		group.ManagedBy = nil
+	}
 
 	_, err := m.resourceGroups.CreateOrUpdate(ctx, resourceGroup, group)
 


Test patch:
diff --git a/pkg/cluster/deploystorage_test.go b/pkg/cluster/deploystorage_test.go
index 1e20ff0c0..7a60c5e9f 100644
--- a/pkg/cluster/deploystorage_test.go
+++ b/pkg/cluster/deploystorage_test.go
@@ -78,6 +78,7 @@ func TestCreateAndUpdateErrors(t *testing.T) {
 			env := mock_env.NewMockInterface(controller)
 			env.EXPECT().Location().AnyTimes().Return(location)
 			env.EXPECT().EnsureARMResourceGroupRoleAssignment(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().Return(nil)
+			env.EXPECT().IsDevelopmentMode().Return(false)
 
 			m := &manager{
 				log:            logrus.NewEntry(logrus.StandardLogger()),
Repository: Azure/ARO-RP
Pull request #1474 (2021-05-03 15:10:13)

Eviction hard custom value fix: no more hiding the default values 
### Which issue this PR addresses:

Fixes hidden values we took over

### What this PR does / why we need it:

Fixes values which are not added anymore by kubelet defaulting code

### Test plan for issue:

test in prod

### Is there any documentation that needs to be updated for this PR?

no


Patch:
diff --git a/pkg/operator/controllers/workaround/systemreserved.go b/pkg/operator/controllers/workaround/systemreserved.go
index 801807c0d..44d6a27ac 100644
--- a/pkg/operator/controllers/workaround/systemreserved.go
+++ b/pkg/operator/controllers/workaround/systemreserved.go
@@ -26,8 +26,12 @@ type systemreserved struct {
 	versionFixed *version.Version
 }
 
+// Tweaked values from from https://github.com/openshift/kubernetes/blob/master/pkg/kubelet/apis/config/v1beta1/defaults_linux.go
 const (
 	hardEviction                = "500Mi"
+	nodeFsAvailable             = "10%"
+	nodeFsInodes                = "5%"
+	imageFs                     = "15%"
 	labelName                   = "aro.openshift.io/limits"
 	labelValue                  = ""
 	kubeletConfigName           = "aro-limits"
@@ -65,7 +69,10 @@ func (sr *systemreserved) kubeletConfig() (*mcv1.KubeletConfig, error) {
 			"memory": memReserved,
 		},
 		"evictionHard": map[string]interface{}{
-			"memory.available": hardEviction,
+			"memory.available":  hardEviction,
+			"nodefs.available":  nodeFsAvailable,
+			"nodefs.inodesFree": nodeFsInodes,
+			"imagefs.available": imageFs,
 		},
 	})
 	if err != nil {


Test patch:
diff --git a/pkg/operator/controllers/workaround/systemreserved_test.go b/pkg/operator/controllers/workaround/systemreserved_test.go
index 85223d3b0..a032a6243 100644
--- a/pkg/operator/controllers/workaround/systemreserved_test.go
+++ b/pkg/operator/controllers/workaround/systemreserved_test.go
@@ -103,7 +103,7 @@ func TestKubeletConfig(t *testing.T) {
 				},
 			},
 			KubeletConfig: &runtime.RawExtension{
-				Raw: []byte(`{"evictionHard":{"memory.available":"500Mi"},"systemReserved":{"memory":"2000Mi"}}`),
+				Raw: []byte(`{"evictionHard":{"imagefs.available":"15%","memory.available":"500Mi","nodefs.available":"10%","nodefs.inodesFree":"5%"},"systemReserved":{"memory":"2000Mi"}}`),
 			},
 		},
 	}
Repository: Azure/ARO-RP
Pull request #1487 (2021-05-10 16:07:12)

Remove @jim-minter
Remove @jim-minter


Patch:
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index ee48572e0..33c8f079c 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,1 +1,1 @@
-* @jim-minter @mjudeikis @jewzaam
+* @mjudeikis @jewzaam
diff --git a/pkg/operator/controllers/workaround/systemreserved.go b/pkg/operator/controllers/workaround/systemreserved.go
index 44d6a27ac..801807c0d 100644
--- a/pkg/operator/controllers/workaround/systemreserved.go
+++ b/pkg/operator/controllers/workaround/systemreserved.go
@@ -26,12 +26,8 @@ type systemreserved struct {
 	versionFixed *version.Version
 }
 
-// Tweaked values from from https://github.com/openshift/kubernetes/blob/master/pkg/kubelet/apis/config/v1beta1/defaults_linux.go
 const (
 	hardEviction                = "500Mi"
-	nodeFsAvailable             = "10%"
-	nodeFsInodes                = "5%"
-	imageFs                     = "15%"
 	labelName                   = "aro.openshift.io/limits"
 	labelValue                  = ""
 	kubeletConfigName           = "aro-limits"
@@ -69,10 +65,7 @@ func (sr *systemreserved) kubeletConfig() (*mcv1.KubeletConfig, error) {
 			"memory": memReserved,
 		},
 		"evictionHard": map[string]interface{}{
-			"memory.available":  hardEviction,
-			"nodefs.available":  nodeFsAvailable,
-			"nodefs.inodesFree": nodeFsInodes,
-			"imagefs.available": imageFs,
+			"memory.available": hardEviction,
 		},
 	})
 	if err != nil {


Test patch:
diff --git a/pkg/operator/controllers/workaround/systemreserved_test.go b/pkg/operator/controllers/workaround/systemreserved_test.go
index a032a6243..85223d3b0 100644
--- a/pkg/operator/controllers/workaround/systemreserved_test.go
+++ b/pkg/operator/controllers/workaround/systemreserved_test.go
@@ -103,7 +103,7 @@ func TestKubeletConfig(t *testing.T) {
 				},
 			},
 			KubeletConfig: &runtime.RawExtension{
-				Raw: []byte(`{"evictionHard":{"imagefs.available":"15%","memory.available":"500Mi","nodefs.available":"10%","nodefs.inodesFree":"5%"},"systemReserved":{"memory":"2000Mi"}}`),
+				Raw: []byte(`{"evictionHard":{"memory.available":"500Mi"},"systemReserved":{"memory":"2000Mi"}}`),
 			},
 		},
 	}