nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: kubernetes-sigs/gcp-compute-persistent-disk-csi-driver
Pull request #986 (2022-05-12 21:39:28)

Remove workaround to add os.version to the manifest for Windows images
**What type of PR is this?**
> Uncomment only one ` /kind <>` line, hit enter to put that in a new line, and remove leading whitespaces from that line:
>

/kind bug

**What this PR does / why we need it**:

It looks like a recent version of docker in CI is adding `os.version` so the workaround to add it on our own is no longer needed, this was causing a double `os.version` to be added to the manifest as seen here:

```
I0512 18:36:46.423] {"Ref":"gcr.io/gce-cvm-upg-lat-1-3-ctl-skew/gcp-persistent-disk-csi-driver:d5486a25-280b-4d7e-a899-98a3f37b0818_ltsc2019","Descriptor":{"mediaType":"application/vnd.docker.distribution.manifest.v2+json","digest":"sha256:cb0b111aba51dfdfcf8fcdec778c20c3bf153c9180bcbaf597c7a5f58c886794","size":956,"platform":{"architecture":"amd64","os":"windows","os.version":"10.0.17763.2928",,"os.version":"10.0.17763.2928"}}, ...}
```

I'm commenting the part that performs the text replacement, if this works then eventually this file and its usages should be removed.

