Skip to content

Conversation

csatib02
Copy link
Member

@csatib02 csatib02 commented Jun 8, 2025

Adds the problems and problemsCount fields to resource statuses, so users have more direct insight about the specifc problems that can occur.

FIxes: #174

@csatib02 csatib02 self-assigned this Jun 8, 2025
@csatib02 csatib02 added the enhancement New feature or request label Jun 8, 2025
@csatib02 csatib02 force-pushed the feat/status-enhancements branch from 7739806 to 4d3133a Compare June 8, 2025 16:45
@csatib02 csatib02 force-pushed the feat/status-enhancements branch 3 times, most recently from 4da69ec to 948b016 Compare June 26, 2025 11:27
@csatib02 csatib02 requested review from OverOrion, Copilot and pepov June 26, 2025 11:38
@csatib02 csatib02 marked this pull request as ready for review June 26, 2025 11:38
Copy link

@Copilot Copilot AI left a 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

@csatib02 csatib02 force-pushed the feat/status-enhancements branch from 948b016 to 462cbed Compare June 26, 2025 11:47
Copy link
Member

@pepov pepov left a 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?

@csatib02 csatib02 force-pushed the feat/status-enhancements branch 5 times, most recently from 7ce6cfa to cdaaaa9 Compare September 30, 2025 15:03
@csatib02 csatib02 requested a review from Copilot September 30, 2025 15:03
Copy link

@Copilot Copilot AI left a 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.

@csatib02 csatib02 force-pushed the feat/status-enhancements branch from cdaaaa9 to d6278ee Compare September 30, 2025 15:13
@csatib02 csatib02 force-pushed the feat/status-enhancements branch from d6278ee to 22dd4db Compare September 30, 2025 15:14
@csatib02 csatib02 force-pushed the feat/status-enhancements branch from 22dd4db to ea2ec06 Compare September 30, 2025 15:22
@csatib02 csatib02 requested review from OverOrion and pepov and removed request for OverOrion September 30, 2025 15:31
@csatib02 csatib02 force-pushed the feat/status-enhancements branch from ea2ec06 to 30062f6 Compare September 30, 2025 15:37
Copy link
Collaborator

@OverOrion OverOrion left a 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.

@csatib02 csatib02 merged commit ac913f5 into main Oct 2, 2025
11 checks passed
@csatib02 csatib02 deleted the feat/status-enhancements branch October 2, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add additional e2e/integration tests for output problem reporting

3 participants