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

Fix race condition in DeepEqual function #13472

Merged
merged 2 commits into from
Oct 9, 2020

Conversation

aanm
Copy link
Member

@aanm aanm commented Oct 8, 2020

Fix #13436

MapStringEqualsIgnoreKeys will be used to compare maps while ignoring
certain keys.

Signed-off-by: André Martins <andre@cilium.io>
An equal function should never modify its fields, by doing it so it
might cause race conditions.

Fixes: 100d83c ("k8s: ignore kubectl.kubernetes.io/last-applied-configuration annotation")
Signed-off-by: André Martins <andre@cilium.io>
@aanm aanm added release-note/misc This PR makes changes that have no direct user impact. needs-backport/1.7 labels Oct 8, 2020
@aanm aanm requested review from a team as code owners October 8, 2020 18:47
@aanm aanm requested a review from a team October 8, 2020 18:47
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.8.5 Oct 8, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.7.11 Oct 8, 2020
@aanm
Copy link
Member Author

aanm commented Oct 8, 2020

test-me-please

@aanm
Copy link
Member Author

aanm commented Oct 8, 2020

retest-4.9

@aanm
Copy link
Member Author

aanm commented Oct 9, 2020

hit #13430

@aanm aanm merged commit bafc881 into cilium:master Oct 9, 2020
@qmonnet
Copy link
Member

qmonnet commented Oct 9, 2020

As far as I can tell, the function fixed in second commit is introduced with commit 061c66b (add golang markers for deep equal generator), which does not seem present in v1.7, so I don't believe the backport applies to v1.7?

[EDIT] I was wrong, see discussion on backport PR linked below

@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.8 in 1.8.5 Oct 9, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.7 in 1.7.11 Oct 9, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.8 to Backport done to v1.8 in 1.8.5 Oct 13, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.8 to Backport done to v1.8 in 1.8.5 Oct 13, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.7 to Backport done to v1.7 in 1.7.11 Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/misc This PR makes changes that have no direct user impact.
Projects
No open projects
1.7.11
Backport done to v1.7
1.8.5
Backport done to v1.8
Development

Successfully merging this pull request may close these issues.

[RACE Detector]: pkg/k8s/apis/cilium.io/v2.sharedCNPDeepEqual()
4 participants