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

copy dependency values when sorting #31246

Merged
merged 1 commit into from Jun 14, 2022
Merged

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Jun 14, 2022

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

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.
@jbardin jbardin added the 1.2-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Jun 14, 2022
@jbardin jbardin requested a review from a team June 14, 2022 15:16
@jbardin jbardin self-assigned this Jun 14, 2022
Copy link
Member

@apparentlymart apparentlymart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jbardin
Copy link
Member Author

jbardin commented Jun 14, 2022

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

@jbardin jbardin merged commit 9db277a into main Jun 14, 2022
@jbardin jbardin deleted the jbardin/copy-deps-for-comparison branch June 14, 2022 16:45
@github-actions
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.2-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

terraform crashed on a plan
2 participants