-
Notifications
You must be signed in to change notification settings - Fork 97
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
🐛 deep merge of cloud config broken for maps in slices #1343
Conversation
✅ Deploy Preview for kairos-io canceled.
|
fixes #1341 Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
09947b1
to
2aaa12a
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #1343 +/- ##
==========================================
+ Coverage 22.79% 25.92% +3.13%
==========================================
Files 22 17 -5
Lines 1610 1427 -183
==========================================
+ Hits 367 370 +3
+ Misses 1179 997 -182
+ Partials 64 60 -4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -63,9 +63,141 @@ func (c *Config) MergeConfigURL() error { | |||
return c.MergeConfig(remoteConfig) | |||
} | |||
|
|||
func (c *Config) toMap() (map[string]interface{}, error) { | |||
var result map[string]interface{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Config
is a map[string]interface{}
. Can't we use it as it is? (maybe with type casting or directly)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I guess it should be possible but I didn't go with that for two reasons:
- For iterations of the items, I still had to convert to
map[string]interface{}
- It feels weird to put everything on a
Config
for example, when I'm deep merging the map inside an array, that is not a full config but just a map in an array, so to keepDeepMerge
as generic as possible I decided to only use maps and not having the need to know anything aboutConfig
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
@mauromorales all green! |
(cherry picked from commit eff6f1d)
* 🐛 Add missing lvm packages in fedora+rockylinux Signed-off-by: Itxaka <[email protected]> (cherry picked from commit 72ba26c) * 🤖 Fix releases test Leftover broken tests for releases functions Signed-off-by: Itxaka <[email protected]> (cherry picked from commit 1261d4b) * 🤖 Download only the x86 iso for testing As we now have also arm generic images, the download-latest job is now downsloading both isos as they match in name. Adds a tighter regex to download the proper images Signed-off-by: Itxaka <[email protected]> (cherry picked from commit f7cbb63) * 🐛 deep merge of cloud config broken for maps in slices (#1343) (cherry picked from commit eff6f1d) --------- Co-authored-by: Mauro Morales <[email protected]>
What this PR does / why we need it:
Removes use of mergo to deep merge cloud configs, because it cannot merge maps in slices, see darccio/mergo#204
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):fixes #1341