Skip to content

Align identity service settings with pydantic-settings#425

Merged
shayancoin merged 1 commit intomainfrom
codex/update-settings-for-pydantic-settings
Oct 19, 2025
Merged

Align identity service settings with pydantic-settings#425
shayancoin merged 1 commit intomainfrom
codex/update-settings-for-pydantic-settings

Conversation

@shayancoin
Copy link
Owner

@shayancoin shayancoin commented Oct 19, 2025

Summary

  • add pydantic-settings to the identity service runtime dependencies
  • update the identity settings module to use BaseSettings from pydantic_settings with model_config defaults
  • preserve DSN validation while normalizing whitespace

Testing

  • pytest

https://chatgpt.com/codex/tasks/task_e_68f45b54a5548330a443925e5e0c86e6

Summary by CodeRabbit

  • Chores
    • Established configuration management system for the identity service with support for environment-based settings and secrets handling.
    • Added project configuration and dependencies for the identity service, including runtime and development requirements.

@shayancoin shayancoin merged commit b82e2d2 into main Oct 19, 2025
2 of 7 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Two new files establish the identity service's foundational infrastructure: a settings module providing cached environment-based configuration with PostgreSQL and Redis DSN validation, and a project configuration file defining dependencies and build system requirements.

Changes

Cohort / File(s) Summary
Settings module
services/identity/app/core/settings.py
Introduces Settings class extending BaseSettings with database_dsn and redis_dsn PostgreSQL/Redis DSN fields, environment variable loading from .env files, and a classmethod validator stripping whitespace from DSN values. Adds cached get_settings() function using functools.lru_cache for memoized access.
Project configuration
services/identity/pyproject.toml
Defines Poetry project metadata, runtime dependencies (Python 3.11, FastAPI, Pydantic v2, Pydantic Settings, Uvicorn), and development dependencies (Pytest, HTTPX). Sets poetry-core as build backend.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Hops through the .env with glee,
DSN configs cached with lru_cache spree,
PostgreSQL and Redis dance so fine,
Settings validated, all in line,
Poetry orchestrates, dependencies align!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/update-settings-for-pydantic-settings

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4540967 and f93da20.

📒 Files selected for processing (2)
  • services/identity/app/core/settings.py (1 hunks)
  • services/identity/pyproject.toml (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant