Skip to content
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_copy_list working incorrectly #403

Open
md2k opened this issue Jun 21, 2024 · 4 comments
Open

deep_copy_list working incorrectly #403

md2k opened this issue Jun 21, 2024 · 4 comments
Labels
bug 🐛 An issue with the system

Comments

@md2k
Copy link

md2k commented Jun 21, 2024

Describe the Bug

Option deep_copy_list working incorrectly with utils_deep_merge_yaml (not checked utils_deep_merge_json , but probably same).

deep merge configured with : append_list = false , deep_copy_list = true
Input of 2 yaml:

---
test:
  my_list:
     - item1
     - item2
---
test:
  my_list:
     - item1
     - item3
     - item4

Getting as result:

---
test:
  my_list:
     - item1
     - item2

so 2nd Yaml list ignored.
In version 1.23 if append_list and deep_copy_list both enabled, result as above, in versions below 1.23 result will be as expected, but probably because append_list in actions.

Expected Behavior

---
test:
  my_list:
     - item1
     - item2
     - item3
     - item4

Steps to Reproduce

Merge any yaml (even from example) with utils_deep_merge_yaml and deep_copy_list enabled

Screenshots

No response

Environment

OS [Mac M3, Mac Intel, Linux], module version 1.23, 1.22, 1.21, 1.20, 1.19, 1.18

Additional Context

Need to merge complex yaml files, with lists in them, in multiple cases it is required to have merge of lists and ensure we not have duplicates in final outputs, so for that we trying to use deep_copy_list , but seems doesn't work.

@md2k md2k added the bug 🐛 An issue with the system label Jun 21, 2024
@pyrxm
Copy link

pyrxm commented Oct 14, 2024

Can confirm we're also experiencing this, it does appear to have been a change in 1.23 that has caused this.

https://github.com/cloudposse/terraform-provider-utils/pull/400/files

Looks like atmos updated and maybe the merge package has changed significantly between 1.70 (provider v1.22) and 1.79 (provider v1.23)... maybe this release? https://github.com/cloudposse/atmos/releases/tag/v1.76.0

Just my 2¢.

@md2k
Copy link
Author

md2k commented Oct 26, 2024

Is any suggestion from maintainers, @aknysh ?

@md2k
Copy link
Author

md2k commented Dec 12, 2024

Guys, @aknysh , @goruha , @osterman you have complete regression in provider after version 1.22, append list and deep merge doesn't work anymore. Is this project considered as absolute and not going to be maintained and or accept new PRs ?

@md2k
Copy link
Author

md2k commented Dec 13, 2024

I found the issue and it is not related to cloudposse provider and Atmos, it is issue within mergo. But my question about contribution and accepting PRs are still valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

2 participants