: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
fix(ci): Add SCCACHE_CACHE_KEY_PREFIX derived from Cargo.lock hash to Rust CI workflows (#62609)
mendral-app[bot]8712f3af1de3
diff --git a/.github/workflows/_rust-build-images.yml b/.github/workflows/_rust-build-images.ymlindex b49dafebc3f6..5884e3430013 100644--- a/.github/workflows/_rust-build-images.yml+++ b/.github/workflows/_rust-build-images.yml@@ -141,6 +141,7 @@ jobs:echo "endpoint=$SCCACHE_WEBDAV_ENDPOINT" >> "$GITHUB_OUTPUT"echo "::add-mask::$SCCACHE_WEBDAV_TOKEN"echo "token=$SCCACHE_WEBDAV_TOKEN" >> "$GITHUB_OUTPUT"+ echo "cache-key-prefix=cargo-${{ hashFiles('rust/Cargo.lock') }}" >> "$GITHUB_OUTPUT"- name: Build and push imageid: docker_build@@ -159,6 +160,7 @@ jobs:SCCACHE_NO_DAEMON=1BIN=${{ matrix.bin || matrix.image }}BUILD_FEATURES=${{ matrix.features || '' }}+ SCCACHE_WEBDAV_KEY_PREFIX=${{ steps.sccache.outputs.cache-key-prefix }}secrets: |SCCACHE_WEBDAV_ENDPOINT=${{ steps.sccache.outputs.endpoint }}SCCACHE_WEBDAV_TOKEN=${{ steps.sccache.outputs.token }}diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.ymlindex e4212f814cb2..f10b17b48fce 100644--- a/.github/workflows/ci-rust.yml+++ b/.github/workflows/ci-rust.yml@@ -252,6 +252,9 @@ jobs:with:toolchain: 1.91.1+ - name: Set sccache WebDAV key prefix (Cargo.lock hash)+ run: echo "SCCACHE_WEBDAV_KEY_PREFIX=cargo-${{ hashFiles('rust/Cargo.lock') }}" >> "$GITHUB_ENV"+- name: Install sccacheuses: ./.github/actions/setup-sccache@@ -338,6 +341,9 @@ jobs:- name: Install protocuses: ./.github/actions/setup-protoc+ - name: Set sccache WebDAV key prefix (Cargo.lock hash)+ run: echo "SCCACHE_WEBDAV_KEY_PREFIX=cargo-${{ hashFiles('rust/Cargo.lock') }}" >> "$GITHUB_ENV"+- name: Install sccacheuses: ./.github/actions/setup-sccache@@ -449,6 +455,9 @@ jobs:toolchain: 1.91.1components: clippy,rustfmt+ - name: Set sccache WebDAV key prefix (Cargo.lock hash)+ run: echo "SCCACHE_WEBDAV_KEY_PREFIX=cargo-${{ hashFiles('rust/Cargo.lock') }}" >> "$GITHUB_ENV"+- name: Install sccacheuses: ./.github/actions/setup-sccachediff --git a/rust/Dockerfile b/rust/Dockerfileindex 8c07cdd474a6..94c2c2567390 100644--- a/rust/Dockerfile+++ b/rust/Dockerfile@@ -17,7 +17,8 @@ FROM base AS builderWORKDIR /appARG BINARG BUILD_FEATURES=""-ENV PROTO_ROOT=../proto+ARG SCCACHE_WEBDAV_KEY_PREFIX+ENV PROTO_ROOT=../proto SCCACHE_WEBDAV_KEY_PREFIX=${SCCACHE_WEBDAV_KEY_PREFIX}# Ensure working C compile setup (not installed by default in arm64 images)# libclang-dev is required for bindgen (used by librocksdb-sys)