Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/edge_proxy/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ class AppSettings(BaseModel):


class AppConfig(AppSettings, BaseSettings):
class Config:
extra = "ignore"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm... yes, but it's overridden specifically in the BaseSettings class as per this.

That being said, I expected (based on this) that something like docker run --rm -e FOO_BAR=foo flagsmith/edge-proxy:2.17.0 would also generate the error, but it didn't.

Probably more investigation is needed, although the solution I added here does prevent the error reported in the issue when using API_POLL_FREQUENCY, but perhaps it also has some other knock on effects that need investigating before (if) we merge this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have tested the behaviour and verified that the code here does resolve the issue - it prevents the exception as well as behaving as expected if you to set API_POLL_FREQUENCY environment variable (or any other aliased name of a given setting).

I think we should go ahead and merge this.


@classmethod
def settings_customise_sources(
cls,
Expand Down