This is a simple RESTful FastAPI template that uses PostgreSQL as the database and Redis as the cache. It's deployed on Kubernetes with Helm and features a complete CI/CD pipeline, testing, and various other tools for implementation.
The original design for setting environment variables was to leave env empty and let the Config defaults populate, but GitHub Action automatically parses env-sample and applies it to the environment variables as str, which breaks the flow and we don't get the expected variables and types.
So this question focuses on how to refactor the Config class, and the following functionality is what we expect the Config class to have.
We can assign the type of variable we want, and automatically validate it
This issue documents the currently known bugs and some minor features that need to be implemented.
Bugs
CI trigger conditions don't work, release flow should only apply when the master branch push and integration flow are successful, but now it runs no matter what happens.
CI deploy job doesn't work now
Bandit doesn't work now
Feature
upgrade CI runner image version
add create_at and update_at field for base model
extract common testing function
migrate all config from setup.cfg to pyproject.toml (flake8 not support tool file now)