Update commands with implicit confirmation prompt hang silently in non-TTY environments
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 669
- Forks
- 236
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
Description
Several update commands (e.g., oci bv backup update) prompt for confirmation interactively. When run in a non-TTY environment (CI pipeline, SSH session, script), the prompt is invisible and the command hangs indefinitely with no output, waiting for input that will never come.
Steps to Reproduce
Run an update command in a non-TTY context (e.g., a CI runner, SSH piped command, or script):
# Hangs silently — prompt is invisible in non-TTY:
oci bv backup update --volume-backup-id $ID --display-name "new-name"
The command blocks forever because it's waiting for a y/n confirmation that can never be provided in a non-interactive context.
Expected Behaviour
Either:
- Auto-detect non-TTY and skip the confirmation (like
apt-get -yordocker rm), OR - Error out immediately with a clear message:
"This command requires confirmation. Use --force to skip the prompt.", OR - Document
--forceprominently in the basic usage line, not buried deep in--helpoutput.
Actual Behaviour
- The command hangs silently with no output.
- The
--forceflag exists but is only discoverable viaoci bv backup update --helpdeep in the option list. - Users unfamiliar with OCI CLI patterns may spend significant time debugging what appears to be a network hang or API timeout.
Affected Commands
This pattern affects multiple update commands across the CLI that use click.confirm() with a force flag. The oci bv backup update command is one example; others likely exist.
Impact
In CI/CD pipelines, this causes task timeouts that are difficult to diagnose because there's no error output — just silence.
Suggested Fix
- Add non-TTY detection (e.g.,
sys.stdin.isatty()) and either auto-accept or error out with a message directing users to--force. - Alternatively, make
--forcethe documented default for update commands in non-interactive contexts (similar to howapt-getrequires-yfor non-interactive use). - At minimum, ensure the
--forceflag is mentioned in the basic usage line, not just in the detailed help.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating update commands that use click.confirm() with a --force option, beginning with oci bv backup update, and reproduce the command in a non-TTY environment. Review the available confirmation alternatives and ensure affected commands no longer hang silently, with clear --force guidance or an immediate non-interactive error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100