Skip to content

Commit 7564899

Browse files
author
Frank Chen
committed
ci: preserve queued conformance runs
1 parent ff7b75f commit 7564899

4 files changed

Lines changed: 45 additions & 5 deletions

File tree

‎.github/scripts/tests/test_opentelemetry_conformance_workflow.py‎

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from pathlib import Path
22

3+
import yaml
4+
35

46
WORKFLOW_PATH = (
57
Path(__file__).parents[2] / "workflows" / "opentelemetry-conformance-tests.yml"
68
)
7-
EXAMPLES_DIR = (
8-
".build/durable-sdk/packages/aws-durable-execution-sdk-python-conformance-tests-otel"
9-
)
9+
EXAMPLES_DIR = ".build/durable-sdk/packages/aws-durable-execution-sdk-python-conformance-tests-otel"
1010

1111

1212
def test_opentelemetry_conformance_caller_uses_current_workflow_contract() -> None:
@@ -67,8 +67,39 @@ def test_opentelemetry_conformance_runs_when_the_handlers_change() -> None:
6767
workflow = WORKFLOW_PATH.read_text()
6868

6969
trigger_path = (
70-
" - "
71-
'"packages/aws-durable-execution-sdk-python-conformance-tests-otel/**"'
70+
' - "packages/aws-durable-execution-sdk-python-conformance-tests-otel/**"'
7271
)
7372
# Once for pull_request, once for push.
7473
assert workflow.count(trigger_path) == 2
74+
75+
76+
def test_opentelemetry_conformance_queues_complete_runs() -> None:
77+
workflow = yaml.safe_load(WORKFLOW_PATH.read_text())
78+
79+
assert workflow["concurrency"] == {
80+
"group": "otel-conformance-tests",
81+
"cancel-in-progress": False,
82+
"queue": "max",
83+
}
84+
85+
86+
def test_cloud_tests_queue_each_shared_runtime_stack() -> None:
87+
workflow = yaml.safe_load(WORKFLOW_PATH.with_name("cloud-tests.yml").read_text())
88+
89+
assert workflow["jobs"]["example-tests"]["concurrency"] == {
90+
"group": "cloud-tests-${{ matrix.python-prefix }}",
91+
"cancel-in-progress": False,
92+
"queue": "max",
93+
}
94+
95+
96+
def test_general_conformance_keeps_all_pending_runs() -> None:
97+
workflow = yaml.safe_load(
98+
WORKFLOW_PATH.with_name("conformance-tests.yml").read_text()
99+
)
100+
101+
assert workflow["concurrency"] == {
102+
"group": "conformance-tests-global",
103+
"cancel-in-progress": False,
104+
"queue": "max",
105+
}

‎.github/workflows/cloud-tests.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
concurrency:
4747
group: cloud-tests-${{ matrix.python-prefix }}
4848
cancel-in-progress: false
49+
queue: max
4950
strategy:
5051
fail-fast: false
5152
matrix:

‎.github/workflows/conformance-tests.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ concurrency:
3232
# run against the shared stack.
3333
group: conformance-tests-global
3434
cancel-in-progress: false
35+
queue: max
3536

3637
permissions:
3738
contents: read

‎.github/workflows/opentelemetry-conformance-tests.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ on:
4848
default: main
4949
type: string
5050

51+
# Backend stacks are shared across PRs. Queue whole runs so reusable
52+
# backend jobs do not displace another PR from their pending slots.
53+
concurrency:
54+
group: otel-conformance-tests
55+
cancel-in-progress: false
56+
queue: max
57+
5158
permissions: {}
5259

5360
jobs:

0 commit comments

Comments
 (0)