Skip to content

Fix map mutation during iteration in renameExportable#668

Open
a-hilaly wants to merge 1 commit intoaws-controllers-k8s:mainfrom
a-hilaly:fix-nondeterministic-renames
Open

Fix map mutation during iteration in renameExportable#668
a-hilaly wants to merge 1 commit intoaws-controllers-k8s:mainfrom
a-hilaly:fix-nondeterministic-renames

Conversation

@a-hilaly
Copy link
Member

renameExportable() deletes and inserts map keys while iterating
MemberRefs. Go may revisit newly-inserted keys, overwriting
OriginalMemberName with the exported name instead of the original.
Snapshot keys before iterating to prevent this.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot requested review from jlbutler and knottnt February 20, 2026 23:45
@ack-prow ack-prow bot added the approved label Feb 20, 2026
@a-hilaly
Copy link
Member Author

/retest

renameExportable() deletes and inserts map keys while iterating
MemberRefs. Go may revisit newly-inserted keys, overwriting
OriginalMemberName with the exported name instead of the original.
Snapshot keys before iterating to prevent this.
@a-hilaly a-hilaly force-pushed the fix-nondeterministic-renames branch from 15df356 to b010374 Compare February 23, 2026 20:59
Copy link
Member

@michaelhtm michaelhtm left a comment

Choose a reason for hiding this comment

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

👍
/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 23, 2026
@ack-prow
Copy link

ack-prow bot commented Feb 23, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, michaelhtm

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [a-hilaly,michaelhtm]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@a-hilaly
Copy link
Member Author

a-hilaly commented Mar 4, 2026

/retest

2 similar comments
@a-hilaly
Copy link
Member Author

a-hilaly commented Mar 4, 2026

/retest

@a-hilaly
Copy link
Member Author

a-hilaly commented Mar 4, 2026

/retest

@ack-prow
Copy link

ack-prow bot commented Mar 4, 2026

@a-hilaly: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
s3-controller-test b010374 link true /test s3-controller-test
ec2-controller-test b010374 link true /test ec2-controller-test

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants