Skip to content

Commit dd65991

Browse files
committed
rework applying patch logic so that they're one at a time -- currently if one fails, then the rest of the patches don't get applied
1 parent f7ffb36 commit dd65991

7 files changed

Lines changed: 35 additions & 35 deletions

File tree

.evergreen/scripts/resync-all-specs.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,29 @@ def apply_patches(errored):
3737
["bash", "./.evergreen/remove-unimplemented-tests.sh"], # noqa: S607
3838
check=True,
3939
)
40-
try:
41-
# Avoid shell=True by passing arguments as a list.
42-
# Note: glob expansion doesn't work in shell=False, so we use a list of files.
43-
spec_patch_dir = pathlib.Path("./.evergreen/spec-patch/")
44-
patches = [str(p) for p in spec_patch_dir.glob("*.patch")]
45-
patches += [str(p) for p in (spec_patch_dir / "permanent").glob("*.patch")]
46-
if patches:
47-
for patch in patches:
48-
print(f"Applying patch {patch}")
49-
subprocess.run( # noqa: S603
50-
[ # noqa: S607
51-
"git",
52-
"apply",
53-
"-R",
54-
"--allow-empty",
55-
"--whitespace=fix",
56-
*patches,
57-
],
58-
check=True,
59-
stderr=subprocess.PIPE,
60-
)
61-
except CalledProcessError as exc:
62-
errored["applying patches"] = exc.stderr
40+
# Avoid shell=True by passing arguments as a list.
41+
# Note: glob expansion doesn't work in shell=False, so we use a list of files.
42+
spec_patch_dir = pathlib.Path("./.evergreen/spec-patch/")
43+
patches = [str(p) for p in spec_patch_dir.glob("*.patch")]
44+
patches += [str(p) for p in (spec_patch_dir / "permanent").glob("*.patch")]
45+
if patches:
46+
for patch in patches:
47+
print(f"Applying patch {patch}")
48+
try:
49+
subprocess.run( # noqa: S603
50+
[ # noqa: S607
51+
"git",
52+
"apply",
53+
"-R",
54+
"--allow-empty",
55+
"--whitespace=fix",
56+
str(patch),
57+
],
58+
check=True,
59+
stderr=subprocess.PIPE,
60+
)
61+
except CalledProcessError as exc:
62+
errored[f"{patch}"] = exc.stderr
6363

6464

6565
def check_new_spec_directories(directory: pathlib.Path) -> list[str]:

test/load_balancer/cursors.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@
385385
]
386386
},
387387
{
388-
"description": "pinned connections are not returned after an network error during getMore",
388+
"description": "pinned connections are returned after an network error during getMore",
389389
"operations": [
390390
{
391391
"name": "failPoint",
@@ -449,7 +449,7 @@
449449
"object": "testRunner",
450450
"arguments": {
451451
"client": "client0",
452-
"connections": 1
452+
"connections": 0
453453
}
454454
},
455455
{
@@ -677,7 +677,7 @@
677677
]
678678
},
679679
{
680-
"description": "pinned connections are not returned to the pool after a non-network error on getMore",
680+
"description": "pinned connections are returned to the pool after a non-network error on getMore",
681681
"operations": [
682682
{
683683
"name": "failPoint",
@@ -733,7 +733,7 @@
733733
"object": "testRunner",
734734
"arguments": {
735735
"client": "client0",
736-
"connections": 1
736+
"connections": 0
737737
}
738738
},
739739
{

test/load_balancer/sdam-error-handling.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,6 @@
372372
{
373373
"connectionCreatedEvent": {}
374374
},
375-
{
376-
"poolClearedEvent": {}
377-
},
378375
{
379376
"connectionClosedEvent": {
380377
"reason": "error"
@@ -384,6 +381,9 @@
384381
"connectionCheckOutFailedEvent": {
385382
"reason": "connectionError"
386383
}
384+
},
385+
{
386+
"poolClearedEvent": {}
387387
}
388388
]
389389
}

test/server_selection_logging/operation-id.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
}
198198
},
199199
{
200-
"level": "info",
200+
"level": "debug",
201201
"component": "serverSelection",
202202
"data": {
203203
"message": "Waiting for suitable server to become available",
@@ -383,7 +383,7 @@
383383
}
384384
},
385385
{
386-
"level": "info",
386+
"level": "debug",
387387
"component": "serverSelection",
388388
"data": {
389389
"message": "Waiting for suitable server to become available",

test/server_selection_logging/replica-set.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
}
185185
},
186186
{
187-
"level": "info",
187+
"level": "debug",
188188
"component": "serverSelection",
189189
"data": {
190190
"message": "Waiting for suitable server to become available",

test/server_selection_logging/sharded.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
}
194194
},
195195
{
196-
"level": "info",
196+
"level": "debug",
197197
"component": "serverSelection",
198198
"data": {
199199
"message": "Waiting for suitable server to become available",

test/server_selection_logging/standalone.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
}
192192
},
193193
{
194-
"level": "info",
194+
"level": "debug",
195195
"component": "serverSelection",
196196
"data": {
197197
"message": "Waiting for suitable server to become available",

0 commit comments

Comments
 (0)