-
Notifications
You must be signed in to change notification settings - Fork 910
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
Remove toset(...)
from for_each in dynamic blocks
#2099
Comments
So I changed my mind. What if we fix these as needed? Or we fix only those where the order is important. |
Fixing only those where order is important, means that you need to go through all the list above and understand, whether order is important or not. So IMO, you already done most of the effort. I'd say that at this moment, you may be as well as equipped with enough knowledge to remove On the other hand, I hardly see a case, when you really want to reshuffle / remove duplicates in dynamic So maybe, just fix as needed then? |
THere are a few weird cases, from memory BGP advertisements need to be ordered as the API reorders them, and a few others. I would leave these unchanged unless you have e2e tests for those. |
I think that relying on
If you add attribute a, it breaks ordering on b:
So in such cases, I would either of below:
We did implement first of the above in #2097. Maybe the way forward for now, is just to put a TODO comment at each call-site, and then hope to fix as needed? |
I don't agree. Yours is a correct but abstract explanation, I have seen lots of customers with permadiffs which are for them incomprehensible, and often very hard to address given data might come from JSON, YAML, etc. Again, let's please not blanket do this, and do it case by case only where we have e2e tests and we purposeuflly pass non-ordered data, to check that the API are not sending back the resource with ordered fields. There are often very good reasons for the way modules do things which stem from actual experience, this might not be one of those but let's just tread carefully. |
I think the use of That being said, most of these have never caused any problems so let's fix them as they surface. And moving forward, let's flag them in code reviews as potential issues. |
Yep, agree with the "let's fix them as they surface". I'm sure BGP ranges get reshuffled by the APIs, and I have a vague recollection of a few others. Closing this, as I guess we reached a consensus. |
Describe the bug
The text was updated successfully, but these errors were encountered: