diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25558cc5..243f3bec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,28 +57,46 @@ jobs: with: test_scenarios: node.* secrets: inherit + # Resolve dd-trace-py main/ to one commit so every Python job and shard installs the same build. + ddtrace_main: + runs-on: ubuntu-latest + outputs: + install_url: ${{ steps.resolve.outputs.install_url }} + steps: + - id: resolve + run: | + sha=$(curl -fsSL https://dd-trace-py-builds.s3.amazonaws.com/main/metadata.txt | sed -n 's/^commit_sha=//p') + [[ "$sha" =~ ^[0-9a-f]{40}$ ]] || { echo "bad commit_sha: '$sha'"; exit 1; } + url="https://dd-trace-py-builds.s3.amazonaws.com/${sha}/install.sh" + curl -fsSI "$url" > /dev/null + echo "dd-trace-py main is ${sha}" + echo "install_url=${url}" >> "$GITHUB_OUTPUT" python: + needs: ddtrace_main uses: ./.github/workflows/test.yml with: test_scenarios: 'python.*' # Gate pairs are python_3_14 / python_3_15. live_heap_3.14 is wheel-only. test_scenarios_exclude: '_3\.(14|15)$|^python_downstream_gate$' + ddtrace_install_url: ${{ needs.ddtrace_main.outputs.install_url }} secrets: inherit - # Both gates use rc2-era pinned wheels; 3.15 uses the Python 3.15.0rc2 image. + # 3.15 uses the Python 3.15.0rc2 image. python_3_14: name: python 3.14 + needs: ddtrace_main uses: ./.github/workflows/test.yml with: test_scenarios: 'python_(cpu|alloc|asyncio|native_cpu|deep_stack|gil_contention|uvloop|exceptions|async_gen|lock|live_heap)_3\.14' - ddtrace_install_url: 'https://dd-trace-py-builds.s3.amazonaws.com/6c2d10971404884620ce61c85de886f14bf711cf/install.sh' + ddtrace_install_url: ${{ needs.ddtrace_main.outputs.install_url }} capture_artifact: gate-3.14 secrets: inherit python_3_15: name: python 3.15 + needs: ddtrace_main uses: ./.github/workflows/test.yml with: test_scenarios: 'python_(cpu|alloc|asyncio|native_cpu|deep_stack|gil_contention|uvloop|exceptions|async_gen|lock|live_heap)_3\.15' - ddtrace_install_url: 'https://dd-trace-py-builds.s3.amazonaws.com/1b27090c9ee46afa2bd5a9e2ef0cc7660125b652/install.sh' + ddtrace_install_url: ${{ needs.ddtrace_main.outputs.install_url }} capture_artifact: gate-3.15 secrets: inherit compare: diff --git a/scenarios/python_deep_stack/profile.json b/scenarios/python_deep_stack/profile.json index 07ec3cac..a011a013 100644 --- a/scenarios/python_deep_stack/profile.json +++ b/scenarios/python_deep_stack/profile.json @@ -6,7 +6,7 @@ "profile-type": "cpu-time", "stack-content": [ { - "regular_expression": "[0-9]+ frames omitted>;(recurse;){50,}burn", + "regular_expression": "[0-9]+ frames? omitted>;(recurse;){50,}burn", "percent": 100, "error_margin": 5 } diff --git a/scenarios/python_deep_stack_3.14/README.md b/scenarios/python_deep_stack_3.14/README.md index 728a4fee..9aeca24b 100644 --- a/scenarios/python_deep_stack_3.14/README.md +++ b/scenarios/python_deep_stack_3.14/README.md @@ -4,7 +4,7 @@ Pair: `python_deep_stack_3.14` / `python_deep_stack_3.15`. Asserts **cpu-time** | Profile type | Stack | Expected % | Margin | |--------------|-------|------------|--------| -| cpu-time | `;recurse;…;burn` | 100 | 5 | +| cpu-time | `;recurse;…;burn` | 100 | 5 | Runs on `main` CI (PyPI ddtrace). diff --git a/scenarios/python_downstream_gate/README.md b/scenarios/python_downstream_gate/README.md index e3a7a10f..bfa92534 100644 --- a/scenarios/python_downstream_gate/README.md +++ b/scenarios/python_downstream_gate/README.md @@ -31,8 +31,8 @@ Override via `workflow_dispatch` → `test_scenarios` on [`downstream-python.yml Builds use [`base_images/Dockerfile.python-wheel`](../../base_images/Dockerfile.python-wheel) with `DDTRACE_INSTALL_URL` (S3 wheel from downstream CI). -- `python` — old (non-gate) Python scenarios, PyPI ddtrace -- `python_3_14` / `python_3_15` — gate pairs, same pinned S3 wheel (temporary until natives are on main) +- `python` — old (non-gate) Python scenarios, latest dd-trace-py `main` S3 build +- `python_3_14` / `python_3_15` — gate pairs, latest dd-trace-py `main` S3 build ## Local run