ceph / teuthology-api

A REST API to execute teuthology commands.
MIT License
2 stars 10 forks source link

fix pydantic ValidationError when loading .env file #28

Closed VallariAg closed 1 year ago

VallariAg commented 1 year ago

By default extra=forbid is used, which raises ValidationError when there are variables in .env which are not defined in APISettings as attributes. Solution: extra=ignore would not raise errors for new env variables in .env file and load all of them. ref: https://docs.pydantic.dev/latest/concepts/pydantic_settings/#:~:text=you%20should%20use-,extra%3Dignore,-%3A

fixes: https://github.com/ceph/teuthology-api/issues/25