-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add problem reporting via resource status #169
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
7739806
to
4d3133a
Compare
4da69ec
to
948b016
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.
Pull Request Overview
This PR introduces problem reporting fields to various resource statuses to provide better clarity on encountered issues. Key changes include adding getter/setter methods for problems and problem counts to models, updating CRDs and their deep copy functions, and refactoring resource reconciliation error handling.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
pkg/sdk/model/types.go | Added interface methods to get and set problems and problem counts. |
pkg/resources/manager/tenant_resource_manager.go | Updated tenant resource handling to report problems and refactored subscription output validation. |
pkg/resources/manager/bridge_manager.go | Renamed and updated the function to validate bridge connections. |
controllers/telemetry/route_controller.go | Refactored reconciliation steps using a tenantReconcileStep pattern and changed status update error handling. |
controllers/telemetry/collector_controller.go | Updated collector reconciliation error handling with problem reporting. |
config/crd & charts/crds | Added new fields for problem reporting to CRDs. |
api/telemetry/v1alpha1/* | Updated API types, deepcopy functions, and associated getters/setters to include problems and problem counts. |
Comments suppressed due to low confidence (2)
pkg/resources/manager/tenant_resource_manager.go:201
- The function now returns invalid outputs as []v1alpha1.Output rather than []v1alpha1.NamespacedName. Verify that downstream code handles this updated return type appropriately to avoid any type mismatches.
func (t *TenantResourceManager) ValidateSubscriptionReferencedOutputs(ctx context.Context, subscription *v1alpha1.Subscription) ([]v1alpha1.NamespacedName, []v1alpha1.Output) {
controllers/telemetry/route_controller.go:233
- There is an extraneous return statement with a mismatched return type in the handleOwnedResources diff block. Please remove this leftover code to ensure that only the correct implementation remains.
return ctrl.Result{}, wrappedErr
948b016
to
462cbed
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.
general question as I don't see this clearly: during a reconcile how do we make sure we don't accumulate the same problems on top of the existing problems already registered in a previous reconciliation?
7ce6cfa
to
cdaaaa9
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.
Pull Request Overview
Copilot reviewed 30 out of 32 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
cdaaaa9
to
d6278ee
Compare
Signed-off-by: Bence Csati <[email protected]>
Signed-off-by: Bence Csati <[email protected]>
Signed-off-by: Bence Csati <[email protected]>
d6278ee
to
22dd4db
Compare
Signed-off-by: Bence Csati <[email protected]>
Signed-off-by: Bence Csati <[email protected]>
… deploy Signed-off-by: Bence Csati <[email protected]>
22dd4db
to
ea2ec06
Compare
Signed-off-by: Bence Csati <[email protected]>
Signed-off-by: Bence Csati <[email protected]>
Signed-off-by: Bence Csati <[email protected]>
ea2ec06
to
30062f6
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.
Neat!
One could extract this into a common "ProblemAccumulator" struct, then only one implementation would be required that could be embedded into other structs. No need to do it now though.
Adds the
problems
andproblemsCount
fields to resource statuses, so users have more direct insight about the specifc problems that can occur.FIxes: #174