Skip to content

Commit 5ad8bef

Browse files
committed
ci: post PR E2E checks with subprocess.run
The reporter used subprocess.check_call(..., input=...), which Popen rejects. Placeholders made that path run immediately, so the publisher exited before creating any pull request checks. Signed-off-by: Zujian Zhang <zhangzujian.7@gmail.com>
1 parent 9a19364 commit 5ad8bef

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/build-x86-image.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5488,7 +5488,7 @@ jobs:
54885488
None,
54895489
)
54905490
if checkId is None:
5491-
subprocess.check_call(
5491+
subprocess.run(
54925492
[
54935493
"gh",
54945494
"api",
@@ -5500,12 +5500,13 @@ jobs:
55005500
],
55015501
input=json.dumps(payload),
55025502
text=True,
5503+
check=True,
55035504
)
55045505
else:
55055506
update = dict(payload)
55065507
update.pop("name", None)
55075508
update.pop("head_sha", None)
5508-
subprocess.check_call(
5509+
subprocess.run(
55095510
[
55105511
"gh",
55115512
"api",
@@ -5517,6 +5518,7 @@ jobs:
55175518
],
55185519
input=json.dumps(update),
55195520
text=True,
5521+
check=True,
55205522
)
55215523
published[externalId] = fingerprint
55225524
print(

hack/test_e2e_control.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,6 +1495,10 @@ def testPullRequestsExecuteAutomaticCoverageAndPushStaysFull(self):
14951495
self.assertIn("prCheckRunsToPublish", publish)
14961496
self.assertIn("visibleInfrastructureTitles", publish)
14971497
self.assertIn("selectedExecutorJobsAreTerminal", publish)
1498+
self.assertIn("subprocess.run(", publish)
1499+
self.assertIn("input=json.dumps(payload)", publish)
1500+
self.assertIn("check=True", publish)
1501+
self.assertNotIn("subprocess.check_call", publish)
14981502
self.assertIn("time.sleep(20)", publish)
14991503
self.assertIn("HEAD_SHA: ${{ inputs.headSHA }}", publish)
15001504
self.assertIn("- e2e-selection\n", publish)

0 commit comments

Comments
 (0)