Skip to content

Add flush=True to ConsoleRedirectHandler print statements #544

@mcgr0g

Description

@mcgr0g

Describe the feature

When using the ConsoleRedirectHandler for OAuth flows, the printed authentication URL sometimes doesn't appear immediately in VS Code terminal outputs (particularly when called through extensions like dbt Power User). This occurs because:

  1. The current implementation doesn't force flush the output buffer (auth.py#L286)
  2. Some IDE/plugin terminal implementations buffer stdout differently than standalone terminals

Request to modify the print statement to:

print(f"Open the following URL in browser for the external authentication: {url}", flush=True)

Describe alternatives you've considered

Waiting for fixes in downstream tools (vscode-dbt-power-user#1629)

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions