Fix/3592 bypass non interactive flag prompts#3775
Open
kperkins96 wants to merge 2 commits intodlt-hub:develfrom
Open
Fix/3592 bypass non interactive flag prompts#3775kperkins96 wants to merge 2 commits intodlt-hub:develfrom
kperkins96 wants to merge 2 commits intodlt-hub:develfrom
Conversation
54d8a48 to
3b59e87
Compare
anuunchin
requested changes
Apr 8, 2026
Contributor
anuunchin
left a comment
There was a problem hiding this comment.
Thanks for the PR!
Changing --non-interactive from "use defaults" to "always accept" is a breaking change. Anyone currently using --non-interactive in CI scripts may be relying on destructive commands being safely skipped - which makes sense imo
How about adding a separate --yes / -y flag that sets ALWAYS_CHOOSE_VALUE = True, while leaving --non-interactive unchanged? That would address the reported issue and just be an additive change
Author
|
Added a new Changes:
Behavior:
|
Author
|
@anuunchin do you mind taking another look when you get a chance? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the
--non-interactiveflag to consistently accept all confirmations instead of using default values. Previously, when--non-interactivewas used, CLI commands would still abort if a confirmation's default wasFalse, making the flag unreliable for automation and CI/CD workflows.Changes:
NonInteractiveActionin dlt/_workspace/cli/_dlt.py to setALWAYS_CHOOSE_VALUE = Trueinstead ofALWAYS_CHOOSE_DEFAULT = Truedrop,sync, anddrop-pending-packagescommandsBehavior:
--non-interactivewould use the default answer for each prompt (could beTrueorFalse)--non-interactivealways accepts confirmations (True), allowing commands to proceed without user interactionThis makes the flag reliable for CI/CD pipelines and automated scripts where prompts cannot be answered interactively.
Related Issues
Additional Context
Testing:
echo.always_choose(False, True)context manager to simulate--non-interactivebehaviormake format && make lint- all checks passmake test-workspace- all tests passImplementation notes:
ALWAYS_CHOOSE_VALUEin echo.pyTrue,confirm()andprompt()returnTrueinstead of prompting the user--non-interactiveflag only affects behavior when explicitly used - no changes to default CLI behavior