: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): skip unused cargo-dist upload in release planning (#126516)
posthog[bot]8ff407a6bcca
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex b4ef9d63c8e8..aeb9356a98b6 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -65,11 +65,6 @@ jobs:exit 1fish "$installer"- - name: Cache dist- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0- with:- name: cargo-dist-cache- path: ~/.cargo/bin/dist# sure would be cool if github gave us proper conditionals...# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible# functionality based on whether this is a pull_request, and whether it's from a fork.@@ -84,6 +79,13 @@ jobs:echo "dist ran successfully"cat plan-dist-manifest.jsonecho "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"+ - name: Cache dist+ id: cache-dist+ if: ${{ fromJson(steps.plan.outputs.manifest).ci.github.artifacts_matrix.include[0] != null && fromJson(steps.plan.outputs.manifest).ci.github.pr_run_mode == 'upload' && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository) }}+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0+ with:+ name: cargo-dist-cache+ path: ~/.cargo/bin/dist- name: 'Upload dist-manifest.json'uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0with:diff --git a/tools/workflow-plan/tests/workflows.test.ts b/tools/workflow-plan/tests/workflows.test.tsindex 7d428866e111..a2b075dce693 100644--- a/tools/workflow-plan/tests/workflows.test.ts+++ b/tools/workflow-plan/tests/workflows.test.ts@@ -452,6 +452,34 @@ const pathsFilterJobs = workflowFiles.flatMap((file) =>)const STEP_EXPECTATIONS: StepExpectation[] = [+ ...[+ { name: 'plan-only PR', mode: 'plan', matrix: [{}], fork: false, failed: false, runs: false },+ { name: 'upload-mode PR', mode: 'upload', matrix: [{}], fork: false, failed: false, runs: true },+ { name: 'upload-mode fork PR', mode: 'upload', matrix: [{}], fork: true, failed: false, runs: false },+ { name: 'upload-mode empty matrix', mode: 'upload', matrix: [], fork: false, failed: false, runs: false },+ { name: 'failed plan', mode: 'upload', matrix: [{}], fork: false, failed: true, runs: false },+ ].map(({ name, mode, matrix, fork, failed, runs }) => ({+ file: 'release.yml',+ job: 'plan',+ step: 'cache-dist',+ scenario: {+ name,+ github: pullRequest({ fork }),+ steps: {+ plan: {+ plan: {+ outcome: failed ? ('failure' as const) : ('success' as const),+ outputs: {+ manifest: JSON.stringify({+ ci: { github: { pr_run_mode: mode, artifacts_matrix: { include: matrix } } },+ }),+ },+ },+ },+ },+ },+ runs,+ })),...[{ name: 'exact schema hit', matched: 'posthog-schema-mig-v2-exact', runs: false },{ name: 'schema cache miss', matched: '', runs: false },