Fix updating valhalla.json after changes in valhalla configuration #180
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After changes done in valhalla/valhalla#5010, the
scripts/configure_valhalla.json
cannot updatevalhalla.json
anymore:The reason is that when retrieving value of a key using jq, where a component of the key is a number in string:
The issue is in the loop, which retrieves all keys from
valhalla.json
:docker-valhalla/scripts/configure_valhalla.sh
Lines 127 to 135 in 78e9259
I was able to fix the expression by transforming the keys into object index syntax (instead of the object identifier-index syntax), it should look like this:
The generated keys now look like this:
With these, jq is now able to retrieve the values correctly: