nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: FHIR/sushi
Pull request #60 (2019-12-19 17:58:54)

Add CodeSystem class
The CodeSystem FSH type represents a set of related concepts.

The only sort of interesting thing here is the `addConcept` helper method, since any `FshCode` added to the system ought to have its `system` property set correctly.

This pull request addresses https://standardhealthrecord.atlassian.net/browse/CIMPL-179


Patch:
diff --git a/src/fshtypes/CodeSystem.ts b/src/fshtypes/CodeSystem.ts
new file mode 100644
index 0000000..c2531e3
--- /dev/null
+++ b/src/fshtypes/CodeSystem.ts
@@ -0,0 +1,23 @@
+import { FshEntity } from './FshEntity';
+import { FshConcept } from './FshConcept';
+
+/**
+ * For more information about a CodeSystem in FHIR,
+ * @see {@link http://hl7.org/fhir/codesystem-definitions.html}
+ */
+export class CodeSystem extends FshEntity {
+  id: string;
+  title?: string;
+  description?: string;
+  concepts: FshConcept[];
+
+  constructor(public name: string) {
+    super();
+    this.id = name;
+    this.concepts = [];
+  }
+
+  addConcept(code: string, display?: string, definition?: string) {
+    this.concepts.push(new FshConcept(code, display, definition));
+  }
+}
diff --git a/src/fshtypes/FshConcept.ts b/src/fshtypes/FshConcept.ts
new file mode 100644
index 0000000..ba2f87c
--- /dev/null
+++ b/src/fshtypes/FshConcept.ts
@@ -0,0 +1,7 @@
+import { FshEntity } from './FshEntity';
+
+export class FshConcept extends FshEntity {
+  constructor(public code: string, public display?: string, public definition?: string) {
+    super();
+  }
+}
diff --git a/src/fshtypes/index.ts b/src/fshtypes/index.ts
index d0a1198..85ee60b 100644
--- a/src/fshtypes/index.ts
+++ b/src/fshtypes/index.ts
@@ -1,3 +1,4 @@
+export * from './CodeSystem';
 export * from './Config';
 export * from './Extension';
 export * from './Instance';


Test patch:
diff --git a/test/fshtypes/CodeSystem.test.ts b/test/fshtypes/CodeSystem.test.ts
new file mode 100644
index 0000000..e38329c
--- /dev/null
+++ b/test/fshtypes/CodeSystem.test.ts
@@ -0,0 +1,15 @@
+import 'jest-extended';
+import { CodeSystem } from '../../src/fshtypes/CodeSystem';
+
+describe('CodeSystem', () => {
+  describe('#constructor', () => {
+    it('should set initial properties correctly', () => {
+      const cs = new CodeSystem('MyCodeSystem');
+      expect(cs.name).toBe('MyCodeSystem');
+      expect(cs.id).toBe('MyCodeSystem');
+      expect(cs.title).toBeUndefined();
+      expect(cs.description).toBeUndefined();
+      expect(cs.concepts).toBeEmpty();
+    });
+  });
+});
Repository: scylladb/scylla-operator
Pull request #911 (2022-01-14 14:32:39)

Explicitly set user/group for all Scylla Pod containers
Currenly Scylla is run as root process. Different default user in Scylla Manager Agent makes
it unable to write to files created by Scylla. Write access is required for backups.

Fixes https://github.com/scylladb/scylla-manager/issues/2977


Patch:
diff --git a/pkg/controller/scyllacluster/resource.go b/pkg/controller/scyllacluster/resource.go
index cf0cfad15..057659274 100644
--- a/pkg/controller/scyllacluster/resource.go
+++ b/pkg/controller/scyllacluster/resource.go
@@ -22,6 +22,11 @@ const (
 	scyllaAgentAuthTokenVolumeName = "scylla-agent-auth-token-volume"
 )
 
+const (
+	rootUID = 0
+	rootGID = 0
+)
+
 func HeadlessServiceForCluster(c *scyllav1.ScyllaCluster) *corev1.Service {
 	return &corev1.Service{
 		ObjectMeta: metav1.ObjectMeta{
@@ -202,6 +207,10 @@ func StatefulSetForRack(r scyllav1.RackSpec, c *scyllav1.ScyllaCluster, existing
 				Spec: corev1.PodSpec{
 					HostNetwork: c.Spec.Network.HostNetworking,
 					DNSPolicy:   c.Spec.Network.GetDNSPolicy(),
+					SecurityContext: &corev1.PodSecurityContext{
+						RunAsUser:  pointer.Int64(rootUID),
+						RunAsGroup: pointer.Int64(rootGID),
+					},
 					Volumes: []corev1.Volume{
 						{
 							Name: "shared",
@@ -336,6 +345,8 @@ func StatefulSetForRack(r scyllav1.RackSpec, c *scyllav1.ScyllaCluster, existing
 							},
 							// Add CAP_SYS_NICE as instructed by scylla logs
 							SecurityContext: &corev1.SecurityContext{
+								RunAsUser:  pointer.Int64(rootUID),
+								RunAsGroup: pointer.Int64(rootGID),
 								Capabilities: &corev1.Capabilities{
 									Add: []corev1.Capability{"SYS_NICE"},
 								},


Test patch:
diff --git a/pkg/controller/scyllacluster/resource_test.go b/pkg/controller/scyllacluster/resource_test.go
index b641ccca1..51dfd0d14 100644
--- a/pkg/controller/scyllacluster/resource_test.go
+++ b/pkg/controller/scyllacluster/resource_test.go
@@ -407,6 +407,10 @@ func TestStatefulSetForRack(t *testing.T) {
 						},
 					},
 					Spec: corev1.PodSpec{
+						SecurityContext: &corev1.PodSecurityContext{
+							RunAsUser:  pointer.Int64(0),
+							RunAsGroup: pointer.Int64(0),
+						},
 						Volumes: []corev1.Volume{
 							{
 								Name: "shared",
@@ -566,6 +570,8 @@ func TestStatefulSetForRack(t *testing.T) {
 									},
 								},
 								SecurityContext: &corev1.SecurityContext{
+									RunAsUser:  pointer.Int64(0),
+									RunAsGroup: pointer.Int64(0),
 									Capabilities: &corev1.Capabilities{
 										Add: []corev1.Capability{"SYS_NICE"},
 									},
Repository: Azure/ARO-RP
Pull request #1998 (2022-03-09 16:26:22)

adding a way to pass additional flags to E2E tests
### Which issue this PR addresses:

Fixes ADO-13793176

### What this PR does / why we need it:

Currently there's no way to pass flags to the e2e tests. This PR adds that feature through the E2E_FLAGS env variable. Default is empty, so it doesn't change the behaviour.

### Test plan for issue:

Running `make test-e2e` behaves as usual. Running `E2E_FLAGS="-ginkgo.noColor" make test-e2e` makes the test output monochromatic.

### Is there any documentation that needs to be updated for this PR?

updated docs/testing.md



Patch:
diff --git a/Makefile b/Makefile
index e57f07af2..d79a24eb0 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@ SHELL = /bin/bash
 TAG ?= $(shell git describe --exact-match 2>/dev/null)
 COMMIT = $(shell git rev-parse --short=7 HEAD)$(shell [[ $$(git status --porcelain) = "" ]] || echo -dirty)
 ARO_IMAGE_BASE = ${RP_IMAGE_ACR}.azurecr.io/aro
+E2E_FLAGS ?= -test.timeout 180m -test.v -ginkgo.v
 
 # fluentbit version must also be updated in RP code, see pkg/util/version/const.go
 FLUENTBIT_VERSION = 1.7.8-1
@@ -141,7 +142,7 @@ e2e.test:
 	go test ./test/e2e -tags e2e,codec.safe -c -ldflags "-X github.com/Azure/ARO-RP/pkg/util/version.GitCommit=$(VERSION)" -o e2e.test
 
 test-e2e: e2e.test
-	./e2e.test -test.timeout 180m -test.v -ginkgo.v
+	./e2e.test $(E2E_FLAGS)
 
 test-go: generate build-all validate-go lint-go unit-test-go
 


Test patch:
diff --git a/docs/testing.md b/docs/testing.md
index cac756424..9f0717662 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -42,6 +42,8 @@ E2e tests can also be run locally as follows:
 - Run the `make test-e2e` target
 - Delete the cosmos database, if applicable
 
+You can also modify the flags passed to the e2e.test run by setting the E2E_FLAGS environment variable before running `make test-e2e`.
+
 These steps can be acheived using commands below.  Look at the [e2e helper
 file](../hack/e2e/run-rp-and-e2e.sh) to understand each of the bash functions
 below.
Repository: Azure/ARO-RP
Pull request #2085 (2022-04-22 16:40:59)

Missed reference to cloud.redhat.com in README file
### Which issue this PR addresses:

I didn't save this file after I made changes and missed checking it in in my other PR.  It's a readme so it's a noop but should update anyway.  



Patch:
diff --git a/.golangci.yml b/.golangci.yml
index 6e05438c3..682ae7a6d 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -13,11 +13,8 @@ issues:
   exclude-use-default: false
 
 linters-settings:
-  gofmt:
-    simplify: false
-  
   stylecheck:
-    # added additional checks for comments in Go. 
+    # added additional checks for comments in Go.
     # Refer https://staticcheck.io/docs/options#checks for details
     checks: ["all", "-ST1000", "ST1020", "ST1021", "ST1022"]
 
@@ -32,6 +29,5 @@ linters:
     - govet
     - staticcheck
     # TODO: Enable the stylecheck linter in a follow-up PR as it requires changes in a lot of files
-    # - stylecheck  
+    # - stylecheck
     - whitespace
-


Test patch:
diff --git a/docs/custom-payload-testing.md b/docs/custom-payload-testing.md
index abe65f182..14d1545d8 100644
--- a/docs/custom-payload-testing.md
+++ b/docs/custom-payload-testing.md
@@ -14,7 +14,7 @@ In this case we will be using an existing release payload as a base for testing.
 
 1. Pull the release payload you want to use as a base to test your changes.
    `config.json` must contain an appropriate pull secret, e.g. one from
-   `cloud.redhat.com`. An example:
+   `cloud.openshift.com`. An example:
 
    ```bash
    podman pull quay.io/openshift-release-dev/ocp-release-nightly@sha256:ab5022516a948e40190e4ce5729737780b96c96d2cf4d3fc665105b32d751d20 \