redis: declare gawk build dep (fixes 'awk: command not found') - #542
Conversation
Co-Authored-By: Claude Opus <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe Redis build specification imports the gawk package and adds it to the build dependencies used by the Redis build script. ChangesRedis build dependency
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/redis/build.ncl (1)
4-4: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the import bindings alphabetized.
gawkis inserted correctly relative togrep, but the full lowercase import group is not alphabetized (binutils,gcc, andglibcappear later). Reorder the bindings so the new import complies with the repository rule.As per coding guidelines, imports must be alphabetized within each identifier group.
Proposed ordering
let { subsetOf, Attrs, BuildSpec, Local, OutputBin, Source, .. } = import "minimal.ncl" in let bash = import "../bash/build.ncl" in +let binutils = import "../binutils/build.ncl" in let coreutils = import "../coreutils/build.ncl" in let gawk = import "../gawk/build.ncl" in +let gcc = import "../gcc/build.ncl" in +let glibc = import "../glibc/build.ncl" in let grep = import "../grep/build.ncl" in +let linux_headers = import "../linux_headers/build.ncl" in +let make = import "../make/build.ncl" in +let sed = import "../sed/build.ncl" in -let make = import "../make/build.ncl" in -let sed = import "../sed/build.ncl" in -let binutils = import "../binutils/build.ncl" in -let gcc = import "../gcc/build.ncl" in -let linux_headers = import "../linux_headers/build.ncl" in - -let glibc = import "../glibc/build.ncl" in🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/redis/build.ncl` at line 4, Alphabetize the lowercase import bindings in the build definition, moving the gawk binding into its correct position relative to binutils, gcc, glibc, and grep. Preserve the existing import bindings and only adjust their ordering.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/redis/build.ncl`:
- Line 4: Alphabetize the lowercase import bindings in the build definition,
moving the gawk binding into its correct position relative to binutils, gcc,
glibc, and grep. Preserve the existing import bindings and only adjust their
ordering.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 36cf98af-1d4d-40c8-a33a-1f20bbb5d5f3
📒 Files selected for processing (1)
packages/redis/build.ncl
redis 8.8's build shells out to
awk(via its bundledscripts/lib/manifest.sh, line 88, invoked from thebuildMakefile target), butpackages/redis/build.ncllists its build tools individually —bash, coreutils, grep, sed, make, binutils, gcc, linux_headers— and never declaredgawk. None of those pullgawkin transitively, so redis has noawkin its sandbox and the build dies:Why it surfaced now (and not at the 8.8.1 bump)
This is a latent undeclared build-dep, not a regression. redis's cached artifact was evidently produced under conditions where
awkwas incidentally present (or the entry has since aged out of the res-server build cache), so cold rebuilds only started failing once one actually ran — here, on an unrelated PR's CI (#541, a syft bump, which does not touch redis). Declaring the dep explicitly is the correct fix regardless of the exact masking mechanism: the build genuinely needsawk, so it must be inbuild_deps.Fix
Add
gawk(the packagebaseuses to provideawk) to redis's imports andbuild_deps.Verification
Built redis locally arm64-native with a forced cold rebuild (novel-marker cache-bust) after the change: it now builds to completion — no
awk: command not found, noError 127— and produces theredis-server/redis-clibinaries.gawkwas the only missing dep; no cascade.Unblocks unrelated PRs (e.g. #541) whose CI happens to cold-rebuild redis.
Summary by CodeRabbit