Skip to content

Commit 489dfd0

Browse files
committed
ci: call opentelemetry orchestrator workflow
1 parent 479832b commit 489dfd0

3 files changed

Lines changed: 71 additions & 4 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
from pathlib import Path
2+
3+
import yaml
4+
5+
6+
WORKFLOW_PATH = (
7+
Path(__file__).parents[2] / "workflows" / "opentelemetry-conformance-tests.yml"
8+
)
9+
ORCHESTRATOR_REVISION = "4fd176f7ddf696fd57c31ca6a9b23d0ccbbbdc19"
10+
11+
12+
def test_opentelemetry_workflow_calls_python_orchestrator() -> None:
13+
workflow = yaml.safe_load(WORKFLOW_PATH.read_text())
14+
job = workflow["jobs"]["opentelemetry"]
15+
16+
assert job["uses"] == (
17+
"aws/aws-durable-execution-conformance-tests/.github/workflows/"
18+
f"opentelemetry-orchestrator.yml@{ORCHESTRATOR_REVISION}"
19+
)
20+
assert job["with"] == {
21+
"language": "python",
22+
"resource_prefix": "p",
23+
"sdk_repository": "aws/aws-durable-execution-sdk-python",
24+
"sdk_ref": "${{ github.event.pull_request.head.sha || github.sha }}",
25+
"conformance_test_ref": "${{ inputs.conformance_test_ref || 'main' }}",
26+
"checkout_sdk": False,
27+
"contract_test_command": (
28+
"hatch run test:all "
29+
"packages/aws-durable-execution-conformance-tests-otel/"
30+
"tests/test_python_examples.py"
31+
),
32+
"adot_release_repository": (
33+
"aws-observability/aws-otel-python-instrumentation"
34+
),
35+
"collector_compatible_runtime": "python3.13",
36+
"collector_otlp_endpoint": "http://localhost:4318",
37+
"suite_timeout_minutes": 30,
38+
"phase": "${{ inputs.phase || 'short' }}",
39+
"delay_seconds": "${{ inputs.delay_seconds || '82800' }}",
40+
"aws_region": "${{ inputs.aws_region || 'us-west-2' }}",
41+
"otlp_endpoint": "${{ inputs.otlp_endpoint || '' }}",
42+
}
43+
assert job["secrets"] == {
44+
"CONFORMANCE_TEST_ROLE_ARN": "${{ secrets.TEST_ROLE_ARN }}",
45+
"CONFORMANCE_TEST_ACCOUNT_ID": "${{ secrets.TEST_ACCOUNT_ID }}",
46+
"CONFORMANCE_TEST_LAMBDA_EXECUTION_ROLE_ARN": (
47+
"${{ secrets.TEST_LAMBDA_EXECUTION_ROLE_ARN }}"
48+
),
49+
"DASH0_AUTH_TOKEN": "${{ secrets.DASH0_AUTH_TOKEN }}",
50+
"DD_API_KEY": "${{ secrets.DD_API_KEY }}",
51+
"DD_APPLICATION_KEY": "${{ secrets.DD_APPLICATION_KEY }}",
52+
"DATADOG_OTLP_HEADERS": "${{ secrets.DATADOG_OTLP_HEADERS }}",
53+
}

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,25 @@ jobs:
5252
actions: write
5353
contents: read
5454
id-token: write
55-
uses: aws/aws-durable-execution-conformance-tests/.github/workflows/python-opentelemetry.yml@4fd176f7ddf696fd57c31ca6a9b23d0ccbbbdc19
55+
uses: aws/aws-durable-execution-conformance-tests/.github/workflows/opentelemetry-orchestrator.yml@4fd176f7ddf696fd57c31ca6a9b23d0ccbbbdc19
5656
with:
57+
language: python
58+
resource_prefix: p
59+
sdk_repository: aws/aws-durable-execution-sdk-python
60+
sdk_ref: ${{ github.event.pull_request.head.sha || github.sha }}
61+
conformance_test_ref: ${{ inputs.conformance_test_ref || 'main' }}
62+
checkout_sdk: false
63+
contract_test_command: >-
64+
hatch run test:all
65+
packages/aws-durable-execution-conformance-tests-otel/tests/test_python_examples.py
66+
adot_release_repository: aws-observability/aws-otel-python-instrumentation
67+
collector_compatible_runtime: python3.13
68+
collector_otlp_endpoint: http://localhost:4318
69+
suite_timeout_minutes: 30
5770
phase: ${{ inputs.phase || 'short' }}
5871
delay_seconds: ${{ inputs.delay_seconds || '82800' }}
5972
aws_region: ${{ inputs.aws_region || 'us-west-2' }}
6073
otlp_endpoint: ${{ inputs.otlp_endpoint || '' }}
61-
conformance_test_ref: ${{ inputs.conformance_test_ref || 'main' }}
62-
python_sdk_ref: ${{ github.event.pull_request.head.sha || github.sha }}
6374
secrets:
6475
CONFORMANCE_TEST_ROLE_ARN: ${{ secrets.TEST_ROLE_ARN }}
6576
CONFORMANCE_TEST_ACCOUNT_ID: ${{ secrets.TEST_ACCOUNT_ID }}

.github/workflows/test-parser.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ on:
66
- '.github/scripts/build_lambda_layer.py'
77
- '.github/scripts/parse_sdk_branch.py'
88
- '.github/scripts/tests/**'
9+
- '.github/workflows/opentelemetry-conformance-tests.yml'
910
push:
1011
branches: [ main ]
1112
paths:
1213
- '.github/scripts/build_lambda_layer.py'
1314
- '.github/scripts/parse_sdk_branch.py'
1415
- '.github/scripts/tests/**'
16+
- '.github/workflows/opentelemetry-conformance-tests.yml'
1517

1618
permissions:
1719
contents: read
@@ -23,10 +25,11 @@ jobs:
2325
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2426

2527
- name: Install test dependencies
26-
run: python -m pip install pytest
28+
run: python -m pip install pytest PyYAML==6.0.2
2729

2830
- name: Run script tests
2931
run: |
3032
python -m pytest \
3133
.github/scripts/tests/test_build_lambda_layer.py \
34+
.github/scripts/tests/test_opentelemetry_conformance_workflow.py \
3235
.github/scripts/tests/test_parse_sdk_branch.py

0 commit comments

Comments
 (0)