Uploaded image for project: 'Operator Runtime'
  1. Operator Runtime
  2. OPRUN-3728

[UPSTREAM] Prevent nil errors in log.Error to ensure proper logging

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • Upstream
    • 3
    • False
    • None
    • False
    • Flareon OLM Sprint 266

      Summary:
      Ensure setupLog.Error(nil, <errorString>) is replaced with setupLog.Error(errors.New()) to prevent missing log lines and improve debugging.

      Problem:

      • Using nil as the error argument results in no log entry being written.
      • This led to empty pod logs in some cases.
      • A mechanism should be implemented to prevent this scenario in the future.

      Acceptance Criteria:

      • Identify and replace all occurrences of setupLog.Error(nil, <errorString>).
      • Implement safeguards to prevent similar issues.
      • Verify logs are correctly written after the fix.

      Related Issues:

              rh-ee-cmacedo Camila Macedo
              rh-ee-cmacedo Camila Macedo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: