Telemetry does not catch all errors due to abrupt os.Exit
calls
#4999
Labels
kind/bug
Categorizes issue or PR as related to a bug.
os.Exit
calls
#4999
/kind bug
What versions of software are you using?
Operating System:
Fedora 34
Output of
odo version
:odo v2.2.4 (0c0aaa5)
How did you run odo exactly?
odo delete
out of a context directory.Actual behavior
No telemetry data received on Segment, because at one point during this command execution,
LogErrorAndExit
is called, which exits before the telemetry data request can be triggered.I noticed this with
odo create
or basically any command where you don't have the permission to create comp in a project.On tracking down, it seems that this is the case with all the command execution where
LogErrorAndExit
is called at some point, except inrunnable.go
.See - https://github.com/openshift/odo/search?q=LogErrorAndExit
Expected behavior
Telemetry data must be sent for these errors.
Any logs, error output, etc?
I can think of 2 solutions, atm:
LogErrorAndExit
can only be called by therunnable.go:GenericRun
LogErrorAndExit
, which would mean modifyingLogErrorAndExit
and all of its usages to be able to pass data that is required for triggering the request.The text was updated successfully, but these errors were encountered: