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 TestPodSidecarLabelChangeTriggersAddIptablesAction flake #636

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

hzxuzhonghu
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@kmesh-bot kmesh-bot added the kind/bug Something isn't working label Jul 25, 2024
@hzxuzhonghu hzxuzhonghu requested review from Okabe-Rintarou-0 and removed request for YaoZengzeng and kwb0523 July 25, 2024 09:44
c := NewByPassController(client)
go c.Run(stopCh)
cache.WaitForCacheSync(stopCh, c.pod.HasSynced)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the root cause

Copy link
Member

@Okabe-Rintarou-0 Okabe-Rintarou-0 Jul 25, 2024

Choose a reason for hiding this comment

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

i am also fixing it. you can directly call c.Run(stopCh), just remove go.
There is already cache.WaitForCacheSync(stopCh, c.pod.HasSynced) in c.Run

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, here we can

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.37%. Comparing base (f5f92ac) to head (7fc23fb).
Report is 57 commits behind head on main.

Files Coverage Δ
pkg/controller/bypass/bypass_controller.go 39.08% <100.00%> (-2.68%) ⬇️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 06c2e03...7fc23fb. Read the comment docs.

@Okabe-Rintarou-0
Copy link
Member

i also found that the NODE_NAME env is not aligned with the one in the test pod's spec.nodeName.
One is test_node, another is test-node, will it cause some problem?

@hzxuzhonghu
Copy link
Member Author

They should match. Weired, why the test passed

@hzxuzhonghu
Copy link
Member Author

Oh, it is because fake client does not support field selector, which actually works in kube-apiserver

Signed-off-by: Zhonghu Xu <[email protected]>
@hzxuzhonghu
Copy link
Member Author

ping @supercharge-xsy

Copy link
Member

@Okabe-Rintarou-0 Okabe-Rintarou-0 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@YaoZengzeng
Copy link
Member

@hzxuzhonghu maybe this PR could be merged?

@hzxuzhonghu
Copy link
Member Author

@nlgwcy I thought it was merged

@supercharge-xsy
Copy link
Contributor

/lgtm
/approve

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Okabe-Rintarou-0, supercharge-xsy

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

The pull request process is described 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

@kmesh-bot kmesh-bot merged commit 75a7312 into kmesh-net:main Jul 31, 2024
8 checks passed
@hzxuzhonghu hzxuzhonghu deleted the fix-test-flake branch July 31, 2024 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants