-
Notifications
You must be signed in to change notification settings - Fork 0
chore: removal of nullable fields #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
HardMax71
wants to merge
21
commits into
main
Choose a base branch
from
removal-of-nullable-fields
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
df9a229
user settings update: init moved to providers
HardMax71 6d151b9
notification service: update and removal of initialize()
HardMax71 1aa1377
event bus: removal of manager (bus is passed directly)
HardMax71 caf1422
sse service: removed getattr
HardMax71 22c0554
removed LifecycleEnabled - we have DI and handling stuff via _aenter …
HardMax71 f5ca16d
tests update
HardMax71 ff45a52
Di usage instead of stateful services
HardMax71 66456d0
Di usage instead of stateful services
HardMax71 a5c9e97
moved lifetime mgmt to DI
HardMax71 a994a84
moved all inits to providers, simplified all other stuff
HardMax71 e7f2228
test infra updates - using beanie instead of mongodb driver
HardMax71 583c5ff
more event-based stuff, removed all loops except 2 for notif service
HardMax71 62c375c
tests fixes
HardMax71 afdc672
tests fixes
HardMax71 6a3a161
added missing providers
HardMax71 594b4ad
lifespan fixes
HardMax71 b599e71
faststream decode func fix
HardMax71 fd3c18c
removed coordinator block - now load is handled inside kafka/redis
HardMax71 ef7c044
updated docs, updated AckPolicy for workers, updated log level for sc…
HardMax71 5a9fdc0
dumb error fix
HardMax71 4b104db
filter by event type
HardMax71 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redis cache operations lack error handling.
If Redis becomes unavailable or times out, the
await self._redis.get(cache_key)call will raise an exception, causing the entire request to fail. For a cache layer, Redis failures should be non-fatal—falling back to fresh data retrieval from the database.🛡️ Proposed fix with graceful degradation
async def get_user_settings(self, user_id: str) -> DomainUserSettings: """Get settings with Redis cache; rebuild and cache on miss.""" cache_key = self._cache_key(user_id) - cached = await self._redis.get(cache_key) - if cached: - self.logger.debug(f"Settings cache hit for user {user_id}") - return DomainUserSettings.model_validate_json(cached) + try: + cached = await self._redis.get(cache_key) + if cached: + self.logger.debug(f"Settings cache hit for user {user_id}") + return DomainUserSettings.model_validate_json(cached) + except Exception as e: + self.logger.warning(f"Redis cache read failed for user {user_id}: {e}") return await self.get_user_settings_fresh(user_id)🤖 Prompt for AI Agents