Skip to content

refactor(backend): move controller util packages to backend/pkg/utils - #6381

Merged
openshift-merge-bot[bot] merged 1 commit into
Azure:mainfrom
redhat-chai-bot:refactor/move-controller-utils-to-pkg-utils
Aug 4, 2026
Merged

refactor(backend): move controller util packages to backend/pkg/utils#6381
openshift-merge-bot[bot] merged 1 commit into
Azure:mainfrom
redhat-chai-bot:refactor/move-controller-utils-to-pkg-utils

Conversation

@redhat-chai-bot

Copy link
Copy Markdown
Collaborator

Summary

Move utility packages out of backend/pkg/controllers/ into a new backend/pkg/utils/ directory for better code organization. Utility code that is consumed by controllers (but isn't itself a controller) now lives in a dedicated utils tree.

Changes

Package moves

  • backend/pkg/controllers/controllerutils/backend/pkg/utils/controllerutils/
  • backend/pkg/controllers/statusutils/backend/pkg/utils/statusutils/
  • backend/pkg/controllers/validationutils/backend/pkg/utils/validationutils/
  • backend/pkg/controllers/operation/backend/pkg/utils/operationutils/ (package renamed from operation to operationutils)

generic_operation.go merged into controllerutils

operation/generic_operation.go contained generic controller scaffolding (NewGenericOperationController, OperationSynchronizer interface) that belongs with the rest of the controller utilities. It has been moved into backend/pkg/utils/controllerutils/ with:

  • Package declaration changed to controllerutils
  • Redundant self-import of controllerutils removed
  • All 13 callers updated to use controllerutils.NewGenericOperationController

Import path updates

All import paths across backend and test-integration modules have been updated to reflect the new locations (183 files changed). Git renames are preserved for history tracking.

Validation

  • make fmt — clean
  • make tidy — clean
  • make lint — 0 issues
  • make test — all backend (35/35) and test-integration (9/9) packages pass

AI-generated. Review for accuracy.

Justin Pierce (@jupierce) requested in Slack thread

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the backend codebase to improve organization by moving controller-adjacent utility packages out of backend/pkg/controllers/ into a dedicated backend/pkg/utils/ tree, updating controller and integration-test imports accordingly. This keeps controllers focused on reconcile logic while consolidating shared scaffolding (controller helpers, status aggregation, validations, operation helpers) under a stable utilities namespace.

Changes:

  • Moved controllerutils, statusutils, validationutils, and operation helpers into backend/pkg/utils/... (including renaming operationoperationutils).
  • Merged the generic operation controller scaffolding into utils/controllerutils and updated callers to controllerutils.NewGenericOperationController.
  • Updated backend + test-integration imports to the new package locations.

Reviewed changes

Copilot reviewed 149 out of 183 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test-integration/utils/integrationutils/utils.go Update operation utils import path.
test-integration/utils/databasemutationhelpers/step_sync_cluster_cluster_service_update_dispatch.go Update controllerutils import path.
test-integration/utils/controllertesthelpers/basic_controller.go Update controllerutils import path.
test-integration/backend/launch/notification_test.go Update controllerutils import path.
test-integration/backend/controllers/mismatches/delete_orphaned_cosmos_test.go Update controllerutils import path.
test-integration/backend/controllers/do_nothing/do_nothing_test.go Update controllerutils import path.
backend/pkg/utils/validationutils/nodepool_validation.go Validation interface moved under utils.
backend/pkg/utils/validationutils/cluster_validation.go Validation interface moved under utils.
backend/pkg/utils/validationutils/azure_rp_registration_validation.go Azure RP registration validation under utils.
backend/pkg/utils/validationutils/azure_cluster_resource_group_existence_validation.go RG existence validation under utils.
backend/pkg/utils/validationutils/azure_cluster_mis_existence_validation.go Managed identity existence validation under utils.
backend/pkg/utils/validationutils/always_success_validation.go No-op validation under utils.
backend/pkg/utils/statusutils/union_condition.go Status aggregation helper under utils.
backend/pkg/utils/statusutils/testhelpers.go Shared test fixtures for statusutils.
backend/pkg/utils/statusutils/requirements_valid.go RequirementsValid aggregation helper under utils.
backend/pkg/utils/statusutils/requirements_valid_test.go Tests for RequirementsValid aggregation.
backend/pkg/utils/statusutils/inertia.go Inertia configuration under utils.
backend/pkg/utils/statusutils/inertia_test.go Tests for inertia config.
backend/pkg/utils/statusutils/helpers.go CollectDegradedConditions helpers under utils.
backend/pkg/utils/statusutils/helpers_test.go Tests for degraded collection helpers.
backend/pkg/utils/statusutils/firstobservedbad.go First-observed-bad LRU cache under utils.
backend/pkg/utils/operationutils/utils.go Operation helpers moved + package renamed.
backend/pkg/utils/operationutils/utils_test.go Tests updated for operationutils package name.
backend/pkg/utils/operationutils/operationtesting/readdesire.go Shared operation test fixtures under utils.
backend/pkg/utils/operationutils/operationtesting/fixtures.go Update controllerutils import path in fixtures.
backend/pkg/utils/operationutils/operation_state.go Operation state helpers moved + package renamed.
backend/pkg/utils/operationutils/operation_state_test.go Tests updated for operationutils package name.
backend/pkg/utils/operationutils/doc.go Package docs updated for operationutils.
backend/pkg/utils/controllerutils/util_test.go Tests for controllerutils panic handler.
backend/pkg/utils/controllerutils/subscription_watching_controller.go Subscription watching controller moved under utils.
backend/pkg/utils/controllerutils/read_desire.go ReadDesire helper functions under utils.
backend/pkg/utils/controllerutils/nodepool_watching_controller.go NodePool watching controller moved under utils.
backend/pkg/utils/controllerutils/management_cluster_watching_controller.go ManagementCluster watching controller moved under utils.
backend/pkg/utils/controllerutils/management_cluster_content_controller.go ManagementClusterContent helpers under utils.
backend/pkg/utils/controllerutils/management_cluster_content_controller_test.go Tests for management cluster content helpers.
backend/pkg/utils/controllerutils/generic_watching_controller.go Generic watching controller moved under utils.
backend/pkg/utils/controllerutils/generic_watching_controller_test.go Tests for generic watching controller.
backend/pkg/utils/controllerutils/generic_operation.go Generic operation controller merged into controllerutils.
backend/pkg/utils/controllerutils/external_auth_watching_controller.go ExternalAuth watching controller moved under utils.
backend/pkg/utils/controllerutils/cs_maestro_utils.go Cluster Service / Maestro namespace helpers under utils.
backend/pkg/utils/controllerutils/cosmos.go Cosmos helper functions under utils.
backend/pkg/utils/controllerutils/cooldown.go Cooldown checker helpers under utils.
backend/pkg/utils/controllerutils/controller_metrics.go Controller metrics moved under utils.
backend/pkg/utils/controllerutils/cluster_watching_controller.go Cluster watching controller moved under utils.
backend/pkg/utils/controllerutils/cluster_watching_controller_test.go Tests for cluster watching controller.
backend/pkg/controllers/nodepool/version/trigger_node_pool_upgrade_controller.go Update controllerutils import path.
backend/pkg/controllers/nodepool/version/trigger_node_pool_upgrade_controller_test.go Update controllerutils import path.
backend/pkg/controllers/nodepool/version/nodepool_version_controller.go Update controllerutils import path.
backend/pkg/controllers/nodepool/version/nodepool_version_controller_test.go Update controllerutils import path.
backend/pkg/controllers/nodepool/version/nodepool_active_version_real_cosmos_test.go Update controllerutils import path.
backend/pkg/controllers/nodepool/version/nodepool_active_version_controller.go Update controllerutils import path.
backend/pkg/controllers/nodepool/version/nodepool_active_version_controller_test.go Update controllerutils import path.
backend/pkg/controllers/nodepool/validation/nodepool_validation_controller.go Update controllerutils + validationutils import paths.
backend/pkg/controllers/nodepool/validation/nodepool_validation_controller_test.go Update controllerutils + validationutils import paths.
backend/pkg/controllers/nodepool/update/node_pool_cluster_service_update_dispatch_controller.go Update controllerutils import path.
backend/pkg/controllers/nodepool/update/node_pool_cluster_service_update_dispatch_controller_test.go Update controllerutils import path.
backend/pkg/controllers/nodepool/status/nodepool_requirements_valid_aggregator.go Update controllerutils + statusutils import paths.
backend/pkg/controllers/nodepool/status/nodepool_requirements_valid_aggregator_test.go Update controllerutils + statusutils import paths.
backend/pkg/controllers/nodepool/status/nodepool_degraded_aggregator.go Update controllerutils + statusutils import paths.
backend/pkg/controllers/nodepool/status/nodepool_degraded_aggregator_test.go Update controllerutils + statusutils import paths.
backend/pkg/controllers/nodepool/readdesires/create_nodepool_scoped_read_desires_controller.go Update controllerutils import path.
backend/pkg/controllers/nodepool/operations/operation_node_pool_update.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/nodepool/operations/operation_node_pool_update_test.go Update operationutils/operationtesting import paths.
backend/pkg/controllers/nodepool/operations/operation_node_pool_update_state_calculation.go Update operationutils import path.
backend/pkg/controllers/nodepool/operations/operation_node_pool_update_state_calculation_test.go Update operationtesting import path.
backend/pkg/controllers/nodepool/operations/operation_node_pool_delete.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/nodepool/operations/operation_node_pool_delete_test.go Update operationutils/operationtesting import paths.
backend/pkg/controllers/nodepool/operations/operation_node_pool_create.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/nodepool/operations/operation_node_pool_create_test.go Update operationutils/operationtesting import paths.
backend/pkg/controllers/nodepool/deletion/node_pool_deletion_controller.go Update controllerutils import path.
backend/pkg/controllers/nodepool/deletion/node_pool_deletion_controller_test.go Update controllerutils import path.
backend/pkg/controllers/nodepool/deletion/node_pool_cluster_service_id_clearer.go Update controllerutils import path.
backend/pkg/controllers/nodepool/deletion/node_pool_cluster_service_id_clearer_test.go Update controllerutils import path.
backend/pkg/controllers/nodepool/deletion/node_pool_cluster_service_delete_dispatch_controller.go Update controllerutils import path.
backend/pkg/controllers/nodepool/deletion/node_pool_cluster_service_delete_dispatch_controller_test.go Update controllerutils import path.
backend/pkg/controllers/nodepool/deletion/node_pool_child_resources_cleanup_controller.go Update controllerutils import path.
backend/pkg/controllers/nodepool/deletion/node_pool_child_resources_cleanup_controller_test.go Update controllerutils import path.
backend/pkg/controllers/nodepool/creation/node_pool_cluster_service_create_controller.go Update controllerutils import path.
backend/pkg/controllers/nodepool/creation/node_pool_cluster_service_create_controller_test.go Update controllerutils import path.
backend/pkg/controllers/nodepool/creation/create_service_provider_nodepool_controller.go Update controllerutils import path.
backend/pkg/controllers/nodepool/creation/create_service_provider_nodepool_controller_test.go Update controllerutils import path.
backend/pkg/controllers/mismatch/missing_resource_id.go Update controllerutils import path.
backend/pkg/controllers/mismatch/delete_orphaned_cosmos.go Update controllerutils import path.
backend/pkg/controllers/mismatch/cluster_service_cluster_matching.go Update controllerutils import path.
backend/pkg/controllers/mismatch/backfill_cluster_uid.go Update controllerutils import path.
backend/pkg/controllers/metrics/metrics_controller.go Update controllerutils import path.
backend/pkg/controllers/externalauth/update/external_auth_cluster_service_update_dispatch_controller.go Update controllerutils import path.
backend/pkg/controllers/externalauth/update/external_auth_cluster_service_update_dispatch_controller_test.go Update controllerutils import path.
backend/pkg/controllers/externalauth/status/externalauth_degraded_aggregator.go Update controllerutils + statusutils import paths.
backend/pkg/controllers/externalauth/status/externalauth_degraded_aggregator_test.go Update controllerutils + statusutils import paths.
backend/pkg/controllers/externalauth/operations/operation_external_auth_update.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/externalauth/operations/operation_external_auth_update_test.go Update operationtesting import path.
backend/pkg/controllers/externalauth/operations/operation_external_auth_update_state_calculation.go Update operationutils import path.
backend/pkg/controllers/externalauth/operations/operation_external_auth_update_state_calculation_test.go Update operationtesting import path.
backend/pkg/controllers/externalauth/operations/operation_external_auth_delete.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/externalauth/operations/operation_external_auth_delete_test.go Update operationutils/operationtesting import paths.
backend/pkg/controllers/externalauth/operations/operation_external_auth_delete_legacy.go Update operationutils import path.
backend/pkg/controllers/externalauth/operations/operation_external_auth_create.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/externalauth/operations/operation_external_auth_create_test.go Update operationtesting import path.
backend/pkg/controllers/externalauth/deletion/external_auth_deletion_controller.go Update controllerutils import path.
backend/pkg/controllers/externalauth/deletion/external_auth_deletion_controller_test.go Update controllerutils import path.
backend/pkg/controllers/externalauth/deletion/external_auth_cluster_service_id_clearer.go Update controllerutils import path.
backend/pkg/controllers/externalauth/deletion/external_auth_cluster_service_id_clearer_test.go Update controllerutils import path.
backend/pkg/controllers/externalauth/deletion/external_auth_cluster_service_delete_dispatch_controller.go Update controllerutils import path.
backend/pkg/controllers/externalauth/deletion/external_auth_cluster_service_delete_dispatch_controller_test.go Update controllerutils import path.
backend/pkg/controllers/externalauth/deletion/external_auth_child_resources_cleanup_controller.go Update controllerutils import path.
backend/pkg/controllers/externalauth/deletion/external_auth_child_resources_cleanup_controller_test.go Update controllerutils import path.
backend/pkg/controllers/externalauth/creation/external_auth_cluster_service_create_controller.go Update controllerutils import path.
backend/pkg/controllers/externalauth/creation/external_auth_cluster_service_create_controller_test.go Update controllerutils import path.
backend/pkg/controllers/example/do_nothing.go Update controllerutils import path.
backend/pkg/controllers/datadump/dump_subscription_non_cluster.go Update controllerutils import path.
backend/pkg/controllers/datadump/dump_management_cluster.go Update controllerutils import path.
backend/pkg/controllers/datadump/dump_cluster_recursive.go Update controllerutils import path.
backend/pkg/controllers/datadump/cs_state_dump.go Update controllerutils import path.
backend/pkg/controllers/datadump/cs_state_dump_test.go Update controllerutils import path.
backend/pkg/controllers/datadump/billing_dump.go Update controllerutils import path.
backend/pkg/controllers/datadump/billing_dump_test.go Update controllerutils import path.
backend/pkg/controllers/cosmosmigration/cosmos_migration.go Update controllerutils import path.
backend/pkg/controllers/cosmosmigration/cosmos_migration_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/version/trigger_control_plane_upgrade_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/version/control_plane_desired_version_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/version/control_plane_desired_version_controller_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/version/control_plane_active_version_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/version/control_plane_active_version_controller_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/validation/cluster_validation_controller.go Update controllerutils + validationutils import paths.
backend/pkg/controllers/cluster/update/cluster_cluster_service_update_dispatch_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/update/cluster_cluster_service_update_dispatch_controller_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/status/cluster_requirements_valid_aggregator.go Update controllerutils + statusutils import paths.
backend/pkg/controllers/cluster/status/cluster_requirements_valid_aggregator_test.go Update controllerutils + statusutils import paths.
backend/pkg/controllers/cluster/status/cluster_degraded_aggregator.go Update controllerutils + statusutils import paths.
backend/pkg/controllers/cluster/status/cluster_degraded_aggregator_test.go Update controllerutils + statusutils import paths.
backend/pkg/controllers/cluster/readdesires/create_cluster_scoped_read_desires_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/readdesires/create_cluster_scoped_read_desires_controller_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/properties/serviceprovidercluster_properties_sync.go Update controllerutils import path.
backend/pkg/controllers/cluster/properties/serviceprovidercluster_properties_sync_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/properties/identity_migration.go Update controllerutils import path.
backend/pkg/controllers/cluster/properties/identity_migration_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/properties/desired_control_plane_size_sync.go Update controllerutils import path.
backend/pkg/controllers/cluster/properties/desired_control_plane_size_sync_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/properties/cluster_properties_sync.go Update controllerutils import path.
backend/pkg/controllers/cluster/properties/cluster_properties_sync_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/properties/cluster_base_domain_prefix_sync.go Update controllerutils import path.
backend/pkg/controllers/cluster/properties/cluster_base_domain_prefix_sync_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/placement/management_cluster_placement_sync.go Update controllerutils import path.
backend/pkg/controllers/cluster/placement/management_cluster_placement_sync_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/operations/operation_cluster_update.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/cluster/operations/operation_cluster_update_test.go Update operationtesting import path.
backend/pkg/controllers/cluster/operations/operation_cluster_update_state_calculation.go Update operationutils import path.
backend/pkg/controllers/cluster/operations/operation_cluster_update_state_calculation_test.go Update operationtesting import path.
backend/pkg/controllers/cluster/operations/operation_cluster_delete.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/cluster/operations/operation_cluster_delete_test.go Update operationtesting import path.
backend/pkg/controllers/cluster/operations/operation_cluster_delete_legacy.go Update controllerutils + operationutils import paths.
backend/pkg/controllers/cluster/operations/operation_cluster_create.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/cluster/operations/operation_cluster_create_test.go Update operationtesting import path.
backend/pkg/controllers/cluster/deletion/cluster_deletion_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/deletion/cluster_deletion_controller_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/deletion/cluster_cluster_service_id_clearer.go Update controllerutils import path.
backend/pkg/controllers/cluster/deletion/cluster_cluster_service_id_clearer_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/deletion/cluster_cluster_service_delete_dispatch_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/deletion/cluster_cluster_service_delete_dispatch_controller_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/deletion/cluster_child_resources_cleanup_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/deletion/cluster_child_resources_cleanup_controller_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/deletion/clean_orphaned_cluster_managed_resource_group_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/credentials/operations/operation_revoke_credentials.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/cluster/credentials/operations/operation_revoke_credentials_test.go Update operationtesting import path.
backend/pkg/controllers/cluster/credentials/operations/operation_request_credential.go Switch to controllerutils.NewGenericOperationController; update operationutils import.
backend/pkg/controllers/cluster/credentials/operations/operation_request_credential_test.go Update operationtesting import path.
backend/pkg/controllers/cluster/credentials/operations/dispatch_revoke_credentials.go Switch to controllerutils.NewGenericOperationController; drop operation import.
backend/pkg/controllers/cluster/credentials/operations/dispatch_revoke_credentials_test.go Update operationtesting import path.
backend/pkg/controllers/cluster/credentials/operations/dispatch_request_credential.go Switch to controllerutils.NewGenericOperationController; drop operation import.
backend/pkg/controllers/cluster/credentials/operations/dispatch_request_credential_test.go Update operationtesting import path.
backend/pkg/controllers/cluster/creation/create_service_provider_cluster_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/creation/create_service_provider_cluster_controller_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/creation/cluster_pending_cluster_service_id_assign_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/creation/cluster_pending_cluster_service_id_assign_controller_test.go Update controllerutils import path.
backend/pkg/controllers/cluster/creation/cluster_cluster_service_create_controller.go Update controllerutils import path.
backend/pkg/controllers/cluster/creation/cluster_cluster_service_create_controller_test.go Update controllerutils import path.
backend/pkg/controllers/billing/orphaned_billing_cleanup.go Update controllerutils import path.
backend/pkg/controllers/billing/create_billing_doc.go Update controllerutils import path.
backend/pkg/controllers/billing/create_billing_doc_test.go Update controllerutils import path.
backend/pkg/app/backend.go Wire new utils imports (controllerutils/validationutils).
Suppressed comments (1)

backend/pkg/utils/controllerutils/generic_operation.go:120

  • QueueForInformers currently panics with "not implemented". Since Controller requires this method, any caller that treats controllers uniformly and invokes QueueForInformers will crash the backend process.

@deads2k

Copy link
Copy Markdown
Collaborator

/lgtm

@redhat-chai-bot
Chai-bot (redhat-chai-bot) force-pushed the refactor/move-controller-utils-to-pkg-utils branch from 657f315 to d1a72bd Compare August 3, 2026 21:55
Copilot AI review requested due to automatic review settings August 3, 2026 21:55
@openshift-ci openshift-ci Bot removed the lgtm label Aug 3, 2026
@redhat-chai-bot

Copy link
Copy Markdown
Collaborator Author

Rebased onto latest main and force-pushed.

What changed on main since last push:

Both backend and internal modules build cleanly (go build ./... passes).

David Eads (@deads2k) — needs re-/lgtm after force-push. The only net-new change vs the previous version is updating the import path in the new cachedreader package from #6111.


AI-generated. Review for accuracy.

@deads2k

Copy link
Copy Markdown
Collaborator

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Aug 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 152 out of 186 changed files in this pull request and generated no new comments.

Relocate utility packages out of backend/pkg/controllers into a dedicated
backend/pkg/utils tree. Package names are unchanged except where noted:

  controllers/controllerutils  -> utils/controllerutils
  controllers/statusutils      -> utils/statusutils
  controllers/validationutils  -> utils/validationutils
  controllers/operation        -> utils/operationutils  (package renamed
                                  from "operation" to "operationutils")

Also move generic_operation.go from the operation package into
controllerutils: its package declaration becomes "controllerutils", the
self-qualified controllerutils.* references are dropped, and
NewGenericOperationController / OperationSynchronizer now live in
controllerutils. Callers now use controllerutils.NewGenericOperationController;
the two dispatch files that only used that symbol drop their now-unused
operationutils import.

All import paths across the backend and test-integration modules are updated
to the new locations. No functional changes; go.mod/go.sum are untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@redhat-chai-bot
Chai-bot (redhat-chai-bot) force-pushed the refactor/move-controller-utils-to-pkg-utils branch from d1a72bd to 0190662 Compare August 4, 2026 00:03
Copilot AI review requested due to automatic review settings August 4, 2026 00:03
@openshift-ci openshift-ci Bot removed the lgtm label Aug 4, 2026
@redhat-chai-bot

Copy link
Copy Markdown
Collaborator Author

Rebased onto latest main and force-pushed.

What changed on main since last push:

  • Add deletion timeout for all clusters, 12h default, shorter for CI #6345 (cluster deletion timeout, deads2k) — added operation_cluster_delete.go which imported controllerutils and operation at the old paths. Resolved the merge conflict by updating imports to the new backend/pkg/utils/controllerutils and backend/pkg/utils/operationutils paths, while preserving the new kubeapplierhelpers import from upstream.

Both backend and internal modules build cleanly (go build ./... exits 0).

David Eads (@deads2k) — needs re-/lgtm after force-push. The only net-new change vs the previous version is updating import paths in operation_cluster_delete.go from #6345.


AI-generated. Review for accuracy.

@deads2k

Copy link
Copy Markdown
Collaborator

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Aug 4, 2026
@openshift-ci

openshift-ci Bot commented Aug 4, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, redhat-chai-bot

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

The pull request process is described 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 152 out of 186 changed files in this pull request and generated no new comments.

Suppressed comments (1)

backend/pkg/utils/controllerutils/generic_operation.go:120

  • QueueForInformers currently panics with "not implemented". Since this type satisfies the shared Controller interface, any future generic wiring (or tests) that calls QueueForInformers would crash the backend at runtime. Prefer a safe no-op (or a returned error) instead of a panic.

@redhat-chai-bot

Copy link
Copy Markdown
Collaborator Author

/retest-required

CI infrastructure issue — image registry connection refused during image inspection (build itself succeeded). Not related to code changes.


AI-generated. Review for accuracy.

@redhat-chai-bot

Copy link
Copy Markdown
Collaborator Author

/retest-required


AI-generated. Review for accuracy.

1 similar comment
@redhat-chai-bot

Copy link
Copy Markdown
Collaborator Author

/retest-required


AI-generated. Review for accuracy.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 94c4a5f into Azure:main Aug 4, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants