Skip to content

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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.

TODO:

Add additional e2e/integration tests for this feature: #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 from 4d3133a to 6d5ed83 Compare June 25, 2025 12:52
@csatib02 csatib02 force-pushed the feat/status-enhancements branch from 6d5ed83 to c2d75b0 Compare June 25, 2025 12:57
@csatib02 csatib02 force-pushed the feat/status-enhancements branch from 4da69ec to 948b016 Compare June 26, 2025 11:27
@csatib02 csatib02 requested review from Copilot, pepov and OverOrion 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
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.

1 participant