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

park-api: errors on startup if config.secrets.yaml is missing #145

Open
hbruch opened this issue May 5, 2024 · 0 comments
Open

park-api: errors on startup if config.secrets.yaml is missing #145

hbruch opened this issue May 5, 2024 · 0 comments
Assignees

Comments

@hbruch
Copy link
Collaborator

hbruch commented May 5, 2024

Currently, park-api relies on external provisioning of etc/park-api/config.secrets.yaml.

If someone tries to use ipl-orchestration standalone,park-api-flask does not start successfully, as the missing config file is created as directory:

  File "/app/webapp/entry_point_gunicorn.py", line 8, in <module>
    app = launch()
  File "/app/webapp/app.py", line 36, in launch
    configure_app(app, testing=testing)
  File "/app/webapp/app.py", line 50, in configure_app
    config_loader.configure_app(app, testing)
  File "/app/webapp/common/config/config_loader.py", line 48, in configure_app
    app.config.from_file(config_secrets_path, safe_load)
  File "/usr/local/lib/python3.10/dist-packages/flask/config.py", line 296, in from_file
    with open(filename, "r" if text else "rb") as f:
IsADirectoryError: [Errno 21] Unable to load configuration file (Is a directory): '/app/config.secrets.yaml'

I suggest to

  • assure that the file exists, e.g. via touch in the make init target
  • document (or link to the documentation) the now needed configuration in the CHANGELOG
  • provide some more setup instructions in the README.md
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

2 participants