Expose ProxySQL version as PROXYSQL_VERSION env var - #20
Conversation
Add ENV PROXYSQL_VERSION to both Debian and CentOS Dockerfiles so that derived images and runtime scripts can discover the installed version without parsing package metadata. Includes a test script (test.sh) that verifies: - The env var is set correctly at build time - The env var matches the installed proxysql version - The env var is inherited by derived images Closes #19
|
Warning Review limit reached
Next review available in: 17 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe Docker images now expose ChangesProxySQL version validation
Estimated code review effort: 3 (Moderate) | ~20 minutes 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@proxysql-images/test.sh`:
- Around line 15-18: Update the cleanup function and trap setup in cleanup() so
both IMAGE and DERIVED_IMAGE are removed on every exit. Define DERIVED_IMAGE
before installing the EXIT trap, then add its forced removal to cleanup();
remove or avoid relying on the separate normal-completion cleanup near the
derived-image command.
- Around line 6-9: Update the automatic version resolution in test.sh around
VERS and the GitHub releases API call to fail before docker build when the
request errors, times out, or returns an invalid response. Ensure the extracted
tag_name is present, non-empty, and a string, strip the leading v only after
validation, and reject any resulting empty version while preserving explicitly
supplied VERS values.
🪄 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 Plus
Run ID: 71c2b405-d204-4172-b714-5560cdf8d2ee
📒 Files selected for processing (4)
proxysql-images/Makefileproxysql-images/proxysql-centos/Dockerfileproxysql-images/proxysql-debian/Dockerfileproxysql-images/test.sh
- dockerfile-lint.yml: runs hadolint recursively on all Dockerfiles - shellcheck.yml: runs shellcheck on all shell scripts - proxysql-test.yml: builds and tests proxysql images (debian + centos) triggered only on changes to proxysql-images/
…t threshold to error
Summary
Adds
ENV PROXYSQL_VERSION="${VERS}"to both the Debian and CentOS Dockerfiles so that derived images and runtime scripts can discover the installed ProxySQL version without parsing package metadata.Changes
proxysql-images/proxysql-debian/Dockerfile: AddedENV PROXYSQL_VERSIONproxysql-images/proxysql-centos/Dockerfile: AddedENV PROXYSQL_VERSIONproxysql-images/test.sh: New test script that verifies:proxysql --versionoutputproxysql-images/Makefile: AddedtesttargetCI Workflows
.github/workflows/dockerfile-lint.yml: Runs hadolint recursively on all Dockerfiles.github/workflows/shellcheck.yml: Runs shellcheck on all shell scripts.github/workflows/proxysql-test.yml: Builds and tests proxysql images (debian + centos matrix), triggered on changes toproxysql-images/Usage
Closes #19