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

Require new environment variables to be set in API deployment #492

Open
taesungh opened this issue Dec 12, 2024 · 0 comments
Open

Require new environment variables to be set in API deployment #492

taesungh opened this issue Dec 12, 2024 · 0 comments

Comments

@taesungh
Copy link
Member

Mentioned in #468: we depend on several environment variables throughout the API that are effectively required, but we source them with os.getenv to simplify unit testing. When the ASGI app for the API is actually loaded in the Lambda runtime through apps/api/index.py, we have some basic checks for some of the security-related ones that have default values, but we don't check many of the ones for external services. This means that if something is not set, we wouldn't know until the corresponding usage causes an unhandled exception. It would be better to know from the time the app is started if there's a problem to address.

  • Add checks for the remaining environment variables to index.py
  • Remove extraneous checks in saml.py:37 and resume_handler.py:39
    • Might need to specify the default value as an empty string to satisfy type checking
  • Update the README to include a note about adding such checks when new environment variables are added

It might also be good to research options for having a checks lifecycle as part of the Vercel deployment to prevent a bad deployment from being released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant