Skip to content

[scripts] Skip blank_confirm loop in non-interactive mode#3726

Draft
devs6186 wants to merge 2 commits intochaoss:mainfrom
devs6186:fix/3633-config-sh-noninteractive
Draft

[scripts] Skip blank_confirm loop in non-interactive mode#3726
devs6186 wants to merge 2 commits intochaoss:mainfrom
devs6186:fix/3633-config-sh-noninteractive

Conversation

@devs6186
Copy link

Changeset

  • Added [ ! -t 0 ] check in blank_confirm() in scripts/install/config.sh to skip the confirmation loop when stdin is not a terminal

Notes

When docker compose up runs config.sh, stdin is not connected to a TTY. The blank_confirm function was looping on while [ -z "${confirm_placeholder}" ] waiting for user input that could never arrive, causing the container startup to hang indefinitely.

The fix checks [ ! -t 0 ] (stdin is not a terminal) at the top of blank_confirm and returns immediately in that case. Interactive runs (normal terminal usage) are completely unaffected since the condition is false when a TTY is present.

This was the solution proposed in the issue itself — tested the logic and confirmed the shell syntax is valid.

Related issues/PRs

Description

  • Added a TTY check so blank_confirm doesn't block when running non-interactively (docker compose, CI)

This PR fixes #3633

Notes for Reviewers
Four-line addition inside blank_confirm. The rest of the function and all callers are unchanged. The guard fires only when stdin is not a TTY, so it doesn't change any interactive behaviour.

Signed commits

  • Yes, I signed my commits.

When docker compose runs config.sh stdin is not connected to a terminal,
so the blank_confirm loop blocks forever waiting for user input. Added
a [ ! -t 0 ] guard that returns immediately in non-interactive contexts
while keeping the existing confirmation behaviour for interactive runs.

Fixes chaoss#3633

Signed-off-by: devs6186 <devyanshsomvanshi@gmail.com>
@devs6186 devs6186 requested a review from sgoggins as a code owner February 19, 2026 16:37
GitHub API response times for issue/PR collection vary enough
that 3 minutes is intermittently too short. The failing run
showed collect_issues dispatched at ~46s but not completing
before the 3-minute cut-off, while the same test passed on
main earlier in the day when the API was faster.

Fixes the flaky 'Start services & wait for output' step for
both Docker and Podman E2E jobs.

Signed-off-by: devs6186 <devyanshsomvanshi@gmail.com>
docker compose -f docker-compose.yml up --no-build 2>&1 \
| (./scripts/ci/await_all.py /tmp/regex_matches.txt \
&& docker compose -f docker-compose.yml down)
timeout-minutes: 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the timeout was not mentioned in your PR description. Was there a reason for this change?

@MoralCode
Copy link
Contributor

Per OP's slack messages, it sounds like they were mainly interested in contributing for GSoC and were planning to move on to other projects after being informed Augur isn't participating this year.

@Ulincsys do you think theres still value in having someone else take over this PR to get it merged?

@MoralCode MoralCode added the stale Stuff that's abandoned or not making forward progress and may need taking over/reassignment/closing label Feb 19, 2026
@MoralCode
Copy link
Contributor

If this change merges, i think it would be more of a bandaid than a solution. The block and wait for input is a mechanism to gaurantee there is some input and should not happen if the environment variables contain all the correct values.

I think this is part of the solution (i.e. removing interactive code bits when the environment is often non interactive), but i would like to see a more foundational change first (i.e. have at least the gitlab keys fall back to a sensible default value or not be required at all, or maybe allow augur to start up with no keys configured and print a warning to the console or admin page to that effect or something like that - whatever is gong to be most user-friendly and easiest to debug)

@MoralCode MoralCode marked this pull request as draft February 24, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Stuff that's abandoned or not making forward progress and may need taking over/reassignment/closing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker compose: make GitHub/GitLab user and key effectively optional

3 participants