Skip to content

MOD-16952 - enhance bootstrap (add list and dry-run arg) - #1037

Merged
TalBarYakar merged 29 commits into
masterfrom
tal.ba/feat/enhance_bootstrap
Jul 27, 2026
Merged

TalBarYakar merged 29 commits into
masterfrom
tal.ba/feat/enhance_bootstrap

Conversation

@TalBarYakar

@TalBarYakar TalBarYakar commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Touches all OS bootstrap paths and privileged install/repo/compiler wiring; mistakes could break fresh installs or mis-report deps, though list/dry-run are additive and normal make bootstrap behavior is intended to stay the same with safer re-runs.

Overview
Adds make bootstrap list and make bootstrap dry-run so developers and CI can inspect bootstrap without installing packages or recreating venv.

List mode (CHECK_DEPS=1) probes installed packages per PM, splits required vs optional deps (OPTIONAL_PKGS), supports optional version floors (MIN_VERSIONS), and can append machine-readable lines to DEPS_REPORT_FILE for multi-module aggregation. It exits non-zero only when required deps are missing.

Dry-run prints copy-pasteable install commands for gaps only (via _run / _sh), including apt DEBIAN_FRONTEND and stdin redirects for pkg managers. Real bootstrap is unchanged except OS scripts are more idempotent (skip PPA/repo/toolset/symlink steps when already satisfied) and EL8 avoids false python3 missing checks via RHEL_PYTHON.

Also: root containers without sudo get a pass-through sudo function; install_aws_cli and macOS profile/GITHUB_PATH updates are suppressed in list/dry-run; gcc toolset wiring won’t downgrade a newer compiler another module installed.

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

Comment thread .install/lib/pm.sh
DEPS_OK="$DEPS_OK $_p"
fi
fi
done

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Required packages marked optional in list

High Severity

_check_pkgs treats any name in OPTIONAL_PKGS as optional before checking required deps, but that list includes packages also installed from DEBIAN_BASE / RHEL_BASE (e.g. curl, tar, zlib1g-dev, libbz2-dev). Missing required packages then land in DEPS_OPT_MISSING, so make bootstrap list can exit 0 while core build packages are absent.

Additional Locations (1)
Fix in Cursor Fix in Web

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These names are in the *_BASE install superset but aren't actual build/link requirements — the module builds and runs without them (verified), so classifying them optional is intentional: list should only fail on deps that genuinely break the build/run. OPTIONAL_PKGS deliberately contains only non-build-critical names (test/coverage/debug + install-superset extras), so the _is_optional-first ordering is safe here.

Comment thread .install/os/macos.sh Resolved
Comment thread .install/lib/packages.sh Resolved
Comment thread .install/lib/pm.sh

if [ "$CHECK_DEPS" = 1 ] || [ "$DRY_RUN" = 1 ]; then
_SUDO_DISPLAY="$SUDO" # remember the real sudo prefix for dry-run printing
SUDO=":" # neutralize privileged side-commands (no mutation)

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.

list/dry-run are not actually read-only, and both under-report — the safety model misses the per-OS scripts.

The mode machinery neutralizes only two things: $SUDO → : and the *_install primitives. Any command in an os/<osnick>.sh file (or lib/packages.sh) that touches the network/disk/pip directly bypasses both and runs for real under make bootstrap list / dry-run:

  • install_aws_cli (lib/packages.sh) — curl … -o /tmp/awscliv2.zip + unzip execute; only the trailing $SUDO …/aws/install is neutralized. Reached from os/rocky8.sh, rocky9.sh, mariner2.sh, azurelinux3.sh, bionic.sh.
  • os/bionic.sh — builds CMake from source (wget + tar + ./configure + make -j) and runs pip3 install dataclasses (redis scripts/bootstrap.sh exports PIP_BREAK_SYSTEM_PACKAGES=1), plus two keyserver wgets.

Two more consequences of the same design:

  • Abort on a fresh host: os/focal.sh:12 / os/bionic.sh:27 run _cur=$(gcc -dumpversion | cut -d. -f1) ungated. In check mode gcc was only recorded, not installed, so on a clean ubuntu:20.04/18.04 the pipeline exits 127 and set -euo pipefail kills the script before any report prints — the exact fresh-host case list targets. (Same shape: _pm_enable_el8_extras does return 1 on subscription-less RHEL 8.)
  • Under-reporting: because SUDO=":" swallows every $SUDO-prefixed non-primitive, list never records epel-release, the Development Tools groupinstall, or the gcc-toolset symlinks/update-alternatives, and dry-run's "commands above are what bootstrap would run" is false for those lines.

Probably needs a mode-aware wrapper (a _run-style guard, or gating) around the raw curl/wget/pip/make/tool-probe calls in os/*.sh, not just $SUDO.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Already addressed — gcc probe made non-fatal (|| echo 0) so list no longer aborts before the report; bionic's cmake-from-source, pip3, and keyserver wgets are gated behind CHECK_DEPS/DRY_RUN. The $SUDO→: under-reporting stays as documented behavior. (Same fix as the RedisTimeSeries PR.)

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.

Main items here are fixed in the latest commit ✅ — the gcc -dumpversion probe no longer aborts (… 2>/dev/null | … || echo 0), and the raw install_aws_cli / cmake-from-source / pip3 install / keyserver-wget mutations are now gated (dry-run prints them; aws-cli is recorded as optional).

One minor, non-blocking gap remains: list/dry-run still don't record the $SUDO-neutralized side-commands on EL8/9 — epel-release, the Development Tools groupinstall, and the gcc-toolset symlinks — so they won't appear in the report. Fine to leave as a follow-up.

Comment thread .install/os/macos.sh Outdated
if ! command -v python3 >/dev/null 2>&1; then
echo "==> [redisbloom] python3 not on PATH; installing brew [email protected]"
HOMEBREW_NO_AUTO_UPDATE=1 brew install [email protected]
HOMEBREW_NO_AUTO_UPDATE=1 _run brew install [email protected]

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.

macOS list never reports a missing python3 (dry-run does) — the two modes disagree.

python is deliberately absent from BREW_BASE, and this conditional routes through _run, which is a no-op under CHECK_DEPS that records nothing into DEPS_*. So on a Mac with no python3, make bootstrap list reports everything present and exits 0, while make bootstrap dry-run does print brew install [email protected]. list should record python3 as a (missing) dependency so it matches dry-run and the real install. (Minor, same line: the dry-run print drops the HOMEBREW_NO_AUTO_UPDATE=1 prefix, so the copy-paste command differs from what bootstrap runs.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

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.

Fixed ✅ — macos.sh now records [email protected] into DEPS_OK/DEPS_MISSING under list and prints the install command under dry-run, so the two modes agree.

Comment thread .install/os/macos.sh Outdated
|| printf '%s\n' "$NEWPATH" >> "$profile_path"
if [ -n "${GITHUB_PATH:-}" ]; then
printf '%s\n' "$newpath" >> "$GITHUB_PATH"
printf '%s\n' "$NEWPATH" >> "$GITHUB_PATH"

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.

This writes the literal export PATH=… line into $GITHUB_PATH — wrong format. GitHub Actions treats each line appended to $GITHUB_PATH as a directory to prepend, not shell to eval. So on a macOS runner this adds one garbage entry (export PATH=…:$PATH) and never actually puts coreutils/llvm@18/gnubin on PATH for later steps — they fall back to Apple BSD tools / clang-15. It also fires 0/1/2 times depending on how many of ~/.bash_profile/~/.zshrc exist, since the write lives inside update_profile. RedisJSON's sibling PR has the correct form (writes the three dirs one-per-line, once, with an explaining comment) — worth copying it here (and into RedisTimeSeries, which has the same bug).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed — $GITHUB_PATH now gets the three directories one-per-line ($COREUTILS, $LLVM, $GNUBIN), written once outside update_profile, so GNU coreutils/llvm@18/gnubin actually land on PATH for later CI steps instead of a single garbage export PATH=… entry. Matched RedisJSON's form and applied the same fix to RedisTimeSeries.

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.

Fixed ✅ — now writes the three dirs one-per-line to $GITHUB_PATH (moved out of update_profile, gated), matching RedisJSON.

Comment thread .install/os/bionic.sh Fixed
Comment thread .install/os/bionic.sh Fixed
Comment thread .install/os/bionic.sh Fixed
Comment thread .install/os/bionic.sh Fixed
Comment thread .install/lib/pm.sh Resolved
Comment thread .install/lib/setup-python.sh Resolved
gabsow
gabsow previously approved these changes Jul 23, 2026

@gabsow gabsow 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.

Re-reviewed after the latest commit — all my earlier review points are addressed. LGTM 🚀

# Gate the whole SCL path on x86_64 so it isn't listed as a forever-unresolvable
# step on arm (where centos-release-scl / devtoolset-11 can never install).
if [ "$(uname -m)" = "x86_64" ]; then
ls /etc/yum.repos.d/*sclo*.repo >/dev/null 2>&1 || _run yum-config-manager --add-repo http://vault.centos.org/centos/7/sclo/x86_64/rh/
Comment thread .install/os/bionic.sh
if ! dpkg-query -W -f='${Status}' gcc-10 2>/dev/null | grep -q 'ok installed'; then
_sh 'wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F" | sudo gpg --batch --no-tty --yes --dearmor -o /etc/apt/trusted.gpg.d/ubuntu-toolchain-r.gpg || true'
_sh 'wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2C277A0A352154E5" | sudo gpg --batch --no-tty --yes --dearmor -o /etc/apt/trusted.gpg.d/ubuntu-toolchain-r-2.gpg || true'
_sh 'echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main" | sudo tee /etc/apt/sources.list.d/ubuntu-toolchain-r-test.list'
Comment thread .install/os/macos.sh Resolved
Comment thread .install/lib/pm.sh
# copy-pasteable script; list: skip; else: execute via eval. Write the string
# with a literal `sudo` (these raw steps are Linux-only, where bootstrap ensures
# sudo) so the printed line runs as-is.
_sh() {

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.

Minor / non-blocking: _sh hardcodes a literal sudo in its command strings, whereas _run uses the MODE-aware prefix (${_SUDO_DISPLAY:-$SUDO}). These _sh 'sudo …' steps replace former $SUDO … calls, so on a Linux-root environment run with INSTALL_SCRIPT_MODE="" and no sudo binary they'd fail (sudo: command not found) where the old $SUDO-based code ran the command directly. Not a blocker (the redis dispatcher installs sudo when root on Linux, and MODE defaults to sudo) — but threading the real prefix through _sh like _run does would make it MODE-consistent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed it's minor/non-blocking. The literal sudo is deliberate (noted in the comment): these _sh steps are Linux-only and the dispatcher installs sudo when running as root, with MODE defaulting to sudo, so the root+empty-MODE+no-sudo combination doesn't occur in the bootstrap path. Threading the prefix would also drop sudo from the copy-pasteable dry-run output, so leaving as-is.

Comment thread .install/lib/pm.sh
if [ -n "$rid" ]; then
$SUDO dnf config-manager --set-enabled "$rid"
dnf repolist --enabled 2>/dev/null | grep -q "$rid" \
|| _run dnf config-manager --set-enabled "$rid"

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.

Minor / non-blocking (niche): a few lines below, the return 1 when no CodeReady repo is found makes _pm_enable_el8_extras exit non-zero, and el8_default_install calls it unguarded — so under set -euo pipefail that aborts make bootstrap list before the dependency report prints. Only reachable on a subscription-less real RHEL 8 (Alma/Rocky report ID=almalinux/rocky and skip this branch, so CI is unaffected). A || true at the call site would let list degrade gracefully.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Acknowledged — very minor. Only reachable on a subscription-less real RHEL 8 (Alma/Rocky skip the branch, so CI is unaffected), and on such a box CodeReady Builder is genuinely required for gcc-toolset-11, so the hard-fail with the "fix RHUI/subscription repos" diagnostic is acceptable. Leaving as-is.

gabsow
gabsow previously approved these changes Jul 26, 2026

@gabsow gabsow 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.

Re-reviewed the latest revision. The read-only routing via _sh/_run, the idempotency guards, and the arm64 Amazon Linux 2 fix all look good, and the earlier follow-up is resolved — list/dry-run now report (and print) the side-commands that were previously swallowed by SUDO=":", with nothing mutating. LGTM 🚀

Left two minor, non-blocking notes inline (_sh hardcoded sudo vs MODE-aware prefix; _pm_enable_el8_extras return 1 on subscription-less RHEL 8) — neither needs to hold the merge.

Comment thread .install/lib/pm.sh
# report the stale apt version).
_get_installed_version() {
case "$1" in
gcc|g++) "$1" -dumpversion 2>/dev/null ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

_get_installed_version gcc case lacks error suppression

Low Severity

The gcc|g++ branch of _get_installed_version runs "$1" -dumpversion 2>/dev/null without || true, while the * branch explicitly appends || true. Since the script runs under set -euo pipefail, a failing gcc -dumpversion (e.g. broken symlink where _pkg_installed sees the rpm but the binary is unusable) would abort the entire script via set -e instead of returning empty and letting the caller treat the version as unsatisfied. Currently unreachable because MIN_VERSIONS="", but the inconsistency contradicts the stated "fail-safe" intent in the comment at the call site.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6cd3660. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Acknowledged — low severity, leaving as-is. It's only reachable through the list path's version check, and in these modules MIN_VERSIONS="" so the gcc|g++ branch's return value is never version-compared. It would only bite on a broken/unrunnable gcc that the package DB still reports installed — a degenerate case where make bootstrap list exiting non-zero is acceptable. Not worth the change for that.

Comment thread .install/lib/pm.sh
# toolchain and a confusing "no package" error several steps later.
_pm_enable_el8_extras || exit 1
rpm -q epel-release >/dev/null 2>&1 || _run dnf -y install epel-release
_pm_enable_el8_extras

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unguarded _pm_enable_el8_extras aborts list before report

Low Severity

In el8_default_install, the bare _pm_enable_el8_extras call (without || true) lets the return 1 from that function propagate up. Under set -euo pipefail, this aborts the script before install_script.sh can print the dependency report. On subscription-less RHEL 8 (where no CodeReady repo is found), make bootstrap list crashes instead of showing the check results. The old || exit 1 had the same abort behavior but predated CHECK_DEPS mode entirely.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6cd3660. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same as the related thread above — acknowledged, very minor. Only reachable on subscription-less real RHEL 8 (Alma/Rocky skip the ID=rhel branch, so CI is unaffected), where CodeReady Builder is genuinely required for gcc-toolset-11. The hard abort with the CRB diagnostic is acceptable there. Leaving as-is.

@TalBarYakar
TalBarYakar force-pushed the tal.ba/feat/enhance_bootstrap branch from ef3b6f4 to 569952d Compare July 27, 2026 06:28
Comment thread .install/lib/pm.sh
# copy-pasteable script; list: skip; else: execute via eval. Write the string
# with a literal `sudo` (these raw steps are Linux-only, where bootstrap ensures
# sudo) so the printed line runs as-is.
_sh() {

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.

(Re-posting after the rebase orphaned it — non-blocking.) _sh hardcodes a literal sudo, whereas _run uses the MODE-aware prefix (${_SUDO_DISPLAY:-$SUDO}). On a Linux-root env run with INSTALL_SCRIPT_MODE="" and no sudo binary, these _sh 'sudo …' steps would fail where the old $SUDO-based code ran directly. Not a blocker (bootstrap ensures sudo when root; MODE defaults to sudo) — threading the real prefix through _sh would make it MODE-consistent.

Comment thread .install/lib/pm.sh
if [ -n "$rid" ]; then
$SUDO dnf config-manager --set-enabled "$rid"
dnf repolist --enabled 2>/dev/null | grep -q "$rid" \
|| _run dnf config-manager --set-enabled "$rid"

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.

(Re-posting after the rebase orphaned it — non-blocking, niche.) The return 1 when no CodeReady repo is found makes _pm_enable_el8_extras exit non-zero, and el8_default_install calls it unguarded, so under set -euo pipefail that aborts make bootstrap list before the report. Only on subscription-less real RHEL 8 (Alma/Rocky skip this branch). A || true at the call site would let list degrade gracefully.

gabsow
gabsow previously approved these changes Jul 27, 2026

@gabsow gabsow 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.

Re-approving after the rebase — I diffed every file each PR touches at my previously-approved commit vs this rebased head and they are byte-identical, so this is a pure rebase with no content change (which is what dismissed the approval). Nothing new to review. LGTM 🚀

The two minor, non-blocking notes from before still apply (re-posted inline): _sh literal sudo vs MODE-aware prefix; _pm_enable_el8_extras return 1 on subscription-less RHEL 8.

…inary

The install scripts run privileged steps via literal `sudo` inside `_sh`
command strings (e.g. `sudo ln -sf ...`, `| sudo tee`, `&& sudo make install`).
On a slim Docker image that runs install_script.sh directly as root with no
`sudo` package installed (e.g. RedisTimeSeries' amazonlinux2 CI), those steps
fail with `sudo: command not found` (exit 127), aborting the whole bootstrap.

Add a root-only pass-through in pm.sh/deps_lib.sh: when running as root and no
real `sudo` binary exists, define `sudo()` to run its arguments directly. When
not root, a missing sudo stays a genuine error and is left unmasked.
@TalBarYakar TalBarYakar added the docker-image-changes Release a new image containing the latest changes. label Jul 27, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@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 4 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d052e34. Configure here.

Comment thread .install/lib/packages.sh
# Only affects `make bootstrap list` (reported separately, never fails).
# Shared superset across modules; names this module doesn't install are simply
# never matched.
OPTIONAL_PKGS="valgrind gdb lcov tcl jq clang-format py3-numpy python3-numpy py3-psutil python3-psutil py3-cryptography python3-cryptography openssh xsimd openblas-dev curl tar uv zlib1g-dev zlib-dev zlib-devel libbz2-dev bzip2-dev bzip2-devel libblocksruntime-dev libev-dev libev-devel libevent-dev libevent-devel awscli"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Required build deps misclassified as optional in list mode

Medium Severity

OPTIONAL_PKGS includes zlib1g-dev and libblocksruntime-dev which are in DEBIAN_BASE (the required package set). The project's Makefile uses -fblocks (requiring libblocksruntime-dev). In _check_pkgs, the _is_optional check unconditionally wins — any package in OPTIONAL_PKGS goes to the optional bucket regardless of being in a required list. This causes make bootstrap list to exit 0 (all required satisfied) even when these genuinely required build deps are missing, since optional gaps never fail the check.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d052e34. Configure here.

@TalBarYakar
TalBarYakar merged commit 5088e68 into master Jul 27, 2026
58 of 59 checks passed
@TalBarYakar
TalBarYakar deleted the tal.ba/feat/enhance_bootstrap branch July 27, 2026 09:58
TalBarYakar added a commit that referenced this pull request Jul 27, 2026
* add bootstrap dry-run and chrck-deps

* remove dry-run

* write list to afile

* add optional deps

* add another optional deps

* add another optional deps

* add versioning managment

* rename command to list

* renme to list

* add dry run

* fix colors

* fix bloom missing deps only for dry run

* fix missing

* remove min cmake version

* fix remarks

* fix remarks

* fix remarks

* fix remarks

* fix remarks

* add _sh so we can have the full bootstrap output

* always return to the workspace dir

* make single copy paste install all

* fix alma8

* fix bad dry-run print

* gaurd tool-set version 11

* fix curl minimal

* remove centos-release-scl for amazonlinux2

* fix macos env

* fix(bootstrap): make sudo a no-op on root containers without a sudo binary

The install scripts run privileged steps via literal `sudo` inside `_sh`
command strings (e.g. `sudo ln -sf ...`, `| sudo tee`, `&& sudo make install`).
On a slim Docker image that runs install_script.sh directly as root with no
`sudo` package installed (e.g. RedisTimeSeries' amazonlinux2 CI), those steps
fail with `sudo: command not found` (exit 127), aborting the whole bootstrap.

Add a root-only pass-through in pm.sh/deps_lib.sh: when running as root and no
real `sudo` binary exists, define `sudo()` to run its arguments directly. When
not root, a missing sudo stays a genuine error and is left unmasked.
TalBarYakar added a commit that referenced this pull request Jul 27, 2026
* MOD-16514 - fix the bootstrap and build (#1028)

* install aws if and only if it is not installed yet

* add another build fixes

* fix build for amazonlinux2

* fix(al2): add cc symlink to devtoolset-11 to fix LTO version mismatch

* alma8 +rhel8+rhel9+bionic +focal passes

* fix for bionic

* fix

* bump rltest

* fix bionic bootstrap

* fix azurelinux3

* bionic fix

* fix for bullesye

* fix focal ci

* fix the test due to bump rltest version

* fix for bionic and focal

* fix

* fix remarks

* try another methood (#1030)

* MOD-16871: replicate in `cfInsertCommon` after `cfCreate` in case of errors (#1034)

* MOD-16871: relicate in  after

* .

* MOD-16306 - pull docker images from registry (#1036)

* MOD-16306 - pull docker images from registry

* cherry pick changes to bloom

* MOD-13409 Harden RDB loading (#1038)

* MOD-13409 Validate Bloom RDB bitset size on load (#126)

* MOD-13409 Validate Bloom RDB bitset size on load

Reject crafted module payloads where the loaded bloom bitset buffer length does not match the declared bits/n2, and add a flow regression test covering RESTORE with a corrupted DUMP payload.

* MOD-13409 clang-format rebloom.c

Run clang-format on rebloom.c to satisfy make lint formatting checks.

* MOD-13409 Validate Bloom RDB bitset length on load

Reject crafted module payloads where persisted bits do not match the loaded bitset buffer length, preventing OOB access after RESTORE.

* Mod 13409 rdb hardening (#127)

* MOD-13409 clang-format rebloom.c

Run clang-format on rebloom.c to satisfy make lint formatting checks.

* MOD-13409 Harden CF RDB load buffer validation

Replace assert-only checks in CFRdbLoad with explicit validation of loaded sizes and ranges, and add a flow test that corrupts a CF DUMP payload to ensure RESTORE is rejected.

* MOD-13409 Harden remaining RDB loaders (TDigest)

TDigest RDB loading trusted attacker-controlled cap, which could desync the allocated centroid arrays from the loaded metadata and enable OOB access after RESTORE.

Reject payloads where loaded cap differs from the allocated cap derived from compression, validate node counters, and add a flow regression that corrupts a TDigest DUMP payload and asserts RESTORE is rejected.

With the earlier BF/CF fixes, this covers all remaining module data structures that load raw buffers from RDB/RESTORE (CMS/TopK already validate buffer sizes).

* Revert "MOD-13409 clang-format rebloom.c"

This reverts commit 456e53503f51b68c4d7a9df988e50a36adf2e61a.

* MOD-13409 Add regression for published P88W exploit

* MOD-13409 Share RDB corruption test helpers

* Fix TDigest RDB load node count overflow check

Avoid signed overflow when validating merged and unmerged node counts by widening the addition.

* MOD-16952 - enhance bootstrap (add list and dry-run arg) (#1037)

* add bootstrap dry-run and chrck-deps

* remove dry-run

* write list to afile

* add optional deps

* add another optional deps

* add another optional deps

* add versioning managment

* rename command to list

* renme to list

* add dry run

* fix colors

* fix bloom missing deps only for dry run

* fix missing

* remove min cmake version

* fix remarks

* fix remarks

* fix remarks

* fix remarks

* fix remarks

* add _sh so we can have the full bootstrap output

* always return to the workspace dir

* make single copy paste install all

* fix alma8

* fix bad dry-run print

* gaurd tool-set version 11

* fix curl minimal

* remove centos-release-scl for amazonlinux2

* fix macos env

* fix(bootstrap): make sudo a no-op on root containers without a sudo binary

The install scripts run privileged steps via literal `sudo` inside `_sh`
command strings (e.g. `sudo ln -sf ...`, `| sudo tee`, `&& sudo make install`).
On a slim Docker image that runs install_script.sh directly as root with no
`sudo` package installed (e.g. RedisTimeSeries' amazonlinux2 CI), those steps
fail with `sudo: command not found` (exit 127), aborting the whole bootstrap.

Add a root-only pass-through in pm.sh/deps_lib.sh: when running as root and no
real `sudo` binary exists, define `sudo()` to run its arguments directly. When
not root, a missing sudo stays a genuine error and is left unmasked.

* bump version to 8.10.0

---------

Co-authored-by: Aviv David <[email protected]>
Co-authored-by: Tom Gabsow <[email protected]>
YaacovHazan pushed a commit to redis/redis that referenced this pull request Jul 29, 2026
## Module Update

This PR bumps the pinned **MODULE_VERSION** for **RedisBloom** from
**v8.9.90** to **v8.10.0**. RedisTimeSeries and RedisJSON are unchanged.

## Changes

| Module | From | To |
| -- | -- | -- |
| RedisBloom | v8.9.90 | v8.10.0 |

**Note:** this RedisBloom range contains 4 relevant commits. The main
fixes are Cuckoo-filter replication correctness, GHCR-based CI Docker
image reuse, RDB/RESTORE hardening, and bootstrap list / dry-run
support.

## Module Changes

[RedisBloom
range](RedisBloom/RedisBloom@v8.9.90...v8.10.0)

- MOD-16871 - replicate CF.ADD / CF.INSERT autocreated keys before early
error returns, preventing master/replica key-existence divergence
([#1034](RedisBloom/RedisBloom#1034))
- MOD-16306 - pull prebuilt RedisBloom CI Docker images from GHCR and
fall back to local builds only when needed
([#1036](RedisBloom/RedisBloom#1036))
- MOD-13409 - harden BF, CF, and TDigest RDB loading against crafted
RESTORE payloads that could cause metadata/buffer desync and OOB access
([#1038](RedisBloom/RedisBloom#1038))
- MOD-16952 - enhance bootstrap with `make bootstrap list` and `make
bootstrap dry-run`, plus fixes for root containers without sudo
([#1037](RedisBloom/RedisBloom#1037))

## Excluded Commits

**0 commits excluded**

All 4 listed commits are part of the requested RedisBloom update set.

## Verification

- [ ] CI passes for RedisBloom at the new pinned version
- [ ] `make all` builds RedisBloom cleanly against unstable
- [ ] Module tests run under `make test`

---

*This PR was automatically created by the Redis Module Release
Orchestrator.*

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Single-version manifest pin with no Redis core or security-path
changes; risk is limited to RedisBloom behavior in the new upstream
release.
>
> **Overview**
> Pins the bundled **RedisBloom** module to upstream tag **`v8.10.0`**
in `modules/modules.yaml` (was **`v8.9.90`**). That manifest drives
`make modules-update`, Docker bundled-module installs, and release
tarballs, so builds and packaging will pull the new RedisBloom release.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ac37b83. 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: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker-image-changes Release a new image containing the latest changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants