Skip to content

Follow up: audit ignored stderr/log write returns in Go code #77

Description

@coderabbitai

Summary

Audit and clean up ignored stderr/log write-return values in Go code across the repository.

A review on PR #73 identified multiple fmt.Fprintf(os.Stderr, ...) logging paths in pkg/extension/extensiontests/scheduler.go that ignore the returned (int, error). Per the Go path guidance used in review, these write errors should not be silently ignored. The author requested that this be handled as a separate cleanup PR rather than mixed into the resource-pool scheduler feature work.

Rationale

This is a cross-cutting cleanup concern rather than a behavior change specific to the scheduler work in PR #73. Tracking it separately keeps the feature PR focused while preserving the follow-up work.

Affected areas

At minimum, review and update stderr/logging write sites in:

  • pkg/extension/extensiontests/scheduler.go
  • other Go files in the repository with similar ignored stderr/log write returns

Potential approaches:

  • route scheduler and similar diagnostic writes through a small helper/logger that does not discard write errors
  • or otherwise explicitly handle the returned error where appropriate

Acceptance criteria

  • Audit Go code for ignored write-return values on stderr/logging paths
  • Update still-relevant call sites so returned errors are not silently discarded
  • Keep runtime behavior and log content materially unchanged
  • Add or update tests only where needed for any new helper behavior
  • Submit the cleanup as a dedicated follow-up PR, separate from PR Add generic pool scheduling to OTE scheduler #73

Backlinks

Requested by: @mgahagan73

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