ci: split valgrind Lua tests into blocking job#112
Conversation
📝 WalkthroughWalkthroughThis PR decouples valgrind memcheck testing from the serial lua job into an independent parallel CI job. The main lua job's OpenResty LuaJIT matrix entry is simplified by removing valgrind configuration; valgrind-specific build steps and tests are removed from the lua job and consolidated into a new standalone ChangesValgrind Decoupling for Parallel CI Execution
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 296-299: The CI job "lua-valgrind" currently inherits default
GITHUB_TOKEN scopes; update the workflow job definition for lua-valgrind to add
a minimal permissions block (e.g., permissions: contents: read) under the job
declaration so the job uses least-privilege access; edit the "lua-valgrind" job
in .github/workflows/ci.yml to insert the permissions mapping directly beneath
the job name/runner configuration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bba88d35-6bdb-4724-bd46-4b7e3d2add43
📒 Files selected for processing (2)
.github/workflows/ci.ymlvalgrind.supp
| lua-valgrind: | ||
| name: Lua valgrind memcheck (upstream LuaJIT) | ||
| runs-on: ubuntu-latest | ||
| steps: |
There was a problem hiding this comment.
Add least-privilege permissions to the new lua-valgrind job.
This job currently inherits default token scopes. Please set explicit minimal permissions (for this workflow, contents: read is likely sufficient), to avoid broader-than-needed GITHUB_TOKEN access.
Suggested patch
lua-valgrind:
name: Lua valgrind memcheck (upstream LuaJIT)
runs-on: ubuntu-latest
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v4📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| lua-valgrind: | |
| name: Lua valgrind memcheck (upstream LuaJIT) | |
| runs-on: ubuntu-latest | |
| steps: | |
| lua-valgrind: | |
| name: Lua valgrind memcheck (upstream LuaJIT) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: |
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 296-377: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 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 @.github/workflows/ci.yml around lines 296 - 299, The CI job "lua-valgrind"
currently inherits default GITHUB_TOKEN scopes; update the workflow job
definition for lua-valgrind to add a minimal permissions block (e.g.,
permissions: contents: read) under the job declaration so the job uses
least-privilege access; edit the "lua-valgrind" job in .github/workflows/ci.yml
to insert the permissions mapping directly beneath the job name/runner
configuration.
Summary
luamatrix job into a dedicatedlua-valgrindjob.continue-on-errorpath and preserving the existing fulltests/luamemcheck parameters.Test Plan
ruby -ryaml -e 'ci = YAML.load_file(".github/workflows/ci.yml"); jobs = ci.fetch("jobs"); vg = jobs.fetch("lua-valgrind"); raise "lua-valgrind must not need rust" if Array(vg["needs"]).include?("rust"); raise "lua-valgrind must block on failure" if vg["continue-on-error"]; text = File.read(".github/workflows/ci.yml"); raise "lua matrix still has valgrind flag" if text.include?("matrix.runtime.valgrind") || text.include?("valgrind: true") || text.include?("valgrind: false"); puts "ci valgrind topology invariant OK"'go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/ci.ymlPATH="$HOME/.luarocks/bin:$PATH" make test LUAJIT=/opt/homebrew/bin/luajitcargo test --release --no-default-featurescargo clippy --release --all-targets -- -D warningscargo test --features test-panic --releasecargo test --no-default-featuresNotes
Lua valgrind memcheck (upstream LuaJIT)status check so the GitHub settings layer matches the now-blocking workflow job.Summary by CodeRabbit