Enable CGO to support plugins requiring it - #461
Conversation
Signed-off-by: simontesar <simon@simontesar.com>
Signed-off-by: simontesar <simon@simontesar.com>
📝 WalkthroughWalkthroughThe Dockerfile now uses ChangesCross-platform CGO build
Estimated code review effort: 3 (Moderate) | ~15–30 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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.
🧹 Nitpick comments (1)
Dockerfile (1)
31-34: 🩺 Stability & Availability | 🔵 Trivial | 🏗️ Heavy liftVerify the final image with the CGO plugin path.
xx-verify fedhcpchecks the target binary format. It does not prove that all dynamic CGO dependencies are present in the finaldistrolessimage. The newlibgcc_s.so.1copy addresses one dependency, but the build can still pass while/fedhcpfails when therangeplugin opens SQLite.Add a smoke test for both
linux/amd64andlinux/arm64that starts the final image with the SQLite-backedrangeconfiguration. Alternatively, compare the final binary’sDT_NEEDEDentries with the libraries packaged in the runtime image. Thexxdocumentation describesxx-verifyas a target-file verification step, not a runtime dependency check. (github.com)🤖 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 `@Dockerfile` around lines 31 - 34, Extend the Docker build validation after xx-verify to exercise the final distroless image for both linux/amd64 and linux/arm64, starting fedhcp with the SQLite-backed range configuration and confirming the range plugin loads successfully. Ensure the check validates runtime CGO dependencies, not only binary format, and fails the build when either architecture cannot start with that configuration.Source: MCP tools
🤖 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 `@Dockerfile`:
- Around line 31-34: Extend the Docker build validation after xx-verify to
exercise the final distroless image for both linux/amd64 and linux/arm64,
starting fedhcp with the SQLite-backed range configuration and confirming the
range plugin loads successfully. Ensure the check validates runtime CGO
dependencies, not only binary format, and fails the build when either
architecture cannot start with that configuration.
|
I don't think there is a reasonable followup to that coderabbit comment. I'd love to have some kind of testing for this but it feels out of scope for this PR. |
This PR is to test if the pipeline has issues with CGO. Would fix #460 .
Summary by CodeRabbit