-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
server-side reordering on stateful_external_ip of google_compute_region_instance_group_manager #13430
Comments
Depending on the rules of the API we may be able to fix this in a backwards compatible way by following the state setting protocol (#4328) and reordering the values as we're writing them in to state (during Read) to match the old state (and presumably the user's configuration). If the values are returned in insertion order by the API- indicating this is an ordered list, not an unordered one- we will want to avoid doing so. However, given we're getting a diff, insertion order seems unlikely. |
I have a fix for that in my pull request. I am happy to be the owner of this bug |
This one is causing a lot of noise in our PRs, and fails in our nightly tests. Since we have this bug to capture the failure, I think we should skip the test while we work out a solution. It looks to be a little more involved than simply changing the fields from List to Set. |
I don't think it's more than that. Set is unordered, list is. based on the output from the failure it's a matter of ordering (nic0 became nic1 and vice-versa). I don't mind skipping it though. |
@askubis are you still planning to work on this issue? |
yes, I the PR is ready, GoogleCloudPlatform/magic-modules#7205 |
@askubis We just shipped the 5.0 major release in September - the next one will be in about a year. As described in #13430 (comment) it may be possible to fix this in a backwards-compatible way as well (without needing to wait for the next major release) |
Yes, I'm aware I've missed it this time :( |
The way to implement this would be in the Read function by adding code to rewrite the field's value before setting it in state - if it's possible, using the field's flattener for this would be preferred. I did a quick survey but wasn't able to find an example PR. |
Would it be possible for me to pick up the short-term fix where we manipulate the We could close this issue with that short-term fix, and open a new issue that describes swapping to the correct fix of swapping to a Set, and link your PR to that issue |
Sure, I don't mind someone else doing that. please assign to yourself @SarahFrench |
No worries at all- this issue not being flagged for the v5.0.0 major release was an oversight on our part not yours! 😅 This GH issue has been marked as part of the Future Major Release milestone now so it'll be on our radar when we plan for v6.0.0, and we can get your PR merged then. When I make a PR for the short-term fix I'll make sure it doesn't close this issue prematurely. |
Great, thank you very much! :) |
My PR above is merged, but the work in there should be pulled out and replaced with changing the |
I'm going to unassign myself, as this issue now represents changing this field to a Set. The immediate problem was addressed by adding logic to reorder items in the List to address diffs, but that logic should be removed and replaced with Sets. |
Affected Resource(s)
b/340204874
The text was updated successfully, but these errors were encountered: