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

parse bool values from environment variables #3204

Merged
merged 3 commits into from
Oct 13, 2022

Commits on Jul 31, 2022

  1. codalab/codalab/settings/base.py: parse bool from environment variables.

    The value of an environment variable is always a string and any
    non-empty string evals as true.  If we want to support false values in
    the text we need to parse it ourselves.
    
    This commit fixes boolean options in the django settings file: DEBUG,
    IS_DEV, EMAIL_USE_TLS, BROKER_USE_SSL, and PIN_PASSCODE_ENABLED.  In
    addition, AWS_S3_SECURE_URLS and AWS_QUERYSTRING_AUTH parsed the
    string value but in different manner.  This commit uses the same
    approach in all, for the sake of consistency.
    
    We drop the use of distutils.util.strtobool because distutils is
    deprecated and will be removed in Python 3.12 but our implementation
    is compatible.
    carandraug committed Jul 31, 2022
    Configuration menu
    Copy the full SHA
    57b6ca5 View commit details
    Browse the repository at this point in the history
  2. docker/flower/Dockerfile: parse bool from BROKER_USE_SSL env.

    Environment variables are strings and any non-empty string evals as
    true.  This commit only checks if the value is "True" and something
    fancier check True or False or error would be nicer but it's messy to
    do it on a dockerfile RUN command that is sh appending to a python
    file.
    carandraug committed Jul 31, 2022
    Configuration menu
    Copy the full SHA
    3c61c0b View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2022

  1. Configuration menu
    Copy the full SHA
    49d5cd9 View commit details
    Browse the repository at this point in the history