-
Notifications
You must be signed in to change notification settings - Fork 19
feat: emit events for trafficManagerProfile #309
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #309 +/- ##
=======================================
Coverage 80.29% 80.30%
=======================================
Files 29 29
Lines 4101 4108 +7
=======================================
+ Hits 3293 3299 +6
- Misses 643 644 +1
Partials 165 165 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR introduces event emission for the TrafficManagerProfile controller to improve observability of key operations such as creation, update, and deletion. Key changes include:
- Adding an EventRecorder to the Reconciler and initializing it in tests and main.
- Updating controller logic to record events for API errors, successful programming, and deletion.
- Enhancing integration tests to validate that the correct events are emitted during different operation scenarios.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/controllers/hub/trafficmanagerprofile/suite_test.go | Adds event recorder initialization in test setup. |
| pkg/controllers/hub/trafficmanagerprofile/controller_integration_test.go | Introduces helper functions and assertions to validate emitted events in various cases. |
| pkg/controllers/hub/trafficmanagerprofile/controller.go | Updates delete and update handlers to record events on error and success. |
| cmd/hub-net-controller-manager/main.go | Passes the event recorder to the controller during manager setup. |
pkg/controllers/hub/trafficmanagerprofile/controller_integration_test.go
Show resolved
Hide resolved
pkg/controllers/hub/trafficmanagerprofile/controller_integration_test.go
Show resolved
Hide resolved
pkg/controllers/hub/trafficmanagerprofile/controller_integration_test.go
Outdated
Show resolved
Hide resolved
327f897 to
32f3b09
Compare
32f3b09 to
f9e714f
Compare
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Requirements:
make reviewablefor basic local testHow has this code been tested
Special notes for your reviewer