Skip to content

[chores] Separated session redis bucket from cache bucket#485

Merged
nemesifier merged 2 commits into
masterfrom
separate-session-storage
Jun 27, 2026
Merged

[chores] Separated session redis bucket from cache bucket#485
nemesifier merged 2 commits into
masterfrom
separate-session-storage

Conversation

@nemesifier

Copy link
Copy Markdown
Member

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • N/A I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • N/A I have updated the documentation.

Reference to Existing Issue

Not needed, small improvement being done in all repositories.

Description of Changes

Small improvement to the test env which separates cache from session storage to avoid terminating sessions when clearing the cache.

@nemesifier nemesifier self-assigned this Jun 27, 2026
@nemesifier nemesifier added the enhancement New feature or request label Jun 27, 2026
@openwisp openwisp deleted a comment from coderabbitai Bot Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 49d1e585-f612-4e84-8e51-46d420fd6483

📥 Commits

Reviewing files that changed from the base of the PR and between 724ffb2 and e469155.

📒 Files selected for processing (1)
  • tests/openwisp2/settings.py
📜 Recent review details
⏰ Context from checks skipped due to timeout. (9)
  • GitHub Check: Python==3.12 | django~=5.0.0
  • GitHub Check: Python==3.12 | django~=4.2.0
  • GitHub Check: Python==3.12 | django~=5.2.0
  • GitHub Check: Python==3.10 | django~=5.0.0
  • GitHub Check: Python==3.11 | django~=5.1.0
  • GitHub Check: Python==3.10 | django~=5.1.0
  • GitHub Check: Python==3.11 | django~=5.2.0
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,ts,jsx,tsx,py,java,go,rb,php,c,cpp,cs,swift,kt,scala}

📄 CodeRabbit inference engine (Custom checks)

**/*.{js,ts,jsx,tsx,py,java,go,rb,php,c,cpp,cs,swift,kt,scala}: General: Flag potential security vulnerabilities in code
General: Flag obvious performance regressions such as heavy loops, repeated I/O, or unoptimized queries
General: Avoid unnecessary comments or docstrings for code that is already clear
General: Code formatting must be compact and readable; do not add excessive blank lines, especially inside function or method bodies
General: Flag unused or redundant code
General: Ensure variables, functions, classes, and files have descriptive and consistent names
General: New code must handle errors properly: log errors that cannot be resolved by the user with error level, log unusual conditions with warning level, log important background actions with info level, and provide user-facing messages for errors that the user can solve autonomously

Files:

  • tests/openwisp2/settings.py
**/*.{js,ts,jsx,tsx,py,java,go,rb,php,c,cpp,cs,swift,kt,scala,sh,bash}

📄 CodeRabbit inference engine (Custom checks)

General: Cryptic or non-obvious code (regex, complex bash commands, or hard-to-read code) must include a concise comment explaining why it is needed and why the complexity is acceptable

Files:

  • tests/openwisp2/settings.py
**/*.{js,ts,jsx,tsx,py,java,go,rb,php,c,cpp,cs,swift,kt,scala,md,rst,txt,adoc}

📄 CodeRabbit inference engine (Custom checks)

General: Flag outdated or incorrect documentation, comments, or docstrings

Files:

  • tests/openwisp2/settings.py
**/*.py

📄 CodeRabbit inference engine (Custom checks)

General: For Django pull requests, ensure all user-facing strings are marked as translatable using the Django i18n framework

**/*.py: Avoid unnecessary blank lines inside function and method bodies
Write comments and docstrings only when they explain why code is shaped a certain way. Put comments before the relevant code block instead of scattering them inside it

Files:

  • tests/openwisp2/settings.py
🔇 Additional comments (1)
tests/openwisp2/settings.py (1)

116-127: LGTM!

Also applies to: 141-141, 150-150, 177-177


📝 Walkthrough

Walkthrough

Test settings in tests/openwisp2/settings.py were updated to reassign Redis logical database indices: the default cache moves to DB 0, sessions cache to DB 1, Celery broker to DB 2, and channel layers to DB 3. Additionally, SESSION_CACHE_ALIAS was switched from "default" to "sessions".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required type format and accurately describes the Redis session/cache separation change.
Description check ✅ Passed The description mostly matches the template, but it omits the required issue reference format and the screenshot section.
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.
Bug Fixes ✅ Passed Change is limited to test settings for Redis bucket separation, not core user-facing functionality, so the bug-fix regression-test checklist is not applicable.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch separate-session-storage

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.

@nemesifier nemesifier merged commit be084a2 into master Jun 27, 2026
23 checks passed
@nemesifier nemesifier deleted the separate-session-storage branch June 27, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant