: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(recording-rasterizer): unpin ffmpeg, chrome-headless-shell, node 24 (#61253)
Tom Piccirello821ea4312dd5
diff --git a/.github/workflows/ci-recording-rasterizer-container.yml b/.github/workflows/ci-recording-rasterizer-container.ymlindex 25fad938b491..09cc606d46b8 100644--- a/.github/workflows/ci-recording-rasterizer-container.yml+++ b/.github/workflows/ci-recording-rasterizer-container.yml@@ -7,6 +7,10 @@ on:push:branches:- 'master'+ schedule:+ # Weekly rebuild (Mondays 07:30 UTC) so floated deps (chrome-headless-shell@stable,+ # ffmpeg, unpinned apt packages) pick up security updates. Fires only from master.+ - cron: '30 7 * * 1'concurrency:group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}@@ -64,6 +68,7 @@ jobs:(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.rasterizer_files == 'true') ||github.event_name == 'merge_group' ||github.event_name == 'workflow_dispatch' ||+ github.event_name == 'schedule' ||(github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.changes.outputs.rasterizer_files == 'true')runs-on: depot-ubuntu-latesttimeout-minutes: 30@@ -112,6 +117,7 @@ jobs:platforms: linux/amd64build-args: |COMMIT_HASH=${{ github.sha }}+ DEPS_CACHE_BUST=${{ github.event_name == 'schedule' && github.run_id || 'pinned' }}- name: Container image digestenv:@@ -151,7 +157,7 @@ jobs:runs-on: ubuntu-24.04timeout-minutes: 5needs: build- if: github.ref == 'refs/heads/master' && github.event_name == 'push'+ if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule'permissions:contents: readsteps:@@ -173,6 +179,37 @@ jobs:with:token: ${{ secrets.GITHUB_TOKEN }}+ # On a scheduled (cron) run there is no head_commit in the event payload, so reuse it+ # verbatim for push and synthesize a minimal commit object from git HEAD for schedule.+ - name: Resolve commit metadata+ id: commit+ shell: bash+ env:+ EVENT_NAME: ${{ github.event_name }}+ HEAD_COMMIT_JSON: ${{ toJson(github.event.head_commit) }}+ HEAD_COMMIT_TIMESTAMP: ${{ github.event.head_commit.timestamp }}+ COMMIT_SHA: ${{ github.sha }}+ run: |+ if [ "$EVENT_NAME" = "schedule" ]; then+ timestamp="$(git show -s --format=%cI HEAD)"+ commit_json="$(jq -nc \+ --arg id "$COMMIT_SHA" \+ --arg message "$(git show -s --format=%s HEAD)" \+ --arg timestamp "$timestamp" \+ --arg name "$(git show -s --format=%an HEAD)" \+ --arg email "$(git show -s --format=%ae HEAD)" \+ '{id: $id, message: $message, timestamp: $timestamp, author: {name: $name, email: $email}}')"+ else+ commit_json="$HEAD_COMMIT_JSON"+ timestamp="$HEAD_COMMIT_TIMESTAMP"+ fi+ {+ echo "commit_json<<COMMIT_JSON_EOF"+ echo "$commit_json"+ echo "COMMIT_JSON_EOF"+ echo "timestamp=$timestamp"+ } >> "$GITHUB_OUTPUT"+- name: Trigger recording-rasterizer deploymentuses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1with:@@ -187,8 +224,8 @@ jobs:}},"release": "recording-rasterizer",- "commit": ${{ toJson(github.event.head_commit) }},+ "commit": ${{ steps.commit.outputs.commit_json }},"repository": ${{ toJson(github.repository) }},"labels": ${{ steps.labels.outputs.labels }},- "timestamp": "${{ github.event.head_commit.timestamp }}"+ "timestamp": "${{ steps.commit.outputs.timestamp }}"}diff --git a/Dockerfile.recording-rasterizer b/Dockerfile.recording-rasterizerindex b55234c9f255..1a4923a10bfb 100644--- a/Dockerfile.recording-rasterizer+++ b/Dockerfile.recording-rasterizer@@ -77,10 +77,20 @@ RUN NODE_OPTIONS="--max-old-space-size=16384" bin/turbo --filter=@posthog/nodejs# HeadlessExperimental.beginFrame for deterministic frame-by-frame capture# via puppeteer-capture (virtual time, no rAF dependency).#-FROM node:24.13.0-bookworm-slim+# Major-only tag so weekly rebuilds pick up the latest 24.x (node + bundled OpenSSL/V8 patches).+# Must stay same major as the build stage (node 24) for native-addon ABI, and keep -bookworm-slim+# so glibc / system libs match what the addons were linked against in the build stage.+FROM node:24-bookworm-slimWORKDIR /codeSHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]+# Cache-bust marker for the floated deps below (ffmpeg, chrome-headless-shell). The weekly+# scheduled rebuild passes a changing value, invalidating the apt/npx layers so security+# updates are actually re-fetched; normal builds pass the constant default and reuse cache.+# Without this, the unpinned layers' cache key never changes and the rebuild is a no-op.+ARG DEPS_CACHE_BUST=pinned+RUN echo "deps cache bust: ${DEPS_CACHE_BUST}"+# Install runtime dependencies: librdkafka, chrome-headless-shell deps, ffmpegRUN apt-get update && \apt-get install -y --no-install-recommends \@@ -97,7 +107,8 @@ RUN apt-get update && \"librdkafka1=2.10.1-1.cflt~deb12" \"librdkafka++1=2.10.1-1.cflt~deb12" \"libssl3=3.0.19-1~deb12u2" \- "ffmpeg=7:5.1.8-0+deb12u1" \+ # ffmpeg intentionally unpinned: tracks the latest bookworm candidate so security point-updates flow in on rebuild+ "ffmpeg" \# Shared libraries required by chrome-headless-shelllibasound2 \libatk-bridge2.0-0 \@@ -123,8 +134,9 @@ RUN apt-get update && \# Install chrome-headless-shell via @puppeteer/browsers CLI.# This provides the minimal Chrome binary that supports HeadlessExperimental.-# NOTE: Version is pinned to avoid upstream breakage. Bump periodically for security patches.-RUN npx --yes @puppeteer/browsers install [email protected] \+# Tracks the stable channel so security patches flow in; the weekly scheduled rebuild+# re-resolves it and the validation step below guards install-time breakage.+RUN npx --yes @puppeteer/browsers install chrome-headless-shell@stable \--path /opt/chrome-headless-shell && \ln -s "$(find /opt/chrome-headless-shell -name chrome-headless-shell -type f | head -1)" /usr/local/bin/chrome-headless-shell