Conversation
Expanded resource instances can initially share the same dependency slice, so we must take care to not modify the array values when checking the dependencies. In the future we can convert these to a generic Set data type, as we often need to compare for equality and take the union of multiple groups of dependencies.
apparentlymart
left a comment
There was a problem hiding this comment.
Looks good to me!
By coincidence I did implement a "generic Set data structure" over in #31238 at about the same time you were working on this, although making use of that here would at least require making addrs.ConfigResource implement addrs.UniqueKeyer, so I think it's still worth holding on that for another time so we can benefit from this relatively-small, focused fix first.
|
Yes, that will likely be a good candidate for a useful type here. Since this needs to backported however, we can keep this implementation free of type parameters for v1.2 :D |
|
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Expanded resource instances can initially share the same dependency
slice, so we must take care to not modify the array values when
checking the dependencies.
In the future we can convert these to a generic Set data type, as we
often need to compare for equality and take the union of multiple groups
of dependencies.
Fixes #31243