nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: compose-spec/compose-go
Pull request #333 (2022-12-23 18:13:50)

Add support for `uts` attribute in service definition
Signed-off-by: Laura Brehm <laurabrehm@hey.com>


Patch:
diff --git a/loader/full-example.yml b/loader/full-example.yml
index 585c31b..5c62e81 100644
--- a/loader/full-example.yml
+++ b/loader/full-example.yml
@@ -182,6 +182,8 @@ services:
 
     ipc: host
 
+    uts: host
+
     # Mapping or list
     # Mapping values can be strings, numbers or null
     labels:
diff --git a/schema/compose-spec.json b/schema/compose-spec.json
index 7e69382..b7b90c3 100644
--- a/schema/compose-spec.json
+++ b/schema/compose-spec.json
@@ -366,6 +366,7 @@
           }
         },
         "user": {"type": "string"},
+        "uts": {"type": "string"},
         "userns_mode": {"type": "string"},
         "volumes": {
           "type": "array",


Test patch:
diff --git a/loader/full-struct_test.go b/loader/full-struct_test.go
index 263ef22..d98c256 100644
--- a/loader/full-struct_test.go
+++ b/loader/full-struct_test.go
@@ -200,6 +200,7 @@ func services(workingDir, homeDir string) []types.ServiceConfig {
 			Hostname: "foo",
 			Image:    "redis",
 			Ipc:      "host",
+			Uts:      "host",
 			Labels: map[string]string{
 				"com.example.description": "Accounting webapp",
 				"com.example.number":      "42",
@@ -877,6 +878,7 @@ services:
         hard: 40000
       nproc: 65535
     user: someone
+    uts: host
     volumes:
     - type: volume
       target: /var/lib/mysql
@@ -1530,6 +1532,7 @@ func fullExampleJSON(workingDir, homeDir string) string {
         "nproc": 65535
       },
       "user": "someone",
+      "uts": "host",
       "volumes": [
         {
           "type": "volume",