Respect BROWSER environment variable in "auth login" command#3659
Merged
Respect BROWSER environment variable in "auth login" command#3659
BROWSER environment variable in "auth login" command#3659Conversation
denik
reviewed
Sep 25, 2025
Collaborator
9 failing tests:
|
- Add error handling to browser.py test helper - Add comprehensive documentation to getBrowserFunc() - Remove unused mutex and LockUnlock method from FakeOidc
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 6, 2025
## Changes Move process replacement functionality from libs/exec to libs/execv to separate concerns. The exec package now focuses on command execution, while execv handles process replacement via syscalls. Shell preparation code is extracted to prepare.go. ShellExecv is moved to the execv package and renamed to Shell for clarity. The next step is to also rename `exec` to something that implies executing scripts through a shell. ## Why I looked into the package while working on #3659 and found this could be improved.
Contributor
Author
|
@denik Can you take another look? |
Contributor
Author
|
@ilia-db Can you take a look? |
ilia-db
approved these changes
Oct 6, 2025
denik
reviewed
Oct 7, 2025
| sys.stderr.write(f"Failed to fetch URL: {url} ({e})\n") | ||
| sys.exit(1) | ||
|
|
||
| sys.exit(0) |
| jq -r 'select(.path? == "/telemetry-ext") | (.body.protoLogs // [])[] | fromjson | ( (.entry // .) | (.databricks_cli_log.bundle_deploy_event.experimental.bool_values // []) ) | map("\(.key) \(.value)") | .[]' out.requests.txt | sort | ||
| } | ||
|
|
||
| sethome() { |
Contributor
There was a problem hiding this comment.
why add it here if it's only used in one test?
Contributor
Author
There was a problem hiding this comment.
I spent a few iterations figuring out why something was failing on Windows only to find out that the wrong $HOME-equivalent environment variable was set. With a helper it is more likely that the right thing is copy/pasted into other acceptance tests.
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.
Changes
Respect the
BROWSERenvironment variable for the OAuth login flow. When set, the value is used as executable to launch the URL to authenticate the user. When set to "none", the CLI prints a message with the URL to open. When not set, it defers to the existing logic to open a browser via thepkg/browserpackage.Why
Context in:
Also refer to issues linked in the description of these issues for broader context, and why
pkg/browserdoesn't respectBROWSERitself. It boils down to it not being a ratified standard.We choose to respect it to make the interactive login flow from VS Code running in a dev container work.
Tests
New acceptance test that goes through the login flow via the test server.