Skip to content

fix: don't print confirmation prompt when skip-confirm is set#260

Open
patsevanton wants to merge 1 commit intosegmentio:masterfrom
patsevanton:skip-confirm
Open

fix: don't print confirmation prompt when skip-confirm is set#260
patsevanton wants to merge 1 commit intosegmentio:masterfrom
patsevanton:skip-confirm

Conversation

@patsevanton
Copy link
Copy Markdown

Summary

  • Fixes Job topicctl-provisioning hangs after completion #259: Move fmt.Printf() after the skip check in util.Confirm() so that the prompt text is not printed to stdout when --skip-confirm flag is used.
  • This prevents Kubernetes Jobs from appearing to hang after apply completes, because the "OK to continue? (yes/no)" text is no longer written to stdout in non-interactive environments.

Changes

  • pkg/util/confirm.go: Moved the fmt.Printf("%s (yes/no) ", prompt) call to execute only when skip is false, after the early return for the skip case.

Move fmt.Printf() after the skip check in util.Confirm() so that
the prompt text is not printed to stdout when --skip-confirm flag
is used. This fixes the issue where Kubernetes Jobs would hang
because the prompt output made it appear the process was waiting
for input.

Fixes segmentio#259
@patsevanton patsevanton requested a review from a team as a code owner May 7, 2026 10:16
@patsevanton
Copy link
Copy Markdown
Author

patsevanton commented May 7, 2026

work:

topicctl-provisioning time="2026-05-07 10:54:38" level=info msg="Checking replication..."
topicctl-provisioning time="2026-05-07 10:54:38" level=info msg="Checking partition count..."
topicctl-provisioning time="2026-05-07 10:54:38" level=info msg="Checking partition placement..."
topicctl-provisioning time="2026-05-07 10:54:38" level=info msg="Partition placement already satisfies strategy 'any'"
topicctl-provisioning time="2026-05-07 10:54:38" level=info msg="Checking leaders..."
topicctl-provisioning time="2026-05-07 10:54:38" level=info msg="Apply completed successfully!"
- sentry-kafka-provisioning-pw98n › topicctl-provisioning

@patsevanton
Copy link
Copy Markdown
Author

@dateutli @changgesi @pazhang-25 Please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Job topicctl-provisioning hangs after completion

1 participant