Skip to content

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Oct 20, 2025

Description

LCORE-843: fix for issues in test_dump_configuration.py

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Related Tickets & Documents

  • Related Issue #LCORE-843

Summary by CodeRabbit

  • Bug Fixes
    • Configuration's API key and database password fields are now masked in serialized output, displaying as "**********" instead of actual values.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR updates sensitive configuration fields in LlamaStackConfiguration and PostgreSQLDatabaseConfiguration to use pydantic's SecretStr type. The api_key and password fields now wrap values with SecretStr, masking sensitive data as "**********" in JSON serialization. Tests are correspondingly updated.

Changes

Cohort / File(s) Summary
Test Configuration Updates
tests/unit/models/config/test_dump_configuration.py
Updated test usage to wrap api_key and password fields with SecretStr() constructor; added import of SecretStr to support new field types.
Configuration Field Type Changes
models/config/LlamaStackConfiguration, models/config/PostgreSQLDatabaseConfiguration
Changed field types from str to SecretStr: api_key in LlamaStackConfiguration and password in PostgreSQLDatabaseConfiguration; updates serialization behavior to mask sensitive values in JSON output.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

The changes are localized and follow a consistent pattern (type replacement for two sensitive fields), with straightforward test updates. Review focus should verify that SecretStr serialization behavior aligns with existing dump configurations and that no additional usages of these fields require updates.

Possibly related PRs

Poem

🐰 Secrets tucked in asterisks bright,
No plaintext passwords in sight!
SecretStr wraps what must stay sealed,
Sensitive keys now well concealed. ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd05a4d and de5119e.

📒 Files selected for processing (1)
  • tests/unit/models/config/test_dump_configuration.py (5 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@tisnik tisnik merged commit 09ec1f6 into lightspeed-core:main Oct 20, 2025
15 of 20 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