Do not order all Yaml maps by keys, only the Helm values file#2702
Conversation
Signed-off-by: Jurrie Overgoor <eclipse.org@jurr.org>
Eclipse JKube CI ReportStarted new GH workflow run for #2702 (2024-02-20T15:10:14Z) ⚙️ JKube E2E Tests (7975506222)
|
| static { | ||
| for (ObjectMapper mapper : new ObjectMapper[]{JSON_MAPPER, YAML_MAPPER}) { | ||
| mapper.enable(SerializationFeature.INDENT_OUTPUT) | ||
| .enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS) |
There was a problem hiding this comment.
According to 2a478d1 (where this was introduced) it's used to order the Helm values.yaml file. That seems like using a sledgehammer to crack a nut. So that was reimplemented in https://github.com/eclipse/jkube/pull/2702/files#diff-33ee7412751801538cf1742ee790e3e2d82ab812d60f3d0c4913a9bf3a433ac0R377.
| // Since Base64.decodeBase64 handles URL-safe encoding, must explicitly check | ||
| // the correct characters are used | ||
| assertThat(config.toHeaderValue(new KitLogger.SilentLogger())) | ||
| .isEqualTo("eyJlbWFpbCI6InJvbGFuZEBqb2xva2lhLm9yZyIsInBhc3N3b3JkIjoiIz5zZWNyZXRzPz8iLCJ1c2VybmFtZSI6InJvbGFuZCJ9"); |
There was a problem hiding this comment.
This was changed because of https://github.com/eclipse/jkube/pull/2702/files#r1495937819.
Previously it read {"email":"roland@jolokia.org","password":"#>secrets??","username":"roland"} and now it reads {"username":"roland","password":"#>secrets??","email":"roland@jolokia.org"}
| // Since Base64.decodeBase64 handles URL-safe encoding, must explicitly check | ||
| // the correct characters are used | ||
| assertThat(config.toHeaderValue()) | ||
| .isEqualTo("eyJlbWFpbCI6InJvbGFuZEBqb2xva2lhLm9yZyIsInBhc3N3b3JkIjoiIz5zZWNyZXRzPz8iLCJ1c2VybmFtZSI6InJvbGFuZCJ9"); |
There was a problem hiding this comment.
This was changed because of https://github.com/eclipse/jkube/pull/2702/files#r1495937819.
Previously it read {"email":"roland@jolokia.org","password":"#>secrets??","username":"roland"} and now it reads {"username":"roland","password":"#>secrets??","email":"roland@jolokia.org"}
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2702 +/- ##
=============================================
+ Coverage 59.36% 70.50% +11.14%
- Complexity 4586 5003 +417
=============================================
Files 500 486 -14
Lines 21211 19463 -1748
Branches 2830 2505 -325
=============================================
+ Hits 12591 13722 +1131
+ Misses 7370 4517 -2853
+ Partials 1250 1224 -26 ☔ View full report in Codecov by Sentry. |
manusa
left a comment
There was a problem hiding this comment.
LGTM.
Thanks for the extra-work 🙌


Description
This pull request keeps the ordering of lines in Yaml fragments as-is. The only exception is the Helm
values.yamlfile, which is still sorted alphabetically.This change is needed when we eventually want to allow plain Helm directives in Yaml fragments.
This pull request is an exerpt of #2689.
Type of change
test, version modification, documentation, etc.)
Checklist