Skip to content

CE v5.2 preparations#22

Merged
Blaumaus merged 3 commits intomainfrom
ce-v5.2
May 7, 2026
Merged

CE v5.2 preparations#22
Blaumaus merged 3 commits intomainfrom
ce-v5.2

Conversation

@Blaumaus
Copy link
Copy Markdown
Member

@Blaumaus Blaumaus commented May 6, 2026

Summary by CodeRabbit

Release Notes

  • Chores

    • Updated container image versions for Swetrix, Redis, ClickHouse, and nginx-proxy to latest stable releases.
  • New Features

    • Auto-generates secure ClickHouse database password during initial setup configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Warning

Rate limit exceeded

@Blaumaus has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 22 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 960aa1c6-bd35-4cdd-b32b-3f9b476a83e8

📥 Commits

Reviewing files that changed from the base of the PR and between b05055f and 367bae4.

📒 Files selected for processing (2)
  • .env.example
  • compose.yaml
📝 Walkthrough

Walkthrough

This PR updates Docker service images in the composition file, including Swetrix (frontend and API), Redis, ClickHouse, and Nginx-Proxy to newer versions. ClickHouse's environment variable for database name is changed from CLICKHOUSE_DATABASE to CLICKHOUSE_DB, and the configuration script is enhanced to auto-generate a ClickHouse password during setup instead of leaving it empty.

Changes

Infrastructure Version and Configuration Update

Layer / File(s) Summary
Service Image Versions
compose.yaml
Bumps swetrix and swetrix-api from v5.1.1 to v5.2.0, redis from 8.2-alpine to 8.6-alpine, clickhouse from 24.10-alpine to 25.8-alpine, and nginx-proxy from nginx:1.29.4-alpine to nginx:1.29.8-alpine.
ClickHouse Configuration
compose.yaml
Updates ClickHouse environment variable key from CLICKHOUSE_DATABASE to CLICKHOUSE_DB while keeping user and other configuration intact.
Automated Password Generation
configure.sh
Adds generate_random_hex() helper function and modifies .env generation to auto-populate CLICKHOUSE_PASSWORD with a random hex string instead of leaving it empty.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Swetrix/selfhosting#18: Both PRs modify Swetrix service images and nginx-proxy versions in compose.yaml; PR #18 initially introduced nginx-proxy support while this PR continues version management.

Poem

🐰 Hop along with fresher code,
Redis hops and ClickHouse glows,
Passwords spring from random hex,
Version bumps—what's next, what's next?
Infrastructure blooms anew!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'CE v5.2 preparations' accurately reflects the main changes: upgrading Swetrix container images to v5.2.0, along with supporting dependency updates (Redis, ClickHouse, nginx) and configuration adjustments for ClickHouse environment variables.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ce-v5.2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
configure.sh (1)

289-292: 💤 Low value

Consider consolidating .env redirects (ShellCheck SC2129)

Multiple individual >> .env redirects can be grouped to reduce repeated file-open operations.

♻️ Proposed refactor
-echo -e "\n\n# Database credentials" >> .env
-echo "REDIS_PASSWORD=" >> .env
-echo "CLICKHOUSE_PASSWORD=$clickhouse_password" >> .env
-echo -e "${GREEN}Generated CLICKHOUSE_PASSWORD${NC}"
+{
+  echo -e "\n\n# Database credentials"
+  echo "REDIS_PASSWORD="
+  echo "CLICKHOUSE_PASSWORD=$clickhouse_password"
+} >> .env
+echo -e "${GREEN}Generated CLICKHOUSE_PASSWORD${NC}"
🤖 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 `@configure.sh` around lines 289 - 292, The three separate appends to .env (the
echo lines that write the "# Database credentials", REDIS_PASSWORD and
CLICKHOUSE_PASSWORD using the clickhouse_password variable and the color print
using GREEN/NC) should be consolidated into a single append to avoid repeated
file opens (ShellCheck SC2129); replace the multiple echo >> .env calls with one
here-doc or single printf that writes all lines at once (e.g., cat >> .env
<<'EOF' ... EOF or a single printf with \n placeholders) and keep the subsequent
status message using the existing GREEN and NC variables unchanged.
🤖 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 `@configure.sh`:
- Around line 289-292: The three separate appends to .env (the echo lines that
write the "# Database credentials", REDIS_PASSWORD and CLICKHOUSE_PASSWORD using
the clickhouse_password variable and the color print using GREEN/NC) should be
consolidated into a single append to avoid repeated file opens (ShellCheck
SC2129); replace the multiple echo >> .env calls with one here-doc or single
printf that writes all lines at once (e.g., cat >> .env <<'EOF' ... EOF or a
single printf with \n placeholders) and keep the subsequent status message using
the existing GREEN and NC variables unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3e1a1b24-a3e0-4244-ad5b-d2bf082d690e

📥 Commits

Reviewing files that changed from the base of the PR and between 58ef927 and b05055f.

📒 Files selected for processing (2)
  • compose.yaml
  • configure.sh

@Blaumaus Blaumaus merged commit e96ea00 into main May 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant