nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: smithy-lang/smithy
Pull request #1881 (2023-07-25 14:03:14)

Fix ServiceTrait serialization
*Description of changes:*
This commit fixes the serialization of the target property of ServiceTrait by serializing the ShapeId with it's namespace qualifier.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.



Patch:
diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ServiceTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ServiceTrait.java
index dc539c69a..bc8cdcd3b 100644
--- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ServiceTrait.java
+++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ServiceTrait.java
@@ -206,7 +206,7 @@ public final class ServiceTrait extends AbstractTrait implements ToSmithyBuilder
     protected Node createNode() {
         return Node.objectNodeBuilder()
                 .sourceLocation(getSourceLocation())
-                .withMember("target", Node.from(target.getName()))
+                .withMember("target", Node.from(target.toString()))
                 .withMember("sdkId", Node.from(sdkId))
                 .withMember("arnNamespace", Node.from(getArnNamespace()))
                 .withMember("cloudFormationName", Node.from(getCloudFormationName()))


Test patch:
diff --git a/smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/ServiceTraitTest.java b/smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/ServiceTraitTest.java
index 2765bc170..21bff845d 100644
--- a/smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/ServiceTraitTest.java
+++ b/smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/ServiceTraitTest.java
@@ -16,6 +16,7 @@
 package software.amazon.smithy.aws.traits;
 
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.instanceOf;
 import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -49,6 +50,8 @@ public class ServiceTraitTest {
         assertThat(serviceTrait.getEndpointPrefix(), equalTo("foo"));
         assertThat(serviceTrait.toBuilder().build(), equalTo(serviceTrait));
         assertFalse(serviceTrait.getDocId().isPresent());
+        assertThat(Node.prettyPrintJson(serviceTrait.createNode()),
+                containsString("\"target\": \"ns.foo#Foo\","));
     }
 
     @Test
Repository: SAP/cloud-security-xsuaa-integration
Pull request #677 (2021-09-28 11:27:46)

[java-security-test] replace wiremock-jre8-standalone with wiremock-jre8
a stakeholder reported:
![image](https://user-images.githubusercontent.com/5861301/135079828-d6e15579-87e5-4228-bd8a-2bb45ca08550.png)



Patch:
diff --git a/pom.xml b/pom.xml
index 62bea7a0..b821acaf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,6 +80,7 @@
 		<mockito.version>3.12.4</mockito.version>
 		<assertj.version>3.21.0</assertj.version>
 		<reactor.test.version>3.4.10</reactor.test.version>
+		<wiremock.version>2.31.0</wiremock.version>
 		<skipTests>false</skipTests>
 		<jacoco.skip>${skipTests}</jacoco.skip>
 	</properties>
@@ -302,6 +303,11 @@
 				<artifactId>spring-boot-starter-test</artifactId>
 				<version>${spring.boot.version}</version>
 			</dependency>
+			<dependency>
+				<groupId>com.github.tomakehurst</groupId>
+				<artifactId>wiremock-jre8</artifactId>
+				<version>${wiremock.version}</version>
+			</dependency>
 		</dependencies>
 	</dependencyManagement>
 
@@ -385,7 +391,7 @@
 						<plugin>
 							<groupId>org.owasp</groupId> <!--scans for vulnerabilities-->
 							<artifactId>dependency-check-maven</artifactId>
-							<version>6.3.1</version>
+							<version>6.3.2</version>
 							<executions>
 								<execution>
 									<goals>


Test patch:
diff --git a/java-security-test/pom.xml b/java-security-test/pom.xml
index e357139a..566845ea 100644
--- a/java-security-test/pom.xml
+++ b/java-security-test/pom.xml
@@ -17,10 +17,6 @@
 	<name>java-security-test</name>
 	<packaging>jar</packaging>
 
-	<properties>
-		<wiremock.version>2.31.0</wiremock.version>
-	</properties>
-
 	<dependencies>
         <dependency>
             <groupId>com.sap.cloud.security</groupId>
@@ -71,8 +67,7 @@
 		</dependency>
 		<dependency>
 			<groupId>com.github.tomakehurst</groupId>
-			<artifactId>wiremock-jre8-standalone</artifactId>
-			<version>${wiremock.version}</version>
+			<artifactId>wiremock-jre8</artifactId>
 		</dependency>
 
 		<!-- test dependencies -->
Repository: postmanlabs/postman-code-generators
Pull request #417 (2020-11-05 10:59:22)

Use enum instead of string for quote option in curl


Patch:
diff --git a/codegens/curl/lib/index.js b/codegens/curl/lib/index.js
index 44e7410..473c6c2 100644
--- a/codegens/curl/lib/index.js
+++ b/codegens/curl/lib/index.js
@@ -196,7 +196,7 @@ self = module.exports = {
         name: 'Quote Type',
         id: 'quoteType',
         availableOptions: ['single', 'double'],
-        type: 'string',
+        type: 'enum',
         default: 'single',
         description: 'String denoting the quote type to use (single or double) for URL ' +
           '(Use double quotes when running curl in cmd.exe and single quotes for the rest)'
diff --git a/package-lock.json b/package-lock.json
index 91ae69e..2af2efa 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5141,15 +5141,6 @@
         "find-up": "^3.0.0"
       }
     },
-    "plur": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz",
-      "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=",
-      "dev": true,
-      "requires": {
-        "irregular-plurals": "^1.0.0"
-      }
-    },
     "pluralize": {
       "version": "7.0.0",
       "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz",


Test patch:
diff --git a/test/codegen/structure.test.js b/test/codegen/structure.test.js
index c23d62a..7fbdf0b 100644
--- a/test/codegen/structure.test.js
+++ b/test/codegen/structure.test.js
@@ -70,7 +70,7 @@ const expectedOptions = {
     },
     quoteType: {
       name: 'Quote Type',
-      type: 'string',
+      type: 'enum',
       default: 'single',
       description: 'String denoting the quote type to use (single or double) for URL ' +
           '(Use double quotes when running curl in cmd.exe and single quotes for the rest)'
Repository: rancher-sandbox/cluster-api-provider-rke2
Pull request #195 (2023-11-13 13:25:53)

Run ignition bootstrap script only once
<!--
Label the PR with the kind of change this for:

kind/feature
kind/bug
kind/documentation
kind/regression
kind/*
-->

**What this PR does / why we need it**:
Currently, bootstrap script used in igntion config runs each time the machine is booted, if machine is rebooted for some reason we try to install RKE2 again.

This PR adds a check to the systemd unit that looks for `/run/cluster-api/bootstrap-success.complete` and runs script only if path doesn't exist.

<!-- Enter a description of the change and why this change is needed -->

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Checklist**:
<!-- Put an "X" character inside the brackets of each completed task. Some may be optional depending on the PR in which case these can be deleted -->

- [ ] squashed commits into logical changes
- [ ] includes documentation
- [ ] adds unit tests
- [ ] adds or updates e2e tests



Patch:
diff --git a/bootstrap/internal/ignition/butane/butane.go b/bootstrap/internal/ignition/butane/butane.go
index ec59fda..376323c 100644
--- a/bootstrap/internal/ignition/butane/butane.go
+++ b/bootstrap/internal/ignition/butane/butane.go
@@ -54,6 +54,7 @@ systemd:
         Description=rke2-install
         Wants=network-online.target
         After=network-online.target network.target
+        ConditionPathExists=!/run/cluster-api/bootstrap-success.complete
         [Service]
         User=root
         # To not restart the unit when it exits, as it is expected.


Test patch:
diff --git a/bootstrap/internal/ignition/butane/butane_test.go b/bootstrap/internal/ignition/butane/butane_test.go
index e39cab2..8935205 100644
--- a/bootstrap/internal/ignition/butane/butane_test.go
+++ b/bootstrap/internal/ignition/butane/butane_test.go
@@ -119,7 +119,7 @@ var _ = Describe("Render", func() {
 
 		Expect(ign.Systemd.Units).To(HaveLen(3))
 		Expect(ign.Systemd.Units[0].Name).To(Equal("rke2-install.service"))
-		Expect(ign.Systemd.Units[0].Contents).To(Equal(pointer.String("[Unit]\nDescription=rke2-install\nWants=network-online.target\nAfter=network-online.target network.target\n[Service]\nUser=root\n# To not restart the unit when it exits, as it is expected.\nType=oneshot\nExecStart=/etc/rke2-install.sh\n[Install]\nWantedBy=multi-user.target\n")))
+		Expect(ign.Systemd.Units[0].Contents).To(Equal(pointer.String("[Unit]\nDescription=rke2-install\nWants=network-online.target\nAfter=network-online.target network.target\nConditionPathExists=!/run/cluster-api/bootstrap-success.complete\n[Service]\nUser=root\n# To not restart the unit when it exits, as it is expected.\nType=oneshot\nExecStart=/etc/rke2-install.sh\n[Install]\nWantedBy=multi-user.target\n")))
 		Expect(ign.Systemd.Units[0].Enabled).To(Equal(pointer.Bool(true)))
 
 		Expect(ign.Systemd.Units[1].Name).To(Equal("ntpd.service"))