argoproj / argoproj/argo-workflows

refactor: stop the logging module from being responsible for fatal

Open
#16,692 1 comment 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

# Summary

When we moved from logr to slog in #14644 we retained the ability for the logger to and exit(1) (fatal) from the legacy code. This was done for making the PR easier to digest.

This is really not the responsiblity of the logger.

Lets remove `WithFatal` from Logger in `/util/logging/logging.go that and replace each call to logger which used it with a call to os.Exit(1) afterwards.

Acceptance criteria:
* WithFatal is gone from logging.go and all implementations of the logger
* Structural support for the flag (the withFatal flag) is gone.
* No tests except for /util/logging are changed
* Nothing much else changes

## Use Cases

This is just a code improvement.

Contributor guide

Open the contributing guide

Research direction

Start in /util/logging/logging.go, then search the repository for WithFatal, withFatal, and all logger implementations and call sites. Remove the logger-owned fatal support, preserve the existing behavior at callers with os.Exit(1), and verify that only /util/logging tests need changes and the acceptance criteria are met.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.