Skip to content

Improvemen: ReconcileWorkerSliceConfig does not emit a Kubernetes Event when UpdateResource fails #382

Description

@mdryaan

Problem:
At lines 282–286 of ReconcileWorkerSliceConfig, an UpdateResource failure silently returns an error with no Kubernetes Event recorded. At lines 398–411 in the same file, CreateMinimalWorkerSliceConfig records EventWorkerSliceConfigUpdateFailed on the equivalent failure. The event recorder is initialized at lines 71–74 and is in scope throughout ReconcileWorkerSliceConfig. The inconsistency means operators monitoring Events will miss reconciliation failures on update.

Proposed Solution:
Before returning the error at line 284, add:

util.RecordEvent(ctx, eventRecorder, workerSliceConfig, nil, events.EventWorkerSliceConfigUpdateFailed)

Type of Issue: improvement / observability

✅ Expected Behavior

A Kubernetes Event with reason EventWorkerSliceConfigUpdateFailed is recorded whenever ReconcileWorkerSliceConfig fails to update the worker slice config resource.

👎 Actual Behavior

No event is emitted. The failure is invisible in kubectl get events.

✅ Proposed Solution

Add util.RecordEvent(ctx, eventRecorder, workerSliceConfig, nil, events.EventWorkerSliceConfigUpdateFailed) before the return ctrl.Result{}, err at worker_slice_config_service.go line 284.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions