Skip to content

Commit

Permalink
[Issue 2665] Update analytics db settings to recognize empty pwd sett…
Browse files Browse the repository at this point in the history
…ing in env (#2796)

## Summary
Fixes #2665

### Time to review: __1 min__

## Changes proposed
> What was added, updated, or removed in this PR.

Made `DBSettings.password` an optional field in `analytics/config.py`,
thereby allowing the value to be `None`, which in turn allows IAM
token-creation to occur.

## Context for reviewers
> Testing instructions, background context, more in-depth details of the
implementation, and anything else you'd like to call out or ask
reviewers. Explain how the changes were verified.

## Additional information
> Screenshots, GIF demos, code examples or output to help show the
changes working as expected.
  • Loading branch information
DavidDudas-Intuitial authored Nov 8, 2024
1 parent 943aec7 commit ce2902c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions analytics/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class DBSettings(PydanticBaseEnvConfig):
db_host: str = Field(alias="DB_HOST")
port: int = Field(5432,alias="DB_PORT")
user: str = Field (alias="DB_USER")
password: str = Field(alias="DB_PASSWORD")
ssl_mode: str = Field(alias="DB_SSL_MODE")
password: Optional[str] = Field(None, alias="DB_PASSWORD")
ssl_mode: str = Field("require", alias="DB_SSL_MODE")
slack_bot_token: str = Field(alias="ANALYTICS_SLACK_BOT_TOKEN")
reporting_channel_id: str = Field(alias="ANALYTICS_REPORTING_CHANNEL_ID")
aws_region: Optional[str] = Field(None, alias="AWS_REGION")
Expand Down

0 comments on commit ce2902c

Please sign in to comment.