Closed amisevsk closed 6 months ago
/area telemetry /remove-status needs-triage
Hi @amisevsk,
Thanks for reporting this issue.
While I agree it makes sense for odo
to avoid prompting when the output is piped or redirected to a file, I'd like to suggest two more things:
ODO_TRACKING_CONSENT
environment variable. See https://odo.dev/docs/overview/configure#environment-variables-controlling-odo-behaviorodo
commands expose a JSON output to make it easier for other programs to consume the output; so I think using odo version --client -o json
might be simpler to use. However, I guess that would still prompt for telemetry consent. So using the ODO_TRACKING_CONSENT
would still be needed.Would that work for you?
A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.
This issue was closed because it has been inactive for 30 days since being marked as stale.
/kind bug
What versions of software are you using?
Operating System: Linux
Output of
odo version
:odo v3.15.0 (10b5e8a8f)
How did you run odo exactly?
With the goal of getting the current
odo
version:(on first run, before seeing telemetry prompt)
Actual behavior
The command hangs indefinitely and cannot be cancelled (i.e. ctrl+c does not work).
Expected behavior
Either
odo
should prompt for telemetry on stderr (instead of stdout) so that users see the prompt in these cases, or it should avoid prompting when output is redirected to a file/pipe.Any logs, error output, etc?
Can be reproduced with the following Dockerfile
If I build an image from this Dockerfile, then
podman run <image>
it printsodo
's versionpodman run -it --rm <image> /bin/bash
, it hangs indefinitely and must bepodman kill
edMore background
The Web Terminal Operator includes
odo
as part of its built-in tooling. In order to be able to list the software and versions installed, the web-terminal-tooling container generates a "installed-versions.txt" file at startup using the above command, which can hang if e.g. it is run from an interactive prompt.As a workaround, we just close
stdin
before calling the script, which avoids the issue.