-
Notifications
You must be signed in to change notification settings - Fork 386
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
Switch traceflow CRD validation to webhook validation. #5230
Conversation
ec9d9ba
to
f3ea9e3
Compare
f3ea9e3
to
a6aa6d9
Compare
a6aa6d9
to
fa1c2d3
Compare
fa1c2d3
to
3c1ec1a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. However, conflicts need to be resolved.
Ignore it, I mistook other message as conflicts. |
Several unit tests and e2e tests failed. Their expectations should be updated according to the change. |
3c1ec1a
to
14ad9b8
Compare
I've removed outdated unit tests. Interestingly, the unit test "timeoutHostnetworkTraceflow" in pkg/controller/traceflow/controller_test.go seems to be wrong before this patch. The |
There's still a failed test in "Go / Unit test (windows-2019)", but this failure seems to have nothing to do with this patch? https://github.com/antrea-io/antrea/actions/runs/5576066018/attempts/2?pr=523 Update: the test is OK again on another try. Related to issue #5261. |
It's correct before the patch. It can fail immediately once it finds out the source Pod is in hostnetwork, instead of waiting 2s. Since you removed the source Pod hostnetwork check in it, it then waits until timeout, which is actually the same as the |
14ad9b8
to
9711d2b
Compare
I've removed it. |
/test-e2e |
0d1a2d4
to
ccbbb7a
Compare
20d2833
to
d2d0699
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@shi0rik0 please help to resolve code conflicts. |
d2d0699
to
38c82c5
Compare
Sorry for the late reply. The conflicts are caused by the Traceflow API version promotion. I've solved the conflicts. There's a failed e2e test, but this seems to be not related to this PR because recent PRs also have this failure (#5380). @luolanzone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one nit
Currently, the traceflow CRD validation is executed in run-time, which is less user-friendly than the webhook validation. I moved most of the validation to the webhook validation. Signed-off-by: shi0rik0 <anguuan@outlook.com>
38c82c5
to
f06fa42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/test-all |
1 similar comment
/test-all |
This PR broke e2e tests on IPv6-only clusters, as the new e2e test assumes that Pods always have a valid IPv4 address. I have opened a PR to fix it: #5415 When doing any non-trivial change to e2e Traceflow tests, it's probably a good idea to always run IPv6-only and dual-stack e2e test jobs. |
Currently, the traceflow CRD validation is executed in run-time, which is less user-friendly than the webhook validation. I moved most of the validation to the webhook validation.
Some of the validations in Agent is unchanged because they need the information of the Agent. Also, I found the current validation is insufficient, but I left the improvement as a future work.