Repository navigation
RED-191626 , RED-191854 - modules modernization - #15253
Conversation
|
|
|
| handle-werrors: get_source | ||
| ifeq ($(DISABLE_WERRORS),yes) | ||
| @echo "Disabling -Werror for all modules" | ||
| @for dir in $(SUBDIRS); do \ | ||
| echo "Processing $$dir"; \ | ||
| find $$dir/src -type f \ | ||
| \( -name "Makefile" \ | ||
| -o -name "*.mk" \ | ||
| -o -name "CMakeLists.txt" \) \ | ||
| -exec sed -i 's/-Werror//g' {} +; \ | ||
| -exec sed -i.werrors_bak 's/-Werror//g' {} +; \ | ||
| find $$dir/src -type f -name '*.werrors_bak' -delete; \ | ||
| done | ||
| endif |
There was a problem hiding this comment.
Note, handle-werrors target is obsolete and was removed in https://github.com/redis/redis/pull/15257/changes as it is not longer required and leads to errors.
| for dir in $(SUBDIRS); do \ | ||
| mkdir -p "$$dir"; \ | ||
| $(MAKE) -C "$$dir" -f "$(COMMON_MK)" $(1); \ | ||
| done |
There was a problem hiding this comment.
There is a known problem with this loop: it hides failures for all modules except for the last one. E.g., if first one fails it just continues the build.
There was a problem hiding this comment.
Maybe this section should be removed. We should use the new flow with the make build command instead.
WDY @Peter-Sh ?
There was a problem hiding this comment.
@TalBarYakar
I'm not sure I understand what do you mean by the new flow, maybe I missed something in the PR, could you please provide an example?
There was a problem hiding this comment.
@TalBarYakar I think that maybe since this error was not introduced by your PR the issue with error handling should also be eventually addressed in different PR after this is merged, to not over-complicate the changes .
There was a problem hiding this comment.
I agree with @Peter-Sh that build error in this loops should not be silently ignored.
Maybe add set -e; \ after define submake and before the for loop?
| `redisjson`). | ||
|
|
||
| ```bash | ||
| make setup # all modules |
There was a problem hiding this comment.
Let suggested the modules update, I thought we removed the setup
… banner.
It is now identical to upstream/unstable; nothing in the normal flow edits it.
- sync-redis-conf.sh: emit redis.conf verbatim, then append the generated
Modules block (loadmodule lines + per-module config, diagnostics inside the
block). Regeneration strips any previously-appended block first, so it stays
idempotent without core markers.
* strip_modules_block: strict marker validation on redis.conf — fail loudly
on unbalanced/mis-ordered markers instead of silently truncating, since
the output can be baked into redis.conf. [codex P2]
* strip_private_block: prefix-match + lenient — strips a module.conf's
redis-gen-conf:private block whether it ends "<<<" or ">>>" (modules ship
both), and a marker typo never aborts the build.
- apply-redis-conf.sh: apply-only (revert removed); invoked only by
`make tarball` to bake module config into the packaged redis.conf.
- Makefile: drop the apply-redis-conf target + arg-capture/glue; fix the stale
deploy comment (deploy rewrites loadmodule paths directly). [codex P3]
- docs (README, modules/README, MODULES.md): flow described via
make modules-update / sync-redis-conf / tarball only — no apply-redis-conf
target, no core markers, no revert.
Verified for each module individually, in combinations, and all: core copied
verbatim, private stripped, correct loadmodule lines, and redis-server boots
with every module loaded and its commands working.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 5 total unresolved issues (including 4 from previous reviews).
Reviewed by Cursor Bugbot for commit fb51afe. Configure here.
| if [ "${TARBALL_SKIP_MODULES_UPDATE:-}" != "1" ]; then | ||
| echo "==> [tarball] pre-step: modules-update all (shallow)" | ||
| MODULES_UPDATE_SHALLOW=1 "$SCRIPT_DIR/modules-update.sh" all | ||
| echo |
There was a problem hiding this comment.
Tarball step mutates workspace
Medium Severity
By default, make tarball runs a full shallow modules-update in the current repository before staging. That refreshes every local modules/*/src checkout and regenerates redis-full.conf, even though the release artifact is assembled separately via git archive and fresh clones under the staging directory.
Reviewed by Cursor Bugbot for commit fb51afe. Configure here.
SummaryBumps the pinned module versions for RedisTimeSeries, RedisJSON, and RedisBloom. Module | From | To -- | -- | -- RedisTimeSeries | v8.9.81 | v8.9.82 RedisJSON | v8.9.80 | v8.9.81 RedisBloom | v8.9.80 | v8.9.81RedisTimeSeriesBumps the pinned MODULE_VERSION for RedisTimeSeries from v8.9.81 to v8.9.82. Module changes (v8.9.81 → v8.9.82)
RedisJSONBumps the pinned MODULE_VERSION for RedisJSON from v8.9.80 to v8.9.81. Module changes (v8.9.80 → v8.9.81)
RedisBloomBumps the pinned MODULE_VERSION for RedisBloom from v8.9.80 to v8.9.81.
Module changes (v8.9.80 → v8.9.81)Summary Bumps the pinned module versions for RedisTimeSeries, RedisJSON, and RedisBloom. Module From To Module changes (v8.9.81 → v8.9.82) Module changes (v8.9.80 → v8.9.81) Note: the v8.9.80...v8.9.81 ancestry diff contains 2 commits and both are genuinely new. The v8.9.80 release side only contains a version bump after the merge base, so there are no already-merged commits to exclude. Module changes (v8.9.80 → v8.9.81) |
After #15253 parallel builds started to warn: ``` ~/..../redis$ make -j ==> Building main Redis (src/) make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. make[1]: Entering directory '~/..../redis/src' CC Makefile.dep make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. .... ``` and use only a single process when building, ignoring the `-j` flag. Fix this by invoking build scripts with `+` prefix to let `make` know we spawn sub-make, so it keeps the jobserver pipe fd open for the script. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > <sup>[Cursor Bugbot](https://cursor.com/bugbot) is generating a summary for commit ca8c7c1. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
#15454) Followup #15253 Updates build-from-source documentation for Redis 8.10+: release flows use redis-full.tar.gz, start the server with redis.conf (module config baked into release tarballs), and document explicit Rust 1.94 and LLVM 21 / lld where RediSearch LTO needs them—instead of relying on INSTALL_RUST_TOOLCHAIN=yes and make modules-update in those paths. Ubuntu 20.04 instructions switch to GCC 11 (PPA) for C++20 libstdc++; Alma/Rocky sections add lld/llvm, python3 alternatives on 8.10, and drop make modules-update on Alma 10. scripts/build.sh now runs modules install-rust when INSTALL_RUST_TOOLCHAIN=yes, so make build matches the modules Makefile behavior. The obsolete handle-werrors target has been removed from the modules Makefile (matching #15257): it is no longer required and was causing build errors, so DISABLE_WERRORS no longer strips -Werror via this path. Co-authored-by: Tom Gabsow <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
…ml changes (#15442) 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](https://github.com/redis/redis/blob/unstable/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](RediSearch/RediSearch#10372) / [#10373](RediSearch/RediSearch#10373), RedisTimeSeries [#2089](RedisTimeSeries/RedisTimeSeries#2089)), the matrix is green with no per-module workarounds in the workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!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. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 80d2e37. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: TalBarYakar <[email protected]>


Summary
Redis core and the external modules (Search, JSON, Bloom, TimeSeries) are currently built and released through separate flows, forcing anyone assembling a full distribution to juggle multiple repos, refs, build commands, and config files.
This PR collapses that into one Redis-owned workflow:
What This Adds
1. Manifest-driven modules —
modules/modules.yamlis the single source of truth for bundled modules. Each entry pinsrepo/refand defines its build artifact and runtimeloadmodulepath. Refs resolve dynamically (tag → branch → SHA, else fail).Current pins: RedisBloom
v8.9.81, RediSearchv8.9.82, RedisJSONv8.9.81, RedisTimeSeriesv8.9.82.2. Central manifest parser —
scripts/lib/manifest.shis the only YAML reader, usable both as a shell library and a CLI helper (viamodules/manifest.mk).3. Per-module stub Makefiles removed — The
modules/redis*/Makefilestubs are deleted; their data moves tomodules.yamland shared behavior tomodules/common.mk.Make Workflow
The root
Makefileis now a thin dispatch layer over scripts inscripts/:make build [args]scripts/build.shmake bootstrap [args]scripts/bootstrap.shmake setup [args]scripts/setup.shmake run [args]scripts/run.shmake test [args]scripts/test.shmake clean [args]scripts/clean.shmake deploy [args]scripts/deploy.shmake modules-update [args]scripts/modules-update.shmake modules-shallow [args]scripts/modules-shallow.shmake sync-redis-conf [args]scripts/sync-redis-conf.shmake tarball TAG=...scripts/tarball.shAll accept module selectors:
Runtime Configuration
Removes the hand-maintained
redis-full.conf(which could drift from upstream). Config is now generated:sync-redis-conf.shproduces a managed Modules block appended to verbatimredis.conf, withloadmodulelines (active when built orASSUME_BUILT=1) plus each module'smodule.conf. The generated file is git-ignored.Docker & Release
docker/Dockerfile.noble— Ubuntu 24.04 build env for core + modules (amd64/arm64).scripts/tarball.sh— reproducible source bundle: archives core atTAG, clones modules at pinned refs, strips.git/build artifacts, generates config, and produces a deterministic gzip.utils/releasetools/01_create_tarball.shnow delegates to it.post-release-automation.yml— builds the bundle on published releases, uploads it as artifact + release asset, and reports SHA256.Docs
modules/MODULES.md(operator guide),modules/README.md, andREADME.mdcover the manifest schema, Make targets, tarball flow, Docker env, and troubleshooting.Compatibility Notes
BUILD_WITH_MODULES=yesis replaced bymake build [redis|core|none|all|<module>...].redis-full.confis now generated and git-ignored.modules/<name>/src/(git-ignored).vector-setsis omitted — it already lives in-tree.LTO=1 REDISEARCH_GENERATE_HEADERS=0 INLINE_LSE_ATOMICS=0.Note
Medium Risk
Large change to default build/release paths and published release artifacts; mistakes could ship wrong module pins or broken tarballs, but scope is build/packaging rather than runtime security or data handling.
Overview
Replaces the old
BUILD_WITH_MODULES=yesgate with a unified, Redis-owned flow:modules/modules.yamlpins upstream repos/refs and artifact paths,scripts/lib/manifest.sh+modules/manifest.mkparse it, and the rootMakefiledispatches to thinscripts/*.shformodules-update,bootstrap,build,run,test,clean,deploy,sync-redis-conf, andtarball.Build layout changes: per-module
modules/*/Makefilestubs are removed in favor of sharedmodules/common.mk(manifest-driven clone fallback,build_env, Darwin→macos paths).redis-full.confis no longer tracked—it’s regenerated (and git-ignored) fromredis.conf+ moduleloadmodule/module.confblocks; release tarballs bake that intoredis.confviaapply-redis-conf.sh.Release & DX:
utils/releasetools/01_create_tarball.shnow execsscripts/tarball.sh(reproducible bundle with embedded module sources). New Post-Release Automation workflow buildsredis-full.tar.gzonrelease: published, checks size, uploads artifact + release asset, and prints SHA256.docker/Dockerfile.noble+.dockerignoreadd an Ubuntu 24.04 build image that installs core deps and runs bundled module install scripts from the manifest.Docs (
README.md,modules/MODULES.md,modules/README.md) and.gitignoreare updated formake modules-update, generated config, and ignoredmodules/<name>/src/clones.Reviewed by Cursor Bugbot for commit a48ee08. Bugbot is set up for automated code reviews on this repo. Configure here.