Skip to content

Add CI to build bundled modules on every supported OS when modules.yaml changes - #15442

Merged
gabsow merged 9 commits into
redis:unstablefrom
gabsow:modules-nightly-upstream
Jul 22, 2026
Merged

gabsow merged 9 commits into
redis:unstablefrom
gabsow:modules-nightly-upstream

Conversation

@gabsow

@gabsow gabsow commented Jul 9, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #15253 (bundled data-type modules). Adds a GitHub Actions workflow (.github/workflows/modules-build-flow.yml) that replays the from-source flow documented in modules/README.md on every OS the bundled modules support — the same 15-OS list the modules' own nightlies build against — across x64 and arm64, each in a clean stock container (no Dockerfiles):

make modules-update          # clone each module pinned in modules.yaml
make bootstrap               # per-module build/test prereqs
make -j all BUILD_TLS=yes    # Redis + all modules (LTO=1 via redisearch build_env)
./src/redis-server redis-full.conf   +   redis-cli MODULE LIST   # smoke test

When it runs

  • On pull requests that change modules/modules.yaml. Bumping a module's pinned ref is exactly when the from-source build/load can break on some OS, so the whole matrix re-verifies then. On a PR it checks out the PR merge ref, so it builds the bumped pins, not unstable (works for fork PRs too).
  • workflow_dispatch for manual runs, with use_repo/use_git_ref inputs to point at any repo/branch.

It builds and smoke-tests only — starts the server and asserts MODULE LIST contains bf/search/ReJSON/timeseries. It does not run the per-module make test all suites; those live in each module's own CI.

Design

  • Clean containers, no Dockerfiles — one matrix job per arch × osnick; every image is a stock multi-arch base (ubuntu/debian/alma/rocky/amazonlinux/azurelinux/alpine).
  • Prereqs = only what the manual assumes present before its first command (git, make, CA certs; gawk/findutils on minimal rpm images; bash on alpine; openssl + dev headers). Compilers and per-module toolchains must come from make bootstrap — if they don't, the manual is broken on that OS and this workflow catches exactly that.
  • BUILD_TLS=yes — the README's documented full-build flag (redisearch's TLS test env expects it).
  • No node-based actions inside containers (plain git clone) — they can't start on older-glibc images.

Validation

Ran the full matrix on a fork against the upcoming module refs (redisearch + redistimeseries at master, i.e. post-RediSearch#10372): 30/30 jobs green across all 15 OSes on both arches — build + MODULE LIST smoke (fork Actions run 29747001924). Once modules.yaml is bumped to the retagged versions carrying the merged bootstrap/LTO fixes (RediSearch #10372 / #10373, RedisTimeSeries #2089), the matrix is green with no per-module workarounds in the workflow.

🤖 Generated with Claude Code


Note

Low Risk
Adds CI-only automation with no changes to Redis runtime, auth, or data paths.

Overview
Adds .github/workflows/modules-build-flow.yml, a GitHub Actions workflow that replays the documented from-source modules flow (make modules-update → make bootstrap → make all BUILD_TLS=yes) inside stock container images on x64 and arm64 across 15 OS variants (Ubuntu, Debian, Alma/Rocky, Amazon Linux 2023, Azure Linux 3, Alpine).

It runs on PRs that touch modules/modules.yaml and on workflow_dispatch (optional repo/ref). Each job installs only the manual’s baseline packages (git, make, TLS/openssl tooling, etc.), uses a plain git fetch checkout (including the PR merge ref on path-filtered PRs) instead of actions/checkout, then starts redis-server with redis-full.conf and asserts MODULE LIST includes bf, search, ReJSON, and timeseries.

The workflow also encodes several container-specific fixes: pinned PATH after bootstrap, job-level CXXFLAGS for GCC/clang -Werror noise, rm /.dockerenv so module bootstrap installs test Python envs, and tdnf install retries on Azure Linux.

Reviewed by Cursor Bugbot for commit 80d2e37. Bugbot is set up for automated code reviews on this repo. Configure here.

done
./src/redis-cli MODULE LIST | tee module-list.txt
for m in bf search ReJSON timeseries; do
grep -qx "$m" module-list.txt || { echo "MISSING MODULE: $m"; exit 1; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MODULE LIST grep mismatch

High Severity

The server verification step pipes default redis-cli MODULE LIST into a file, then requires each expected module name to appear as an entire line via grep -qx. Standard CLI formatting prints RESP map replies as indexed, quoted lines (for example name => "bf"), so names are never isolated on their own line and the loop reports false MISSING MODULE failures after a successful load.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 87c81b1. Configure here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false positive, If the client is not TTY stdout, redis-cli will switch to raw model.

(!isatty(fileno(stdout)) && (getenv("FAKETTY") == NULL)) {
        config.output = OUTPUT_RAW;
        config.push_output = 0;
    } 

@gabsow
gabsow force-pushed the modules-nightly-upstream branch from 87c81b1 to 7888209 Compare July 12, 2026 11:29
@gabsow gabsow changed the title ci: add Modules Nightly — build & test bundled modules on every supported OS ci: add Modules Daily — build & test bundled modules on every supported OS Jul 12, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 7888209. Configure here.

Comment thread .github/workflows/modules-daily.yml Resolved
@gabsow
gabsow force-pushed the modules-nightly-upstream branch from 7888209 to 1810adc Compare July 12, 2026 14:58
@gabsow

gabsow commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks Bugbot — addressed both:

Medium (tdnf retry hides install failure) — fixed in 1810adc9d. The retry loop now tracks success explicitly and exit 1s if all attempts fail, instead of falling through on the trailing sleep and relying on a preinstalled git:

ok=
for _ in 1 2 3; do
  tdnf install -y … && { ok=1; break; }
  tdnf --disableplugin=tdnfrepogpgcheck install -y … && { ok=1; break; }
  sleep 10
done
[ -n "$ok" ] || { echo "ERROR: tdnf prerequisite install failed after retries" >&2; exit 1; }

High (MODULE LIST grep mismatch) — not applicable here. The finding assumes the interactive name => "bf" rendering, but the command is piped to a file (non-TTY), where redis-cli MODULE LIST flattens the reply to one value per line — so bf/search/ReJSON/timeseries each land on their own line and grep -qx matches. Verified against a real run: the step passes and proceeds to make test all (a miss would hit exit 1). Example output:

name
bf
ver
80981
path
./modules/redisbloom/redisbloom.so
…

Left as-is since it's an intentional load smoke-check and works across the matrix.

@gabsow
gabsow force-pushed the modules-nightly-upstream branch from 1810adc to 2925631 Compare July 12, 2026 15:33
…ed OS

Replays the from-source flow in modules/README.md (modules-update ->
bootstrap -> make all -> redis-server redis-full.conf + MODULE LIST ->
make test all) on the 15-OS x (x64,arm64) matrix the bundled modules'
own nightlies target, each in a clean stock container (no Dockerfiles).
Builds with LTO=1 (redisearch's build_env default) and BUILD_TLS=yes so
redisearch's TLS test suite can start a TLS server; installs only the
prerequisites a user needs before the manual's first command (git, make,
certs, openssl; awk/find on minimal rpm images; bash on alpine).

Named 'Modules Daily' to match the repo's existing Daily workflow.

Depends on in-flight module bootstrap/LTO/test fixes reaching pinned
tags: RediSearch redis#10372 (bootstrap installs cargo-nextest + python test
deps), redis#10373 (LTO=1 build across all OS families, merged), RedisTimeSeries
redis#2089 (alpine test venv, merged). Until modules.yaml is bumped to tags
containing those, the LTO build and module test suites are red on the
affected OSes; the workflow itself needs no per-module workarounds.

Co-Authored-By: Claude Fable 5 <[email protected]>
@gabsow
gabsow force-pushed the modules-nightly-upstream branch from 2925631 to b9755c5 Compare July 13, 2026 09:13
@sundb sundb changed the title ci: add Modules Daily — build & test bundled modules on every supported OS Add daily CI to build and test bundled modules on every supported OS Jul 13, 2026
TalBarYakar and others added 8 commits July 19, 2026 12:13
On a pull_request event github.event.inputs is empty, so the checkout
fell back to unstable and built unstable's modules.yaml — never the pin
bump that triggered the run, so a PR bumping a module to a version that
fails to build/load on some OS would still pass green. Fetch the PR merge
ref (published on the base repo, so fork PRs work too) on pull_request;
keep the use_repo/use_git_ref inputs for manual dispatch.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@gabsow gabsow changed the title Add daily CI to build and test bundled modules on every supported OS Add CI to build bundled modules on every supported OS when modules.yaml changes Jul 21, 2026
@gabsow
gabsow requested a review from sundb July 21, 2026 18:39

@sundb sundb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gabsow
gabsow merged commit d72a714 into redis:unstable Jul 22, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants