Skip to content

Comments

chore: Print additional error message, if CheCluster controller faile…#2057

Merged
tolusha merged 4 commits intomainfrom
23613
Oct 29, 2025
Merged

chore: Print additional error message, if CheCluster controller faile…#2057
tolusha merged 4 commits intomainfrom
23613

Conversation

@tolusha
Copy link
Contributor

@tolusha tolusha commented Oct 24, 2025

…d to reconcile

What does this PR do?

This PR improves error handling and visibility when the CheCluster controller fails to reconcile resources. It adds detailed error logging and status updates to help operators quickly identify and diagnose reconciliation
failures.

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

eclipse-che/che#23613

How to test this PR?

  1. Deploy the operator:

OpenShift

./build/scripts/olm/test-catalog-from-sources.sh

or

build/scripts/docker-run.sh /bin/bash -c "
  oc login \
    --token=<...> \
    --server=<...> \
    --insecure-skip-tls-verify=true && \
  build/scripts/olm/test-catalog-from-sources.sh
"

on Minikube

./build/scripts/minikube-tests/test-operator-from-sources.sh

Common Test Scenarios

  • Deploy Eclipse Che
  • Start an empty workspace
  • Open terminal and build/run an image
  • Stop a workspace
  • Check operator logs for reconciliation errors or infinite reconciliation loops

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@openshift-ci
Copy link

openshift-ci bot commented Oct 24, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link

openshift-ci bot commented Oct 24, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tolusha

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tolusha tolusha requested a review from Copilot October 24, 2025 13:11
Copy link

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 refactors the reconciler management architecture by moving the reconcile manager from pkg/deploy to pkg/common/reconciler, improving error handling during CheCluster controller reconciliation. The changes add detailed error logging and status updates to help operators diagnose reconciliation failures.

Key changes:

  • Moved reconciler management logic from pkg/deploy/reconcile_manager.go to pkg/common/reconciler/reconcile_manager.go
  • Enhanced error handling with wrapped errors and improved logging
  • Updated all reconciler structs to use the new reconciler.Reconcilable interface
  • Added improved test coverage with new mock-based tests

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/common/reconciler/reconcile_manager.go New location for reconciler management logic with enhanced error handling
pkg/common/reconciler/reconcile_manager_test.go New comprehensive test suite using mock reconcilers
pkg/deploy/reconcile_manager.go Removed original reconciler manager implementation
pkg/deploy/reconcile_manager_test.go Removed old test implementation
controllers/che/checluster_controller.go Updated to use new reconciler manager and improved error handling
pkg/deploy/tls/*.go Updated imports to use new reconciler package
pkg/deploy/server/*.go Updated imports to use new reconciler package
pkg/deploy/*/**.go Updated imports across all reconciler implementations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tolusha tolusha marked this pull request as ready for review October 27, 2025 09:26
…d to reconcile

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
@tolusha tolusha merged commit 84b0bb6 into main Oct 29, 2025
21 checks passed
@tolusha tolusha deleted the 23613 branch October 29, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant