Skip to content

Conversation

JonahSussman
Copy link
Contributor

Added better handling of the generation of the db_dsn field in SolutionServerSettings.

New environment variables added:

  • KAI_DB_DRIVERNAME
  • KAI_DB_USERNAME
  • KAI_DB_PASSWORD
  • KAI_DB_HOST
  • KAI_DB_PORT
  • KAI_DB_DATABASE

It now goes through the following flow:

  1. Any parameters supplied via Python's SolutionServerSettings constructor takes highest precedence, then any configuration supplied via KAI_DB_DSN.
  2. Try to parse KAI_DB_DSN as a json object, containing drivername, username, etc... If that fails, parse it as a connection string.
  3. If the KAI_DB_DSN environment variable or the db_dsn field is not supplied, try to get all information from the new variables

Signed-off-by: JonahSussman <[email protected]>
Signed-off-by: JonahSussman <[email protected]>
Signed-off-by: JonahSussman <[email protected]>
@JonahSussman JonahSussman force-pushed the feature/solution-server-envvars branch from ba16d02 to 1ba79b9 Compare June 16, 2025 16:52
Copy link
Contributor

@fabianvf fabianvf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants