Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(ci): record run_legacy and turbo_result in test-selection telemetry (#72283)

Georges-Antoine Assi4915c9f629e6
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index 1e346ed5508c..1ab3502bcdb4 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -573,6 +573,8 @@ jobs:
full_run_reasons_count: ${{ steps.classify.outputs.full_run_reasons_count }}
selected_test_seconds: ${{ steps.classify.outputs.selected_test_seconds }}
skipped_test_seconds: ${{ steps.classify.outputs.skipped_test_seconds }}
+ run_legacy: ${{ steps.fallback.outputs.run_legacy }}
+ turbo_result: ${{ steps.fallback.outputs.turbo_result }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
@@ -603,6 +605,10 @@ jobs:
skip=true
fi
echo "skip=$skip" >> "$GITHUB_OUTPUT"
+ # Surface the inputs behind an untrusted skip so the telemetry can
+ # tell legacy-graph impact apart from a turbo-discover failure.
+ echo "run_legacy=${RUN_LEGACY:-}" >> "$GITHUB_OUTPUT"
+ echo "turbo_result=${TURBO_RESULT:-}" >> "$GITHUB_OUTPUT"
- name: Run shadow selector
id: select
diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml
index 73517f3e3a89..3385dff59799 100644
--- a/.github/workflows/ci-backend.yml
+++ b/.github/workflows/ci-backend.yml
@@ -490,6 +490,8 @@ jobs:
changed_file_count: ${{ steps.classify.outputs.changed_file_count }}
selected_test_count: ${{ steps.classify.outputs.selected_test_count }}
full_run_reasons_count: ${{ steps.classify.outputs.full_run_reasons_count }}
+ run_legacy: ${{ steps.fallback.outputs.run_legacy }}
+ turbo_result: ${{ steps.fallback.outputs.turbo_result }}
selected_test_seconds: ${{ steps.classify.outputs.selected_test_seconds }}
skipped_test_seconds: ${{ steps.classify.outputs.skipped_test_seconds }}
steps:
@@ -522,6 +524,10 @@ jobs:
skip=true
fi
echo "skip=$skip" >> "$GITHUB_OUTPUT"
+ # Surface the inputs behind an untrusted skip so the telemetry can
+ # tell legacy-graph impact apart from a turbo-discover failure.
+ echo "run_legacy=${RUN_LEGACY:-}" >> "$GITHUB_OUTPUT"
+ echo "turbo_result=${TURBO_RESULT:-}" >> "$GITHUB_OUTPUT"
- name: Run shadow selector
id: select
@@ -3495,6 +3501,8 @@ jobs:
"changed_file_count": ${{ needs.select-tests.outputs.changed_file_count || 'null' }},
"selected_test_count": ${{ needs.select-tests.outputs.selected_test_count || 'null' }},
"full_run_reasons_count": ${{ needs.select-tests.outputs.full_run_reasons_count || 'null' }},
+ "run_legacy": ${{ toJSON(needs.select-tests.outputs.run_legacy || '') }},
+ "turbo_result": ${{ toJSON(needs.select-tests.outputs.turbo_result || '') }},
"selected_test_seconds": ${{ needs.select-tests.outputs.selected_test_seconds || 'null' }},
"skipped_test_seconds": ${{ needs.select-tests.outputs.skipped_test_seconds || 'null' }},
"run_poe": ${{ needs.select-tests.outputs.run_poe || 'false' }},