GIScience / openrouteservice

🌍 The open source route planner api with plenty of features.
https://openrouteservice.org
GNU General Public License v3.0
1.33k stars 379 forks source link

fix: evaluate profile_default #1767

Closed jhaeu closed 2 months ago

jhaeu commented 3 months ago

Pull Request Checklist

Fixes #1762 .

Information about the changes

Reason for change: See issue #1762 . The root cause for the bug is, that properties that are set in application.yml ors.engine.profiles. cannot be "overridden" by defaults defined in a user's ors-config.yml ors.engine.profile_default: The method merging profile properties and profile default properties does not know, if a profile property was defined in application.yml or in ors-config.yml, these files are already merged by spring. So properties from profiles. always win.

This PR does not really fix the issue. Properties were moved from the application.yml's profiles section to profile_default. This was done for all properties where the same values were used for all profiles. The goal is, to not change behavior in existing ORS configurations if possible.

A real fix would be PR #1778 - but with the disadvantage, that users would have to change their enabled profiles in their ors-config.yml/env (see PR).

Or another real fix could later be implemented, e.g. defining defaults only in spring annotations in the code and generate ors-config.yml based on this.

Examples and reasons for differences between live ORS routes, and those generated from this pull request

-

Required changes to ors config (if applicable)

-

takb commented 2 months ago

@takb Why did you re-introduce enabled properties in all profiles? This change was intended by me, and it was discussed with @MichaelsJP .

just trying out things because the config conversion script is broken, no worries they're gone

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
71.4% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud