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

Record event when EgressIP remains unassigned #6011

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

jainpulkit22
Copy link
Contributor

Record event when Egress is uninstalled from a node.

FIxes #5996.

@jainpulkit22 jainpulkit22 force-pushed the egress-record-update branch 2 times, most recently from b710677 to d8cee6f Compare February 22, 2024 10:35
@jainpulkit22 jainpulkit22 changed the title Record event when Egress is uninstalled from a node Record event when EgressIP remains unassigned Feb 22, 2024
@jainpulkit22 jainpulkit22 marked this pull request as ready for review February 22, 2024 11:18
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

I think we need unit tests to validate correct events are generated for each case.

pkg/agent/controller/egress/egress_controller.go Outdated Show resolved Hide resolved
@jainpulkit22
Copy link
Contributor Author

I think we need unit tests to validate correct events are generated for each case.

I have added e2e test to validate the correctness of events generated in each case.

test/e2e/egress_test.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller_test.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller_test.go Outdated Show resolved Hide resolved
test/e2e/egress_test.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller_test.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller_test.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller_test.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller_test.go Outdated Show resolved Hide resolved
test/e2e/egress_test.go Outdated Show resolved Hide resolved
@jainpulkit22 jainpulkit22 marked this pull request as draft April 22, 2024 08:20
@jainpulkit22 jainpulkit22 force-pushed the egress-record-update branch 2 times, most recently from e6b4362 to 2f867d7 Compare April 22, 2024 10:25
@jainpulkit22 jainpulkit22 marked this pull request as ready for review April 22, 2024 12:24
@jainpulkit22 jainpulkit22 requested a review from tnqn April 22, 2024 12:25
test/e2e/egress_test.go Outdated Show resolved Hide resolved
test/e2e/egress_test.go Outdated Show resolved Hide resolved
test/e2e/egress_test.go Outdated Show resolved Hide resolved
test/e2e/egress_test.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller_test.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller_test.go Outdated Show resolved Hide resolved
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

For future PRs, please make sure the comments are really addressed, the tests can pass basic validation, and you have really confirmed answers of questions before resolving them and requesting another review.

@@ -600,6 +600,20 @@ func testEgressUpdateEgressIP(t *testing.T, data *TestData) {
return err
})
require.NoError(t, err, "Failed to update Egress")
// Testing the events recorded during deletion of an Egress resource.
Copy link
Member

Choose a reason for hiding this comment

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

The comment no longer makes sense here, the events are not really specific to deletion of an Egress resource, having the comment just confuses readers.

@jainpulkit22 jainpulkit22 marked this pull request as draft April 23, 2024 06:45
@jainpulkit22 jainpulkit22 marked this pull request as ready for review April 23, 2024 10:02
tnqn
tnqn previously approved these changes Apr 23, 2024
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM

@tnqn
Copy link
Member

tnqn commented Apr 23, 2024

/test-e2e
/skip-conformance
/skip-networkpolicy

test/e2e/egress_test.go Outdated Show resolved Hide resolved
Modified the code to record an event for case, when an egressIP is
unassigned from a node and is not assigned to any other node.

Signed-off-by: Pulkit Jain <pulkit.jain@broadcom.com>
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM

@tnqn
Copy link
Member

tnqn commented Apr 24, 2024

/skip-all

1 similar comment
@tnqn
Copy link
Member

tnqn commented Apr 24, 2024

/skip-all

@tnqn tnqn merged commit 6dfc306 into antrea-io:main Apr 24, 2024
49 of 52 checks passed
@jainpulkit22 jainpulkit22 deleted the egress-record-update branch April 24, 2024 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants