Skip to content

Fix auto-triage user_confirm accepting unrecognized keys as default answer#63579

Open
choo121600 wants to merge 1 commit intoapache:mainfrom
choo121600:fix-user-unrecognized-keys
Open

Fix auto-triage user_confirm accepting unrecognized keys as default answer#63579
choo121600 wants to merge 1 commit intoapache:mainfrom
choo121600:fix-user-unrecognized-keys

Conversation

@choo121600
Copy link
Member

@choo121600 choo121600 commented Mar 14, 2026

During breeze pr auto-triage, when approving workflow runs, user_confirm silently treats unrecognized keys as the default answer.

Since the approval prompt defaults to YES (when no sensitive changes are detected), pressing a wrong key unintentionally approves workflow runs.

Change user_confirm to re-prompt on unrecognized input instead of falling through to the default.

Before

image

After

Screenshot 2026-03-14 at 3 26 05 PM
Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    claude opus 4.6

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Copy link
Contributor

@bugraoz93 bugraoz93 left a comment

Choose a reason for hiding this comment

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

Looks good, small nit

if quit_allowed:
return Answer.QUIT
sys.exit(1)
while True:
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't we do it without while True? Maybe a flag approach

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

Labels

area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants