Files
openobserve/.github/workflows
Shrinath Rao 57e4e1085c ci(tests): fix flaky rye setup by reusing setup-python interpreter (#13813)
## Problem

The API/DB integration test jobs intermittently fail — often, and
retries don't reliably help. CI reports the failure on the **`Pin
cpython`** step:

```
rye: command not found
##[error]Process completed with exit code 127
```

But that step is a **victim, not the cause**. The real failure is the
preceding **`Setup rye`** step (`eifinger/setup-rye@v4`). It downloads
and extracts the `rye` binary fine, then runs `rye self install`, which
downloads a **python-build-standalone toolchain (3.11.7)** from GitHub
to bootstrap Rye's own venv:

```
Downloading Rye from ".../rye/releases/download/0.27.0/rye-x86_64-linux.gz" ...   ✓
Extracting downloaded archive...                                                  ✓
Determined RYE_TOOLCHAIN_VERSION: 3.11.7
Installing Rye into /opt/hostedtoolcache/setup-rye-.../0.27.0/x86_64
##[error]The process '.../_temp/...' failed with exit code 1                       ← real failure
```

That download flakes and exits 1, so the `rye` binary is never placed on
`PATH`, and the next step (`rye pin cpython@3.11.6`) dies with `command
not found` (exit 127). Retries only pass when the download happens to
succeed.

Example failing run:
https://github.com/openobserve/openobserve/actions/runs/31679986019/job/94383108990

## Fix

Every one of these jobs already provisions CPython 3.11.6 via
`actions/setup-python`. Point **`RYE_TOOLCHAIN`** at that interpreter so
`rye self install` reuses it instead of downloading a second toolchain —
removing the flaky network fetch entirely:

```yaml
- name: Setup Python
  uses: actions/setup-python@v7
  id: setup-python
  with:
    python-version: "3.11.6"

- name: Setup rye
  uses: eifinger/setup-rye@v4
  env:
    RYE_TOOLCHAIN: ${{ steps.setup-python.outputs.python-path }}
  with:
    ...
```

The `setup-python` step's official `python-path` output is the absolute
path to the interpreter it provisioned — used directly (no hardcoded
`/bin/python`), and present in every affected job (verified 1:1).

## Scope

- `.github/workflows/api-testing.yml` — 4 `Setup rye` blocks
- `.github/workflows/db-testing.yml` — 1 `Setup rye` block

Additive, low-risk: only redirects Rye's internal bootstrap; `rye pin` /
`rye sync` are untouched.


## Companion PR

Enterprise: openobserve/o2-enterprise#2424 — same fix on
`api-testing.yml` (8 blocks) + `api-testing_env.yml` (2 blocks).
2026-08-13 09:28:41 +00:00
..