Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore unknown env vars #141

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
Member

Choose a reason for hiding this comment

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

Copy link
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.


@classmethod
def settings_customise_sources(
cls,
Expand Down