Skip to content

fix(chloggen): improve error handling in DeleteEntries#1568

Open
yoursanonymous wants to merge 2 commits intoopen-telemetry:mainfrom
yoursanonymous:fix/chloggen-delete-entries-error-handling
Open

fix(chloggen): improve error handling in DeleteEntries#1568
yoursanonymous wants to merge 2 commits intoopen-telemetry:mainfrom
yoursanonymous:fix/chloggen-delete-entries-error-handling

Conversation

@yoursanonymous
Copy link

Description

Previously, the DeleteEntries function in the chloggen tool would print deletion failures directly to stdout and return nil. This behavior bypassed the command's error-handling system, making it appear that the operation was successful even if it failed to clean up temporary entry files.

Changes:

  • Refactored DeleteEntries in internal/chlog/entry.go to return an accumulated error using errors.Join.
  • Removed fmt.Printf calls from the internal package to ensure errors are handled by the caller.
  • This change ensures that the update command correctly reports failures if it cannot delete entry files after a successful changelog update.

@yoursanonymous yoursanonymous requested review from a team as code owners February 6, 2026 17:46
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