Skip to content

Conversation

ivankatliarchuk
Copy link
Contributor

@ivankatliarchuk ivankatliarchuk commented Sep 11, 2025

What does it do ?

This PR addresses test flakiness caused by data races in TestTargetFilterSource, TestTargetFilterSourceEndpoints, and TestMultiSource.

  • Removed duplicate execution of TestTargetFilterSourceEndpoints (was being run both as a standalone test and as a subtest).
  • Eliminated unsafe concurrent access by avoiding t.Parallel() in cases where tests mutate data.

Relevant issue stretchr/testify#187

Motivation

https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/post-external-dns-push-images/1965760676924231680

More

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • Yes, I updated end user documentation accordingly

Signed-off-by: ivan katliarchuk <[email protected]>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. source labels Sep 11, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign raffo for approval. For more information see the Code Review Process.

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

Needs approval from an approver in each of these files:

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

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 11, 2025
@ivankatliarchuk ivankatliarchuk changed the title fix(wrappers): paralel tests fix(wrappers): Fix data races in target filter and multi-source tests Sep 11, 2025
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
Signed-off-by: ivan katliarchuk <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 11, 2025
@mloiseleur mloiseleur changed the title fix(wrappers): Fix data races in target filter and multi-source tests test(wrappers): fix data races in target filter and multi-source Sep 16, 2025
} {

t.Run(tc.title, func(t *testing.T) {
t.Parallel()
Copy link
Contributor

Choose a reason for hiding this comment

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

With the use of independent endpoints, is this needed?

for _, tt := range tests {

t.Run(tt.title, func(t *testing.T) {
t.Parallel()
Copy link
Contributor

Choose a reason for hiding this comment

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

Do this cause any issue?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 17, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants