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

ORS_CONFIG_LOCATION doesn't work with *.yaml files #1816

Closed
1 task done
DavidPerezIngeniero opened this issue Jul 17, 2024 · 4 comments · Fixed by #1960
Closed
1 task done

ORS_CONFIG_LOCATION doesn't work with *.yaml files #1816

DavidPerezIngeniero opened this issue Jul 17, 2024 · 4 comments · Fixed by #1960
Labels
configuration ⚙️ investigate 🔍 quick-fix 🚀 very easy fix that should not take much time

Comments

@DavidPerezIngeniero
Copy link

DavidPerezIngeniero commented Jul 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

I set ORS_CONFIG_LOCATION environment value to the value /home/ors/config/config.yml.
Even with the DEBUG log level, it isn't used.
It is silently ignored.
After debugging, I've checked that it is due to not having the json or yml extension.
.yaml is a very widespread extension for YAML files. In fact, I never use .yml.

Proposed solution

Accept also *.yaml or document it isn't allowed.

Additional context

Version 8.1.0
Using Docker image.
By examining docker-entrypoint.sh I 've understood whtat happens.

Forum Topic Link

No response

@sfendrich
Copy link
Contributor

sfendrich commented Sep 2, 2024

Thanks for reporting. We'll have a look into it.

Related to #1771

@sfendrich
Copy link
Contributor

sfendrich commented Sep 2, 2024

Just for clarification of the issue:

(1) If ORS_CONFIG_LOCATION is set to config.yml I would expect ORS to look for a file named config.yml.
(2) If ORS_CONFIG_LOCATION is set to config.yaml I would expect ORS to look for a file named config.yaml.
(3) If ORS_CONFIG_LOCATION is set to config.yml and the file is called config.yaml I would expect ORS to stop with the error message Log file 'config.yml' not found..

Can you confirm that (2) does not work. If yes, could you please post the log output?

@merydian
Copy link
Contributor

merydian commented Jan 27, 2025

(2) If ORS_CONFIG_LOCATION is set to config.yaml I would expect ORS to look for a file named config.yaml.

It does work, logging:

Configuration lookup started.
Configuration file set by environment variable.
Loaded file 'ors-config.yaml'.

However with:

(3) If ORS_CONFIG_LOCATION is set to config.yml and the file is called config.yaml I would expect ORS to stop with the error message Log file 'config.yml' not found..

there is no direct hint this problem is coming from ORS_CONFIG_LOCATION being set wrongly, only:

Configuration lookup started.
Configuration file set by environment variable.

and then the error: No profiles configured. Exiting.

@MichaelsJP
Copy link
Member

#1960 addresses the logging part. We should still investigate the issue itself.

@MichaelsJP MichaelsJP added the quick-fix 🚀 very easy fix that should not take much time label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration ⚙️ investigate 🔍 quick-fix 🚀 very easy fix that should not take much time
Projects
No open projects
Status: To do
Development

Successfully merging a pull request may close this issue.

5 participants