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.

fix(ci): bump setup-uv to v10.3.2 and retry depot setup steps (#121208)

Raúl Negrón-Oterod6d8f1ba26b3
diff --git a/.depot/actions/setup-uv/action.yml b/.depot/actions/setup-uv/action.yml
index ad86b29eea63..b233d58be9eb 100644
--- a/.depot/actions/setup-uv/action.yml
+++ b/.depot/actions/setup-uv/action.yml
@@ -2,7 +2,7 @@ name: Set up uv
description: |
Installs CI's exact uv version and optionally restores its cache.
- The exact pin makes installs reproducible. setup-uv v7.6.0 resolves
+ The exact pin makes installs reproducible. setup-uv v10.3.2 resolves
downloads through Astral's static manifest, not the GitHub releases API.
Jobs that check out an older revision must install uv directly: this
action does not exist in those trees.
@@ -34,9 +34,12 @@ runs:
steps:
- name: Install uv
id: setup-uv
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
+ uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: '0.13.4'
enable-cache: ${{ inputs.enable-cache }}
cache-dependency-glob: ${{ inputs.cache-dependency-glob }}
save-cache: ${{ inputs.save-cache }}
+ # Keeps only wheels built from source. The pre-built wheels of uv.lock total about
+ # 1 GB, and every job downloads them faster than it restores them from the cache.
+ prune-cache: true
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index fc2ef7df9dd0..c2f8b09f1238 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -726,6 +726,7 @@ jobs:
git remote get-url origin >/dev/null 2>&1 || git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
git fetch --no-tags --filter=blob:none --depth=1000 origin "$GITHUB_SHA"
echo "History depth: $(git rev-list --count HEAD)"
+ retry: 2
- name: Verify PR merge for test selection
id: verify-merge
if: github.event_name == 'pull_request'
@@ -744,6 +745,7 @@ jobs:
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: git fetch --no-tags --depth=1000 --filter=blob:none origin "$BASE_REF:refs/remotes/origin/$BASE_REF"
+ retry: 2
- name: Compute schema cache key from PR base
id: schema-key
if: github.event_name == 'pull_request'
@@ -1025,21 +1027,17 @@ jobs:
- name: Install uv
id: setup-uv
if: steps.schema-cache.outputs.cache-matched-key == ''
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
+ uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: '0.13.4'
enable-cache: true
cache-dependency-glob: uv.lock
save-cache: false
+ prune-cache: true
- name: Install SAML dependencies
if: steps.schema-cache.outputs.cache-matched-key == '' && steps.setup-uv.outputs.cache-hit != 'true'
run: sudo rm -f /etc/apt/sources.list.d/*twingate* && sudo apt-get update && sudo apt-get install -y libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- - name: Install Rust
- if: steps.schema-cache.outputs.cache-matched-key == ''
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
- with:
- toolchain: 1.91.1
- components: cargo
+ retry: 2
- name: Install Python dependencies
if: steps.schema-cache.outputs.cache-matched-key == ''
run: UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --frozen --dev
@@ -1187,6 +1185,7 @@ jobs:
- name: Install SAML dependencies
if: steps.setup-uv.outputs.cache-hit != 'true'
run: sudo rm -f /etc/apt/sources.list.d/*twingate* && sudo apt-get update && sudo apt-get install -y libxml2-dev libxmlsec1-dev libxmlsec1-openssl
+ retry: 2
- name: Install sqlx-cli
uses: ./.depot/actions/setup-sqlx-cli
- name: Install Python dependencies
@@ -1605,6 +1604,7 @@ jobs:
run: |
git remote get-url origin >/dev/null 2>&1 || git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
git fetch --no-tags --depth=2 origin "$GITHUB_SHA"
+ retry: 2
# Boundary between network-dependent setup and the deterministic
# checks below. The "Flag deterministic failure" step keys off this
# step's outcome so a transient setup failure doesn't cancel the run.
@@ -1802,18 +1802,20 @@ jobs:
# Direct install: The job later checks out the PR head, which may predate the local action, so its post step would fail.
- name: Install uv
id: setup-uv
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
+ uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: '0.13.4'
enable-cache: true
cache-dependency-glob: uv.lock
save-cache: ${{ env.IS_MASTER == 'true' }}
+ prune-cache: true
- name: Install SAML (python3-saml) dependencies
if: steps.setup-uv.outputs.cache-hit != 'true'
run: |
sudo rm -f /etc/apt/sources.list.d/*twingate*
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
+ retry: 2
- name: Install sqlx-cli
uses: ./.depot/actions/setup-sqlx-cli
# First running migrations from master, to simulate the real-world scenario
@@ -2515,18 +2517,20 @@ jobs:
# Direct install: Generated changes target the PR head, which may predate the local action.
- name: Install uv
id: setup-uv
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
+ uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: '0.13.4'
enable-cache: true
cache-dependency-glob: uv.lock
save-cache: ${{ env.IS_MASTER == 'true' }}
+ prune-cache: true
- name: Install SAML (python3-saml) dependencies
if: steps.setup-uv.outputs.cache-hit != 'true'
run: |
sudo rm -f /etc/apt/sources.list.d/*twingate*
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
+ retry: 2
- name: Install python dependencies
run: UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --frozen --dev
- name: Install pnpm dependencies
@@ -2542,6 +2546,7 @@ jobs:
exit 0
fi
pnpm install --frozen-lockfile --filter @posthog/api-client --ignore-scripts --config.node-linker=isolated
+ retry: 2
- name: Wait for Docker services
env:
COMPOSE_FILE: docker-compose.dev.yml:docker-compose.profiles.yml
@@ -3191,12 +3196,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
token: ${{ steps.setup-gh-token.outputs.token || github.token }}
- - name: Install Rust
- if: needs.changes.outputs.backend == 'true'
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
- with:
- toolchain: 1.91.1
- components: cargo
- name: Save Python tool cache
if: env.IS_MASTER == 'true' && steps.python-toolcache.outputs.cache-hit != 'true'
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
@@ -3206,17 +3205,19 @@ jobs:
# Direct install: Tests run the explicit PR head, which may predate the local action.
- name: Install uv
id: setup-uv-tests
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
+ uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: '0.13.4'
enable-cache: true
cache-dependency-glob: uv.lock
save-cache: ${{ env.IS_MASTER == 'true' }}
+ prune-cache: true
- name: Install SAML (python3-saml) dependencies
if: ${{ needs.changes.outputs.backend == 'true' && steps.setup-uv-tests.outputs.cache-hit != 'true' }}
shell: bash
run: |
sudo rm -f /etc/apt/sources.list.d/*twingate* && sudo apt-get update && sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
+ retry: 2
- name: Install sqlx-cli
if: needs.changes.outputs.backend == 'true'
uses: ./.depot/actions/setup-sqlx-cli
@@ -3238,6 +3239,7 @@ jobs:
fi
fi
echo "rust_changed=$rust_changed" >> $GITHUB_OUTPUT
+ retry: 2
# tests would intermittently fail in GH actions
# with exit code 134 _after passing_ all tests
# this appears to fix it
@@ -3294,6 +3296,12 @@ jobs:
sudo ldconfig
cd ..
pip install ./common/hogql_parser
+ - name: Install Rust to build hogql-parser-rs
+ if: ${{ needs.changes.outputs.backend == 'true' && steps.hogql-parser-diff.outputs.rust_changed == 'true' }}
+ uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
+ with:
+ toolchain: 1.91.1
+ components: cargo
- name: Install the working version of hogql-parser-rs
if: ${{ needs.changes.outputs.backend == 'true' && steps.hogql-parser-diff.outputs.rust_changed == 'true' }}
shell: bash
@@ -4558,7 +4566,7 @@ jobs:
fi
echo "available=$available" >> "$GITHUB_OUTPUT"
# Direct install: The trusted PR base used for reporting may predate the local action.
- - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
+ - uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
if: steps.timing-reporter.outputs.available == 'true'
with:
version: '0.13.4'
diff --git a/.github/actions/setup-uv/action.yml b/.github/actions/setup-uv/action.yml
index ad86b29eea63..b233d58be9eb 100644
--- a/.github/actions/setup-uv/action.yml
+++ b/.github/actions/setup-uv/action.yml
@@ -2,7 +2,7 @@ name: Set up uv
description: |
Installs CI's exact uv version and optionally restores its cache.
- The exact pin makes installs reproducible. setup-uv v7.6.0 resolves
+ The exact pin makes installs reproducible. setup-uv v10.3.2 resolves
downloads through Astral's static manifest, not the GitHub releases API.
Jobs that check out an older revision must install uv directly: this
action does not exist in those trees.
@@ -34,9 +34,12 @@ runs:
steps:
- name: Install uv
id: setup-uv
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
+ uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: '0.13.4'
enable-cache: ${{ inputs.enable-cache }}
cache-dependency-glob: ${{ inputs.cache-dependency-glob }}
save-cache: ${{ inputs.save-cache }}
+ # Keeps only wheels built from source. The pre-built wheels of uv.lock total about
+ # 1 GB, and every job downloads them faster than it restores them from the cache.
+ prune-cache: true