-
Notifications
You must be signed in to change notification settings - Fork 7
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
[refactor] alert reconciler #102
Conversation
Signed-off-by: Nicolas Takashi <[email protected]>
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.
Good initial work :)
I understand it won't happen in this PR, but having end2end tests would make the refactoring a lot easier :P
633b664
to
e0dd1eb
Compare
Coverage provided by https://github.com/seriousben/go-patch-cover-action |
Signed-off-by: Nicolas Takashi <[email protected]>
e0dd1eb
to
e518933
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.
One minor nit, other than that LGTM
Co-authored-by: Povilas Versockas <[email protected]>
9a15a93
to
8edd393
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.
Nice job 👊 , two minor things!
Co-authored-by: Matej Gera <[email protected]>
3f16272
to
89f207f
Compare
🎉 This PR is included in version 0.2.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This pull request primarily updates the Go version from 1.20 to 1.22 and makes several changes to the codebase to improve its efficiency and readability. The major changes include updating the Go version in multiple GitHub workflow files and the Dockerfile, updating the Controller Tools version in the Makefile, refactoring the
AlertSpec
andAlert
structs inalert_types.go
, and making changes to theAlertReconciler
struct inalert_controller.go
.Updates to Go version:
.github/workflows/build.yml
: Updated Go version from 1.20.x to 1.22.x in the GitHub workflow..github/workflows/docs.yml
: Updated Go version from 1.20.x to 1.22.x in the GitHub workflow..github/workflows/e2e-tests.yaml
: Updated Go version from 1.20.x to 1.22.x in the GitHub workflow.Dockerfile
: Updated Go version from 1.20 to 1.22 in the Dockerfile.go.mod
: Updated Go version from 1.20 to 1.22.Updates to Makefile:
Makefile
: Updated the Controller Tools version from v0.9.2 to v0.15.0.Refactoring of
AlertSpec
andAlert
structs:apis/coralogix/v1alpha1/alert_types.go
: Refactored theAlertSpec
struct to simplify theExtractCreateAlertRequest
method and changed the receiver fromin *AlertSpec
toa *Alert
. Added aNewAlert
method to theAlert
struct. [1] [2]Changes to
AlertReconciler
struct:controllers/alphacontrollers/alert_controller.go
: Made several changes to theAlertReconciler
struct, including replacing thejsonpb.Marshaler
withlogr.Logger
, refactoring theReconcile
method, and updating theflattenAlert
function to return a non-pointerAlertStatus
. [1] [2] [3]Updates to dependencies:
go.mod
: Updated thek8s.io/utils
dependency version.