PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: prometheus/client_python (python)

Issue:
Issue with prometheus_multiproc_dir deprecation
Hi !

I noticed an issue with prometheus_multiproc_dir deprecation in the latest 0.10.0 version.
In `mark_process_dead()` the environment variable transition code is not present, which means that if the uppercase version is not set, the function does not work.
https://github.com/prometheus/client_python/pull/624/files#diff-95ab27209a655ee3a508d436368ba4e1d155784c5885e18be09b61c2a5ec03efL155

Since we can call `mark_process_dead()` without going through the `__init__()` methods that set the new environment variable, it would required something like this : https://github.com/prometheus/client_python/pull/624/files#diff-f1ab5b765643c2beafab5bcd9874a839f7ebf080300e1ee0dbdb821755f8e904R56-R58




Pull request:
mark_process_dead respects old env var
Some users use mark_process_dead without going through any of the
`__init__()` logic which sets the new environment variable.

I chose not to put in the warnings in another place as a user will go
through the deprecation path somewhere already.

Fixes #643 

Patch:
diff --git a/prometheus_client/multiprocess.py b/prometheus_client/multiprocess.py
index d32156c..03e3f4d 100644
--- a/prometheus_client/multiprocess.py
+++ b/prometheus_client/multiprocess.py
@@ -157,7 +157,7 @@ class MultiProcessCollector(object):
 def mark_process_dead(pid, path=None):
     """Do bookkeeping for when one process dies in a multi-process setup."""
     if path is None:
-        path = os.environ.get('PROMETHEUS_MULTIPROC_DIR')
+        path = os.environ.get('PROMETHEUS_MULTIPROC_DIR', os.environ.get('prometheus_multiproc_dir'))
     for f in glob.glob(os.path.join(path, 'gauge_livesum_{0}.db'.format(pid))):
         os.remove(f)
     for f in glob.glob(os.path.join(path, 'gauge_liveall_{0}.db'.format(pid))):


Test patch:
diff --git a/tests/test_multiprocess.py b/tests/test_multiprocess.py
index f1fc06b..96792a3 100644
--- a/tests/test_multiprocess.py
+++ b/tests/test_multiprocess.py
@@ -30,8 +30,8 @@ class TestMultiProcessDeprecation(unittest.TestCase):
         self.tempdir = tempfile.mkdtemp()
 
     def tearDown(self):
-        del os.environ['prometheus_multiproc_dir']
-        del os.environ['PROMETHEUS_MULTIPROC_DIR']
+        os.environ.pop('prometheus_multiproc_dir', None)
+        os.environ.pop('PROMETHEUS_MULTIPROC_DIR', None)
         values.ValueClass = MutexValue
         shutil.rmtree(self.tempdir)
 
@@ -48,6 +48,12 @@ class TestMultiProcessDeprecation(unittest.TestCase):
             assert issubclass(w[-1].category, DeprecationWarning)
             assert "PROMETHEUS_MULTIPROC_DIR" in str(w[-1].message)
 
+    def test_mark_process_dead_respects_lowercase(self):
+        os.environ['prometheus_multiproc_dir'] = self.tempdir
+        # Just test that this does not raise with a lowercase env var. The
+        # logic is tested elsewhere.
+        mark_process_dead(123)
+
 
 class TestMultiProcess(unittest.TestCase):
     def setUp(self):
Repository: robotframework/SeleniumLibrary (python)

Issue:
Add ESC to Click Element modifier alias
The [Click Element](http://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) modifier arguments supports using `CTRL` for alias to `CONTROL`. It would be good to add support for `ESC` as alias for `ESCAPE`

Pull request:
Add ESC as alias to Click Element
Fixes #1235 

Patch:
diff --git a/src/SeleniumLibrary/keywords/element.py b/src/SeleniumLibrary/keywords/element.py
index 11617ecd..f6bcd04e 100644
--- a/src/SeleniumLibrary/keywords/element.py
+++ b/src/SeleniumLibrary/keywords/element.py
@@ -1049,8 +1049,7 @@ return !element.dispatchEvent(evt);
         keys = []
         for item in modifiers:
             item = item.strip()
-            if item == 'CTRL':
-                item = 'CONTROL'
+            item = self._parse_aliases(item)
             if hasattr(Keys, item):
                 keys.append(getattr(Keys, item))
             else:


Test patch:
diff --git a/utest/test/keywords/test_click_modifier.py b/utest/test/keywords/test_click_modifier.py
index 48f39000..197a1156 100644
--- a/utest/test/keywords/test_click_modifier.py
+++ b/utest/test/keywords/test_click_modifier.py
@@ -20,6 +20,10 @@ class ParsingModifierKeys(unittest.TestCase):
     def test_parsing_one_mofier(self):
         parsed = self.element.parse_modifier('CTRL')
         self.assertEqual(parsed, [Keys.CONTROL])
+        parsed = self.element.parse_modifier('esc')
+        self.assertEqual(parsed, [Keys.ESCAPE])
+        parsed = self.element.parse_modifier('ESCAPE')
+        self.assertEqual(parsed, [Keys.ESCAPE])
         parsed = self.element.parse_modifier('control')
         self.assertEqual(parsed, [Keys.CONTROL])
         parsed = self.element.parse_modifier('alt')
Repository: jhipster/jhipster-lite (java)

Issue:
Endpoint /management/health is not exposed
It seems thats https://github.com/jhipster/jhipster-lite/pull/12648 breaks the call to /management/health (in Angular app)

![Image](https://github.com/user-attachments/assets/6bccf797-b154-421f-acd4-29aa3135f54f)

Pull request:
Fix: Endpoint /management/health is not exposed
Fix #12850 

Patch:
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/technicaltools/actuator/domain/SpringBootActuatorModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/technicaltools/actuator/domain/SpringBootActuatorModuleFactory.java
index 11e02cafd..b74bacc22 100644
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/technicaltools/actuator/domain/SpringBootActuatorModuleFactory.java
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/technicaltools/actuator/domain/SpringBootActuatorModuleFactory.java
@@ -31,6 +31,7 @@ public class SpringBootActuatorModuleFactory {
         )
         .set(propertyKey("management.endpoint.health.probes.enabled"), propertyValue(true))
         .set(propertyKey("management.endpoint.health.show-details"), propertyValue("always"))
+        .set(propertyKey("management.endpoint.health.access"), propertyValue("read-only"))
         .set(propertyKey("management.endpoints.access.default"), propertyValue("none"))
         .set(propertyKey("management.endpoints.jmx.exposure.exclude"), propertyValue("*"))
         .and()


Test patch:
diff --git a/src/test/java/tech/jhipster/lite/generator/server/springboot/technicaltools/actuator/domain/SpringBootActuatorModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/server/springboot/technicaltools/actuator/domain/SpringBootActuatorModuleFactoryTest.java
index a60b184e4..0bc4d0e40 100644
--- a/src/test/java/tech/jhipster/lite/generator/server/springboot/technicaltools/actuator/domain/SpringBootActuatorModuleFactoryTest.java
+++ b/src/test/java/tech/jhipster/lite/generator/server/springboot/technicaltools/actuator/domain/SpringBootActuatorModuleFactoryTest.java
@@ -34,6 +34,7 @@ class SpringBootActuatorModuleFactoryTest {
         management:
           endpoint:
             health:
+              access: read-only
               probes:
                 enabled: true
               show-details: always
Repository: grafana/tanka (go)

Issue:
Support nil type for disabling objects
Maybe there is already a way to do this, but we often set up templates with the ability to "disable" kube objects like so:

{
   run_load_balancer: false,
   if run_load_balancer then {
       ...
   } else null,
  ... 
}

Currently tanka errors out on nil https://github.com/grafana/tanka/blob/9f62754982952285f7a7dc62750360b6a1213bc0/pkg/kubernetes/reconcile.go#L112

Pull request:
fix(kubernetes): ignore nil during reconcile
While extracting the objects from the Jsonnet output, Tanka was not correctly
dealing with keys that were set to `nil`, leading those to be classified as
invalid objects, while they were no objects at all.

Such a case, where a key is explicitely set to `nil` is Jsonnet if:

```jsonnet
{
  key: if false then "ouch"
}
```

Because the condition is false, Jsonnet adds an implicit `else null`.

Fixes #160 

Patch:
diff --git a/pkg/kubernetes/reconcile.go b/pkg/kubernetes/reconcile.go
index 78d1a8cc..b8ecf551 100644
--- a/pkg/kubernetes/reconcile.go
+++ b/pkg/kubernetes/reconcile.go
@@ -99,9 +99,13 @@ func walkJSON(deep interface{}, extracted map[string]manifest.Manifest, path tra
 
 	// walk it
 	for key, d := range deep.(map[string]interface{}) {
-		if key == "__ksonnet" {
+		switch {
+		case key == "__ksonnet": // exclude ksonnet object
+			continue
+		case d == nil: // result from false if condition in Jsonnet
 			continue
 		}
+
 		path := append(path, key)
 
 		if _, ok := d.(map[string]interface{}); !ok {


Test patch:
diff --git a/pkg/kubernetes/reconcile_test.go b/pkg/kubernetes/reconcile_test.go
index fdecf160..d16c13d3 100644
--- a/pkg/kubernetes/reconcile_test.go
+++ b/pkg/kubernetes/reconcile_test.go
@@ -34,6 +34,15 @@ func TestExtract(t *testing.T) {
 			name: "array",
 			data: testDataArray(),
 		},
+		{
+			name: "nil",
+			data: func() testData {
+				d := testDataRegular()
+				d.deep.(map[string]interface{})["disabledObject"] = nil
+				return d
+			}(),
+			err: nil, // we expect no error, just the result of testDataRegular
+		},
 	}
 
 	for _, c := range tests {