google / google/adk-python-community
Double Colon in Redis User Session ID Key
- Lenguaje dominante
- Python
- Estrellas
- 182
- Forks
- 75
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
## Description
The Redis session service implementation contains a bug where user session keys are generated with double colons ("::") in the key pattern. This occurs in the `RedisKeys.user_sessions()` method, which constructs keys used to track all sessions for a specific user within an application.
## Current Behavior
The key generation in `redis_session_service.py` currently produces:
```
{APP_PREFIX}::{app_name}:{user_id}
```
This results in keys like: `adk::my_app::user_123`
## Expected Behavior
The key should follow a consistent single-colon delimiter pattern:
```
{APP_PREFIX}{app_name}:{user_id}
```
Resulting in keys like: `adkmy_app:user_123`
## Root Cause
In the `RedisKeys.user_sessions()` method, the `APP_PREFIX` constant already contains a trailing colon, but the f-string adds an additional colon separator:
```python
return f"{State.APP_PREFIX}:{app_name}:{user_id}" # Creates double colon
```
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.