Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 15, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

google-genai-bot and others added 4 commits December 15, 2025 10:05
Merge #3917
To migrate from existing DB :

ALTER TABLE events ALTER COLUMN error_message TYPE TEXT;  -- PostgreSQL
ALTER TABLE events MODIFY error_message TEXT;             -- MySQL
SQLite: Doesn't enforce VARCHAR length limits anyway. No impact.
### Link to Issue or Description of Change

**1. Link to an existing issue (if applicable):**

n/a

**2. Or, if no issue exists, describe the change:**

**Problem:**

When storing events with error messages longer than 1024 characters using `DatabaseSessionService`, PostgreSQL raises:

```
ERROR: value too long for type character varying(1024)
```

The `error_message` column in `StorageEvent` is defined as `String(1024)`, which maps to `VARCHAR(1024)`. Error messages can exceed 1024 characters.

**Solution:**

Change the column type from `String(1024)` to `Text` to allow unlimited length error messages.

### Testing Plan

**Unit Tests:**

- [x] I have added or updated unit tests for my change.
- [x] All unit tests pass locally.

$ pytest ./tests/unittests/sessions/ -v
======================= 75 passed, 3 warnings in 26.92s ========================

**Manual End-to-End (E2E) Tests:**

- Verified that events with long error messages (>1024 chars) can be stored in PostgreSQL
- Verified backward compatibility with existing databases

### Checklist

- [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [x] I have added tests that prove my fix is effective or that my feature works.
- [x] New and existing unit tests pass locally with my changes.
- [x] I have manually tested my changes end-to-end.
- [x] Any dependent changes have been merged and published in downstream modules.

### Additional context

This is a minimal change (1 line) that only affects the `error_message` column type definition.

Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com>
COPYBARA_INTEGRATE_REVIEW=#3917 from hiroakis:main 1474fd5
PiperOrigin-RevId: 844845692
Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 844902789
… enable states

Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 844905911
@pull pull bot locked and limited conversation to collaborators Dec 15, 2025
@pull pull bot added the ⤵️ pull label Dec 15, 2025
@pull pull bot merged commit a088506 into CrazyForks:main Dec 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants