: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(ci): route trunk uploads to test collections (#108517)
Raúl Negrón-Otero80343aef6f47
diff --git a/.depot/actions/trunk-quarantine-gate/action.yml b/.depot/actions/trunk-quarantine-gate/action.ymlindex 23f3efa63e2e..1e76939d60b7 100644--- a/.depot/actions/trunk-quarantine-gate/action.yml+++ b/.depot/actions/trunk-quarantine-gate/action.yml@@ -15,6 +15,9 @@ inputs:description: 'Trunk variant, for suites whose shards upload under one name'required: falsedefault: ''+ test-collection-id:+ description: 'Trunk test collection that owns these tests'+ required: trueruns:using: 'composite'@@ -36,9 +39,13 @@ runs:id: uploadcontinue-on-error: trueuses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2+ env:+ # Link to the repo view: a new collection has no history yet.+ TRUNK_HIDE_TEST_COLLECTION_LINKS: 'true'with:junit-paths: ${{ inputs.junit-paths }}org-slug: posthog-inc+ test-collection-id: ${{ inputs.test-collection-id }}variant: ${{ inputs.variant }}# Pinned rather than 'latest', which costs an extra github.com request to follow the release redirect.cli-version: '0.15.4'@@ -61,9 +68,12 @@ runs:if: ${{ steps.upload.outcome == 'failure' && inputs.previous-step-outcome == 'success' }}continue-on-error: trueuses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2+ env:+ TRUNK_HIDE_TEST_COLLECTION_LINKS: 'true'with:junit-paths: ${{ inputs.junit-paths }}org-slug: posthog-inc+ test-collection-id: ${{ inputs.test-collection-id }}variant: ${{ inputs.variant }}cli-version: '0.15.4'quarantine: truediff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.ymlindex 3e653dd9e4cc..7725dbdeefd5 100644--- a/.depot/workflows/ci-backend.yml+++ b/.depot/workflows/ci-backend.yml@@ -1499,6 +1499,7 @@ jobs:uses: ./.github/actions/trunk-quarantine-gatewith:junit-paths: trunk-junit/junit-product-*.xml+ test-collection-id: C0LrorjW # backend-product# A native-JSON leg uploads under its own variant, so a failure in that mode# does not read as a flake of the legacy test with the same id.variant: ${{ matrix.new-events-schema && 'events-json' || '' }}@@ -3962,9 +3963,12 @@ jobs:continue-on-error: trueif: ${{ needs.wait-for-handoff.outputs.handed_off == 'true' && (!cancelled() && matrix.segment == 'Core' && needs.changes.outputs.backend == 'true' && env.RUNS_ON_INTERNAL_PR == 'true' && github.repository == 'PostHog/posthog' && github.actor != 'dependabot[bot]' && vars.TRUNK_UPLOAD_ENABLED == 'true') }}uses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2+ env:+ TRUNK_HIDE_TEST_COLLECTION_LINKS: 'true'with:junit-paths: junit-core.xml,junit-core-retry-failures.xmlorg-slug: posthog-inc+ test-collection-id: AA6dvTdI # backend-core# Non-default rows upload under their own variant, so a failure only that mode# hits does not quarantine the default test with the same id.variant: ${{ matrix.compat && format('compat-{0}', matrix.clickhouse-server-image) || matrix.person-on-events && (matrix.new-events-schema && 'poe-off-events-json' || 'poe-off') || matrix.new-events-schema && 'events-json' || '' }}@@ -3978,9 +3982,12 @@ jobs:continue-on-error: trueif: ${{ needs.wait-for-handoff.outputs.handed_off == 'true' && (!cancelled() && matrix.segment == 'Temporal' && needs.changes.outputs.backend == 'true' && env.RUNS_ON_INTERNAL_PR == 'true' && github.repository == 'PostHog/posthog' && github.actor != 'dependabot[bot]' && vars.TRUNK_UPLOAD_ENABLED == 'true') }}uses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2+ env:+ TRUNK_HIDE_TEST_COLLECTION_LINKS: 'true'with:junit-paths: junit-temporal.xml,junit-temporal-retry-failures.xmlorg-slug: posthog-inc+ test-collection-id: smyQjxZ3 # backend-temporal# A native-JSON row uploads under its own variant, so a failure in that mode# does not read as a flake of the legacy test with the same id.variant: ${{ matrix.new-events-schema && 'events-json' || '' }}diff --git a/.github/actions/trunk-quarantine-gate/action.yml b/.github/actions/trunk-quarantine-gate/action.ymlindex 23f3efa63e2e..1e76939d60b7 100644--- a/.github/actions/trunk-quarantine-gate/action.yml+++ b/.github/actions/trunk-quarantine-gate/action.yml@@ -15,6 +15,9 @@ inputs:description: 'Trunk variant, for suites whose shards upload under one name'required: falsedefault: ''+ test-collection-id:+ description: 'Trunk test collection that owns these tests'+ required: trueruns:using: 'composite'@@ -36,9 +39,13 @@ runs:id: uploadcontinue-on-error: trueuses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2+ env:+ # Link to the repo view: a new collection has no history yet.+ TRUNK_HIDE_TEST_COLLECTION_LINKS: 'true'with:junit-paths: ${{ inputs.junit-paths }}org-slug: posthog-inc+ test-collection-id: ${{ inputs.test-collection-id }}variant: ${{ inputs.variant }}# Pinned rather than 'latest', which costs an extra github.com request to follow the release redirect.cli-version: '0.15.4'@@ -61,9 +68,12 @@ runs:if: ${{ steps.upload.outcome == 'failure' && inputs.previous-step-outcome == 'success' }}continue-on-error: trueuses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2+ env:+ TRUNK_HIDE_TEST_COLLECTION_LINKS: 'true'with:junit-paths: ${{ inputs.junit-paths }}org-slug: posthog-inc+ test-collection-id: ${{ inputs.test-collection-id }}variant: ${{ inputs.variant }}cli-version: '0.15.4'quarantine: truediff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.ymlindex 81235fa68988..d1467834506a 100644--- a/.github/workflows/ci-backend.yml+++ b/.github/workflows/ci-backend.yml@@ -1285,6 +1285,7 @@ jobs:uses: ./.github/actions/trunk-quarantine-gatewith:junit-paths: trunk-junit/junit-product-*.xml+ test-collection-id: C0LrorjW # backend-product# A native-JSON leg uploads under its own variant, so a failure in that mode# does not read as a flake of the legacy test with the same id.variant: ${{ matrix.new-events-schema && 'events-json' || '' }}@@ -4004,9 +4005,12 @@ jobs:continue-on-error: trueif: ${{ !cancelled() && matrix.segment == 'Core' && needs.changes.outputs.backend == 'true' && env.RUNS_ON_INTERNAL_PR == 'true' && github.repository == 'PostHog/posthog' && github.actor != 'dependabot[bot]' && vars.TRUNK_UPLOAD_ENABLED == 'true' }}uses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2+ env:+ TRUNK_HIDE_TEST_COLLECTION_LINKS: 'true'with:junit-paths: junit-core.xml,junit-core-retry-failures.xmlorg-slug: posthog-inc+ test-collection-id: AA6dvTdI # backend-core# Non-default rows upload under their own variant, so a failure only that mode# hits does not quarantine the default test with the same id.variant: ${{ matrix.compat && format('compat-{0}', matrix.clickhouse-server-image) || matrix.person-on-events && (matrix.new-events-schema && 'poe-off-events-json' || 'poe-off') || matrix.new-events-schema && 'events-json' || '' }}@@ -4019,9 +4023,12 @@ jobs:continue-on-error: trueif: ${{ !cancelled() && matrix.segment == 'Temporal' && needs.changes.outputs.backend == 'true' && env.RUNS_ON_INTERNAL_PR == 'true' && github.repository == 'PostHog/posthog' && github.actor != 'dependabot[bot]' && vars.TRUNK_UPLOAD_ENABLED == 'true' }}uses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2+ env:+ TRUNK_HIDE_TEST_COLLECTION_LINKS: 'true'with:junit-paths: junit-temporal.xml,junit-temporal-retry-failures.xmlorg-slug: posthog-inc+ test-collection-id: smyQjxZ3 # backend-temporal# A native-JSON row uploads under its own variant, so a failure in that mode# does not read as a flake of the legacy test with the same id.variant: ${{ matrix.new-events-schema && 'events-json' || '' }}diff --git a/.github/workflows/ci-e2e-playwright.yml b/.github/workflows/ci-e2e-playwright.ymlindex a67f65d216aa..4f2d8d004eb8 100644--- a/.github/workflows/ci-e2e-playwright.yml+++ b/.github/workflows/ci-e2e-playwright.yml@@ -1143,9 +1143,12 @@ jobs:continue-on-error: trueif: ${{ !cancelled() && env.RUNS_ON_INTERNAL_PR == 'true' && github.repository == 'PostHog/posthog' && github.actor != 'dependabot[bot]' && vars.TRUNK_UPLOAD_ENABLED == 'true' }}uses: trunk-io/analytics-uploader@385f1ccdf345b4532dc4b6c665dd432b702b8e28 # v2.1.2+ env:+ TRUNK_HIDE_TEST_COLLECTION_LINKS: 'true'with:junit-paths: playwright/junit-results.xmlorg-slug: posthog-inc+ test-collection-id: kF88Gx2u # e2e-playwrightcli-version: '0.15.4'quarantine: trueprevious-step-outcome: ${{ steps.playwright-tests.outcome }}diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.ymlindex e81bfc3986b8..4d9f348eaf8c 100644--- a/.github/workflows/ci-frontend.yml+++ b/.github/workflows/ci-frontend.yml@@ -992,6 +992,7 @@ jobs:uses: ./.github/actions/trunk-quarantine-gatewith:junit-paths: junit-results/junit-${{ matrix.segment }}-${{ matrix.chunk }}.xml+ test-collection-id: OZ6hVJ5z # frontend-jestprevious-step-outcome: ${{ steps.run-jest.outcome }}token: ${{ secrets.TRUNK_API_TOKEN }}# Verdict: red a real failure the gate didn't clear as a quarantined flake. != 'success'@@ -1062,6 +1063,7 @@ jobs:uses: ./.github/actions/trunk-quarantine-gatewith:junit-paths: junit-results/junit-replay-shared.xml+ test-collection-id: OZ6hVJ5z # frontend-jestvariant: replay-sharedprevious-step-outcome: ${{ steps.run-jest.outcome }}token: ${{ secrets.TRUNK_API_TOKEN }}diff --git a/.github/workflows/ci-mcp.yml b/.github/workflows/ci-mcp.ymlindex 5390feb865bb..957f9a2aaabb 100644--- a/.github/workflows/ci-mcp.yml+++ b/.github/workflows/ci-mcp.yml@@ -761,6 +761,7 @@ jobs:uses: ./.github/actions/trunk-quarantine-gatewith:junit-paths: services/mcp/junit-integration.xml+ test-collection-id: Nt38b1Ej # mcpprevious-step-outcome: ${{ steps.run-integration-tests.outcome }}token: ${{ secrets.TRUNK_API_TOKEN }}diff --git a/.github/workflows/ci-nodejs.yml b/.github/workflows/ci-nodejs.ymlindex d58b4838139f..596e3947233e 100644--- a/.github/workflows/ci-nodejs.yml+++ b/.github/workflows/ci-nodejs.yml@@ -726,6 +726,7 @@ jobs:uses: ./.github/actions/trunk-quarantine-gatewith:junit-paths: junit-results/junit-*.xml+ test-collection-id: ugvRjGsw # nodejs# Worst of the two test steps: the gate must know the run failed even when# only the parity step (shard 1) did. A skipped parity step counts as success.previous-step-outcome: ${{ (steps.run-jest.outcome == 'failure' || steps.run-parity.outcome == 'failure') && 'failure' || 'success' }}diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.ymlindex 162e5ce6a1f2..8b1d986a37ee 100644--- a/.github/workflows/ci-rust.yml+++ b/.github/workflows/ci-rust.yml@@ -589,6 +589,7 @@ jobs:uses: ./.github/actions/trunk-quarantine-gatewith:junit-paths: rust/junit-nextest-*.xml+ test-collection-id: TewkWR1w # rustprevious-step-outcome: ${{ steps.run-tests.outcome }}token: ${{ secrets.TRUNK_API_TOKEN }}diff --git a/.github/workflows/ci-storybook.yml b/.github/workflows/ci-storybook.ymlindex 8853ddc885cf..71f9ee2ecfd0 100644--- a/.github/workflows/ci-storybook.yml+++ b/.github/workflows/ci-storybook.yml@@ -802,6 +802,7 @@ jobs:uses: ./.github/actions/trunk-quarantine-gatewith:junit-paths: common/storybook/junit.xml+ test-collection-id: P3SjL3vy # storybookvariant: ${{ matrix.browser }}previous-step-outcome: ${{ steps.test-runner.outcome }}token: ${{ secrets.TRUNK_API_TOKEN }}