**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Ref #982 

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
NONE
```

/assign @saikat-royc 


Patch:
diff --git a/manifest_osversion.sh b/manifest_osversion.sh
index 5c6c0cc4..4e16dcbf 100755
--- a/manifest_osversion.sh
+++ b/manifest_osversion.sh
@@ -32,8 +32,8 @@ for ((i=0;i<${#imagetags[@]};++i)); do
   image_folder=$(echo "${IMAGETAG}" | sed "s|/|_|g" | sed "s/:/-/")
   echo ${manifest_folder}
 
-  sed -i -r "s/(\"os\"\:\"windows\")/\0,\"os.version\":$full_version/" \
-  "${HOME}/.docker/manifests/${manifest_folder}/${image_folder}"
+  # sed -i -r "s/(\"os\"\:\"windows\")/\0,\"os.version\":$full_version/" \
+  # "${HOME}/.docker/manifests/${manifest_folder}/${image_folder}"
 
   # manifest after transformations
   cat "${HOME}/.docker/manifests/${manifest_folder}/${image_folder}"


Test patch:
diff --git a/test/k8s-integration/main.go b/test/k8s-integration/main.go
index 47742631..1d27a58a 100644
--- a/test/k8s-integration/main.go
+++ b/test/k8s-integration/main.go
@@ -586,7 +586,7 @@ func generateGKETestSkip(testParams *testParameters) string {
 
 	// Cloning test fixes were introduced after 1.23.
 	if curVer.lessThan(mustParseVersion("1.24.0")) {
-		skipString = skipString + "|pvc.data.source"
+		skipString = skipString + "|\\[Feature:VolumeSnapshotDataSource\\]|pvc.data.source"
 	}
 
 	// "volumeMode should not mount / map unused volumes in a pod" tests a
Repository: bytecodealliance/wasmtime
Pull request #8220 (2024-03-22 15:00:34)

cranelift: Constant propagate `bswap`
This adds constant propagation for 16-, 32- and 64-bit `bswap`s. I did not add `u128`, since it seems like ISLE doesn't have any existing rules for dealing with `uimm128`. (Though they could be added, I assume)

Please let me know if there's a better approach for the added rules!

alexcrichton: For 128-bit byteswaps that would probably show up through `(bswap (iconcat (iconst ...) (iconst ...)))` but it's also ok to not handle that in this PR too

Patch:
diff --git a/cranelift/codegen/src/opts.rs b/cranelift/codegen/src/opts.rs
index 4204c6ba3..2d0819a43 100644
--- a/cranelift/codegen/src/opts.rs
+++ b/cranelift/codegen/src/opts.rs
@@ -281,4 +281,16 @@ impl<'a, 'b, 'c> generated_code::Context for IsleContext<'a, 'b, 'c> {
     fn f64_from_sint(&mut self, n: i64) -> Ieee64 {
         Ieee64::with_float(n as f64)
     }
+
+    fn u64_bswap16(&mut self, n: u64) -> u64 {
+        (n as u16).swap_bytes() as u64
+    }
+
+    fn u64_bswap32(&mut self, n: u64) -> u64 {
+        (n as u32).swap_bytes() as u64
+    }
+
+    fn u64_bswap64(&mut self, n: u64) -> u64 {
+        n.swap_bytes()
+    }
 }
diff --git a/cranelift/codegen/src/opts/cprop.isle b/cranelift/codegen/src/opts/cprop.isle
index 77b76a508..8c86ff2c5 100644
--- a/cranelift/codegen/src/opts/cprop.isle
+++ b/cranelift/codegen/src/opts/cprop.isle
@@ -264,3 +264,18 @@
 (extern constructor f32_from_sint f32_from_sint)
 (decl f64_from_sint (i64) Ieee64)
 (extern constructor f64_from_sint f64_from_sint)
+
+;; Constant fold bswap of a constant.
+(rule (simplify (bswap $I16 (iconst ty (u64_from_imm64 n))))
+      (subsume (iconst $I16 (imm64 (u64_bswap16 n)))))
+(rule (simplify (bswap $I32 (iconst ty (u64_from_imm64 n))))
+      (subsume (iconst $I32 (imm64 (u64_bswap32 n)))))
+(rule (simplify (bswap $I64 (iconst ty (u64_from_imm64 n))))
+      (subsume (iconst $I64 (imm64 (u64_bswap64 n)))))
+
+(decl pure u64_bswap16 (u64) u64)
+(extern constructor u64_bswap16 u64_bswap16)
+(decl pure u64_bswap32 (u64) u64)
+(extern constructor u64_bswap32 u64_bswap32)
+(decl pure u64_bswap64 (u64) u64)
+(extern constructor u64_bswap64 u64_bswap64)


Test patch:
diff --git a/cranelift/filetests/filetests/egraph/cprop.clif b/cranelift/filetests/filetests/egraph/cprop.clif
index 6c2218a49..95f902d7b 100644
--- a/cranelift/filetests/filetests/egraph/cprop.clif
+++ b/cranelift/filetests/filetests/egraph/cprop.clif
@@ -282,3 +282,33 @@ block0(v0: i32):
 ; check: v3 = iconst.i32 1
 ; nextln: v4 = iadd v0, v3  ; v3 = 1
 ; nextln: return v4
+
+function %bswap_i16() -> i16 {
+block0:
+    v0 = iconst.i16 0x1234
+    v1 = bswap v0
+    return v1
+}
+
+; check: v2 = iconst.i16 0x3412
+; nextln: return v2
+
+function %bswap_i32() -> i32 {
+block0:
+    v0 = iconst.i32 0x1234_5678
+    v1 = bswap v0
+    return v1
+}
+
+; check: v2 = iconst.i32 0x7856_3412
+; nextln: return v2
+
+function %bswap_i64() -> i64 {
+block0:
+    v0 = iconst.i64 0x1234_5678_9abc_def0
+    v1 = bswap v0
+    return v1
+}
+
+; check: v2 = iconst.i64 0xf0de_bc9a_7856_3412
+; nextln: return v2
Repository: bytecodealliance/wasmtime
Pull request #8284 (2024-04-02 16:02:36)

[19.0.0] Fix a panic using tables with the wrong type 
This is a backport of #8283 to the 19.0.0 release branch.


Patch:
diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs
index 9ad701432..61902beec 100644
--- a/crates/runtime/src/instance.rs
+++ b/crates/runtime/src/instance.rs
@@ -805,7 +805,12 @@ impl Instance {
         // disconnected from the lifetime of `self`.
         let module = self.module().clone();
 
-        let empty = TableSegmentElements::Functions(Box::new([]));
+        // NB: fall back to an expressions-based list of elements which doesn't
+        // have static type information (as opposed to `Functions`) since we
+        // don't know just yet what type the table has. The type will be be
+        // inferred in the next step within `table_init_segment`.
+        let empty = TableSegmentElements::Expressions(Box::new([]));
+
         let elements = match module.passive_elements_map.get(&elem_index) {
             Some(index) if !self.dropped_elements.contains(elem_index) => {
                 &module.passive_elements[*index]


Test patch:
diff --git a/tests/misc_testsuite/externref-table-dropped-segment-issue-8281.wast b/tests/misc_testsuite/externref-table-dropped-segment-issue-8281.wast
new file mode 100644
index 000000000..723c03c80
--- /dev/null
+++ b/tests/misc_testsuite/externref-table-dropped-segment-issue-8281.wast
@@ -0,0 +1,39 @@
+(module
+  (table $t 0 0 externref)
+
+  (func (export "f1")
+    (i32.const 0)
+    (i32.const 0)
+    (i32.const 0)
+    (table.init $t $declared)
+  )
+
+  (func (export "f2")
+    (i32.const 0)
+    (i32.const 0)
+    (i32.const 0)
+    (table.init $t $passive)
+
+    (elem.drop $passive)
+
+    (i32.const 0)
+    (i32.const 0)
+    (i32.const 0)
+    (table.init $t $passive)
+  )
+
+  (func (export "f3")
+    (i32.const 0)
+    (i32.const 0)
+    (i32.const 0)
+    (table.init $t $active)
+  )
+
+  (elem $declared declare externref)
+  (elem $passive externref)
+  (elem $active (i32.const 0) externref)
+)
+
+(assert_return (invoke "f1"))
+(assert_return (invoke "f2"))
+(assert_return (invoke "f3"))