From 489dfd094528a6bf9fcc41e342038f21ca3c8688 Mon Sep 17 00:00:00 2001 From: Frank Chen Date: Tue, 18 Aug 2026 18:10:34 +0000 Subject: [PATCH] ci: call opentelemetry orchestrator workflow --- ...test_opentelemetry_conformance_workflow.py | 53 +++++++++++++++++++ .../opentelemetry-conformance-tests.yml | 17 ++++-- .github/workflows/test-parser.yml | 5 +- 3 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 .github/scripts/tests/test_opentelemetry_conformance_workflow.py diff --git a/.github/scripts/tests/test_opentelemetry_conformance_workflow.py b/.github/scripts/tests/test_opentelemetry_conformance_workflow.py new file mode 100644 index 00000000..d0840202 --- /dev/null +++ b/.github/scripts/tests/test_opentelemetry_conformance_workflow.py @@ -0,0 +1,53 @@ +from pathlib import Path + +import yaml + + +WORKFLOW_PATH = ( + Path(__file__).parents[2] / "workflows" / "opentelemetry-conformance-tests.yml" +) +ORCHESTRATOR_REVISION = "4fd176f7ddf696fd57c31ca6a9b23d0ccbbbdc19" + + +def test_opentelemetry_workflow_calls_python_orchestrator() -> None: + workflow = yaml.safe_load(WORKFLOW_PATH.read_text()) + job = workflow["jobs"]["opentelemetry"] + + assert job["uses"] == ( + "aws/aws-durable-execution-conformance-tests/.github/workflows/" + f"opentelemetry-orchestrator.yml@{ORCHESTRATOR_REVISION}" + ) + assert job["with"] == { + "language": "python", + "resource_prefix": "p", + "sdk_repository": "aws/aws-durable-execution-sdk-python", + "sdk_ref": "${{ github.event.pull_request.head.sha || github.sha }}", + "conformance_test_ref": "${{ inputs.conformance_test_ref || 'main' }}", + "checkout_sdk": False, + "contract_test_command": ( + "hatch run test:all " + "packages/aws-durable-execution-conformance-tests-otel/" + "tests/test_python_examples.py" + ), + "adot_release_repository": ( + "aws-observability/aws-otel-python-instrumentation" + ), + "collector_compatible_runtime": "python3.13", + "collector_otlp_endpoint": "http://localhost:4318", + "suite_timeout_minutes": 30, + "phase": "${{ inputs.phase || 'short' }}", + "delay_seconds": "${{ inputs.delay_seconds || '82800' }}", + "aws_region": "${{ inputs.aws_region || 'us-west-2' }}", + "otlp_endpoint": "${{ inputs.otlp_endpoint || '' }}", + } + assert job["secrets"] == { + "CONFORMANCE_TEST_ROLE_ARN": "${{ secrets.TEST_ROLE_ARN }}", + "CONFORMANCE_TEST_ACCOUNT_ID": "${{ secrets.TEST_ACCOUNT_ID }}", + "CONFORMANCE_TEST_LAMBDA_EXECUTION_ROLE_ARN": ( + "${{ secrets.TEST_LAMBDA_EXECUTION_ROLE_ARN }}" + ), + "DASH0_AUTH_TOKEN": "${{ secrets.DASH0_AUTH_TOKEN }}", + "DD_API_KEY": "${{ secrets.DD_API_KEY }}", + "DD_APPLICATION_KEY": "${{ secrets.DD_APPLICATION_KEY }}", + "DATADOG_OTLP_HEADERS": "${{ secrets.DATADOG_OTLP_HEADERS }}", + } diff --git a/.github/workflows/opentelemetry-conformance-tests.yml b/.github/workflows/opentelemetry-conformance-tests.yml index 23d6e471..296fae7e 100644 --- a/.github/workflows/opentelemetry-conformance-tests.yml +++ b/.github/workflows/opentelemetry-conformance-tests.yml @@ -52,14 +52,25 @@ jobs: actions: write contents: read id-token: write - uses: aws/aws-durable-execution-conformance-tests/.github/workflows/python-opentelemetry.yml@4fd176f7ddf696fd57c31ca6a9b23d0ccbbbdc19 + uses: aws/aws-durable-execution-conformance-tests/.github/workflows/opentelemetry-orchestrator.yml@4fd176f7ddf696fd57c31ca6a9b23d0ccbbbdc19 with: + language: python + resource_prefix: p + sdk_repository: aws/aws-durable-execution-sdk-python + sdk_ref: ${{ github.event.pull_request.head.sha || github.sha }} + conformance_test_ref: ${{ inputs.conformance_test_ref || 'main' }} + checkout_sdk: false + contract_test_command: >- + hatch run test:all + packages/aws-durable-execution-conformance-tests-otel/tests/test_python_examples.py + adot_release_repository: aws-observability/aws-otel-python-instrumentation + collector_compatible_runtime: python3.13 + collector_otlp_endpoint: http://localhost:4318 + suite_timeout_minutes: 30 phase: ${{ inputs.phase || 'short' }} delay_seconds: ${{ inputs.delay_seconds || '82800' }} aws_region: ${{ inputs.aws_region || 'us-west-2' }} otlp_endpoint: ${{ inputs.otlp_endpoint || '' }} - conformance_test_ref: ${{ inputs.conformance_test_ref || 'main' }} - python_sdk_ref: ${{ github.event.pull_request.head.sha || github.sha }} secrets: CONFORMANCE_TEST_ROLE_ARN: ${{ secrets.TEST_ROLE_ARN }} CONFORMANCE_TEST_ACCOUNT_ID: ${{ secrets.TEST_ACCOUNT_ID }} diff --git a/.github/workflows/test-parser.yml b/.github/workflows/test-parser.yml index fde37133..629ebf00 100644 --- a/.github/workflows/test-parser.yml +++ b/.github/workflows/test-parser.yml @@ -6,12 +6,14 @@ on: - '.github/scripts/build_lambda_layer.py' - '.github/scripts/parse_sdk_branch.py' - '.github/scripts/tests/**' + - '.github/workflows/opentelemetry-conformance-tests.yml' push: branches: [ main ] paths: - '.github/scripts/build_lambda_layer.py' - '.github/scripts/parse_sdk_branch.py' - '.github/scripts/tests/**' + - '.github/workflows/opentelemetry-conformance-tests.yml' permissions: contents: read @@ -23,10 +25,11 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install test dependencies - run: python -m pip install pytest + run: python -m pip install pytest PyYAML==6.0.2 - name: Run script tests run: | python -m pytest \ .github/scripts/tests/test_build_lambda_layer.py \ + .github/scripts/tests/test_opentelemetry_conformance_workflow.py \ .github/scripts/tests/test_parse_sdk_branch.py