fix: 🐛 Raw db session requirement if tenant id is passed#6
Merged
faizanazim11 merged 3 commits intomainfrom Nov 12, 2025
Merged
fix: 🐛 Raw db session requirement if tenant id is passed#6faizanazim11 merged 3 commits intomainfrom
faizanazim11 merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a raw_db parameter to the get_db_factory methods in both sync and async session managers, allowing database sessions to bypass tenant ID scoping. The PR also includes dependency updates for pre-commit hooks and a version bump.
- Addition of
raw_dbboolean parameter to enable system-level database operations without tenant isolation - Dependency updates: pre-commit-hooks (v5.0.0 → v6.0.0) and ruff-pre-commit (v0.11.0 → v0.14.4)
- Version bump from 1.3.1 to 1.3.2
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
sql_db_utils/session_management.py |
Added raw_db parameter to get_db_factory method to bypass tenant_id when creating sessions |
sql_db_utils/asyncio/session_management.py |
Added raw_db parameter to async get_db_factory method, maintaining sync/async parity |
sql_db_utils/__version__.py |
Bumped version from 1.3.1 to 1.3.2 |
.pre-commit-config.yaml |
Updated pre-commit-hooks to v6.0.0 and ruff-pre-commit to v0.14.4 |
.github/copilot-instructions.md |
Removed trailing whitespace from several lines |
uv.lock |
New lock file added with complete dependency tree for the project |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates dependencies and enhances the database session factory methods to support a new
raw_dboption. This option allows bypassing the tenant ID when creating database sessions, which can be useful for system-level operations or migrations. The changes also include a version bump for the package.Dependency updates:
.pre-commit-config.yaml: Upgradedpre-commit-hooksfrom v5.0.0 to v6.0.0 andruff-pre-commitfrom v0.11.0 to v0.14.4 for improved linting and formatting support.Database session management improvements:
sql_db_utils/session_management.py: Added araw_dbparameter toget_db_factory, allowing the factory to yield sessions without a tenant ID whenraw_db=True.sql_db_utils/asyncio/session_management.py: Similarly added araw_dbparameter to the async version ofget_db_factory, enabling tenant-less session creation.Version update:
sql_db_utils/__version__.py: Bumped the package version from1.3.1to1.3.2to reflect these changes.