Skip to content

Fix strategy service crash: update pydantic-settings v2 config - #22

Merged
SamoraDC merged 1 commit into
mainfrom
fix-rust
Dec 19, 2025
Merged

Fix strategy service crash: update pydantic-settings v2 config#22
SamoraDC merged 1 commit into
mainfrom
fix-rust

Conversation

@SamoraDC

Copy link
Copy Markdown
Owner

The strategy service was crashing with exit status 3 on Render deployment because pydantic-settings v2 doesn't automatically parse comma-separated environment variables into List[str] types.

Changes:

  • Replace deprecated class Config with model_config = SettingsConfigDict()
  • Add @field_validator for symbols field to parse comma-separated strings (e.g., "BTCUSDT,ETHUSDT" -> ["BTCUSDT", "ETHUSDT"])

This fixes the startup crash when SYMBOLS env var is set in Render.

The strategy service was crashing with exit status 3 on Render deployment
because pydantic-settings v2 doesn't automatically parse comma-separated
environment variables into List[str] types.

Changes:
- Replace deprecated `class Config` with `model_config = SettingsConfigDict()`
- Add `@field_validator` for symbols field to parse comma-separated strings
  (e.g., "BTCUSDT,ETHUSDT" -> ["BTCUSDT", "ETHUSDT"])

This fixes the startup crash when SYMBOLS env var is set in Render.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@SamoraDC
SamoraDC merged commit 373a520 into main Dec 19, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant