Fix INJECTION_POINT() macro arity mismatch on PG17 - #565
Conversation
spock_injection.h always called INJECTION_POINT() with two arguments (name, arg), the PG18+ signature. PG17 defines it with a single argument, so building spock with USE_INJECTION_POINTS against a PG17 core failed to compile. Gate the call on PG_VERSION_NUM so each core gets the arity it actually expects. Also compile spockbench.yml's per-PR Docker build with --enable-injection-points (new ENABLE_INJECTION_POINTS Dockerfile build-arg) so this path is exercised on every PR instead of relying on SPOCK_RANDOM_DELAYS, which takes precedence in the same header and had been masking it.
📝 WalkthroughWalkthroughThe Docker build now enables PostgreSQL injection-point compilation. ChangesInjection-point support
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
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/spockbench.yml:
- Line 58: Update the spockbench workflow’s ENABLE_INJECTION_POINTS build
argument so it is only passed for PostgreSQL versions that support or patch
injection points, excluding PostgreSQL 15 and 16 unless their patch sets are
extended accordingly; preserve the existing matrix builds for unsupported
versions without this argument.
🪄 Autofix
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 Plus
Run ID: 678ff2ca-7ef8-48d9-aad9-fab5690e94db
📒 Files selected for processing (3)
.github/workflows/spockbench.ymlinclude/spock_injection.htests/docker/Dockerfile-step-1.el9
spock_injection.h always called INJECTION_POINT() with two arguments (name, arg), the PG18+ signature. PG17 defines it with a single argument, so building spock with USE_INJECTION_POINTS against a PG17 core failed to compile. Gate the call on PG_VERSION_NUM so each core gets the arity it actually expects.
Also compile spockbench.yml's per-PR Docker build with --enable-injection-points (new ENABLE_INJECTION_POINTS Dockerfile build-arg) so this path is exercised on every PR instead of relying on SPOCK_RANDOM_DELAYS, which takes precedence in the same header and had been masking it.