-
Notifications
You must be signed in to change notification settings - Fork 324
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
config.yml is getting ignored while physically available #9490
Comments
Looks like there's a subtle issue with indentation of YAML lists: The "-" for the item must be on the start column of the parent key. This works for me:
|
Very weird, I was able to reproduce it once, but now not anymore... |
Hi sschuberth, ort/model/src/main/resources/reference.yml Lines 21 to 29 in ac270d8
However, changing the indendation didn't fix the problem, unfortunately. |
I did another test and removed everything from the config.yml except:
Still it gets ignored, cause the output of the log is:
This is really odd. |
Ok, that was a bit confusing. I've adressed that in #9549. |
@MNesche, can you elaborate what you mean by "with the right Environment Variables"? Do you set environment variables that should influence ORT configuration? |
Yes, in Jenkins we used the Variables as described in https://oss-review-toolkit.org/ort/docs/getting-started/usage#configuration. |
Ok, but you're not using Hoplite's mechanism to override configuration properties via environment variables? |
With the sentence "with the right Environment Variables" was only meant for the context of running ORT in Jenkins. For the workaround, we use the mechanism you asked about, to parse the config as string to hoplite but not for overriding any configuration properties via environment variables.
|
Sure, thanks a lot for the update and effort in finding a solution, I'll let you know about the result as soon as possible. |
@sschuberth, the results are as following: Config is used, as seen in the output log:
The merge of the commits into the master branch according to #10095 doesn't work.
The same config has been used for both tests, without any changes in between. |
@sinkarharshad and others, could you try with #10106? Is the issue then still reproducible? |
@sschuberth I tried with #10106 and was able to reproduce the issue. I didn’t notice anything in the log, but I might have missed something:
|
Thanks @sinkarharshad for trying! Do you see the new "All property sources were empty, falling back to the default configuration." log statement in the output? |
@sschuberth Nope, could not find any trace of that in the log. |
If you don't have any sensitive information in there, could you also dump all your environment variables? |
Here you go: |
Describe the bug
Running ORT (any Version, starting from 28.0) in Jenkins on Windows, the config.yml (format previously to ORT Version 41.0.0) is physically present but will not be parsed further to be used for the execution.
The default configuration settings are used instead.
When implementing a false intendation in the config.yml, the ORT commands fail, due to the wrong intendation.
This shows that the config.yml can be accessed and is also read by ORT.
Since ORT Version 41.0.0, the key "rootLicenseFilenames" in "licenseFilePatterns" of the config.yml got renamed.
That should throw an error, cause the key is not valid anymore, if the same config is used with ORT 41.0.0.
However, there is no error according the invalid key when running any ORT command, the fallback standard configuration settings are used instead.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Settings in the config.yml will be applied successfully.
Console / log output
Add console and / or log output that shows the error and additional context.
No screenshots of plain text please, to keep text searchable.
Output after using command "ort config --show-active":
Environment
Output of the
ort requirements -l commands
command:Or manually specify:
And specify (relevant parts of) your ORT configuration (
config.yml
):Additional context
Further investigation assumes a problem in the hoplite library.
The corresponding line of the issue happening in the source code of ORT seems to be at:
ort/model/src/main/kotlin/config/OrtConfiguration.kt
Line 173 in 1d5676f
The text was updated successfully, but these errors were encountered: