experimental/air: open MLflow URLs via libs/browser instead of pkg/browser - #6752
Merged
Merged
Conversation
… env var support Replace direct usage of github.com/pkg/browser with github.com/databricks/cli/libs/browser to properly respect the BROWSER environment variable. This allows BROWSER=none and custom browser commands to work correctly. - Convert openURL from a standalone function to a method on listModel to access the context - Use browser.Open(ctx, url) with the proper context from the fetcher - Extract context before creating the closure to avoid use-after-free (closure captures value, not receiver) - Check for nil fetcher at call site, consistent with other interactive key handlers - Preserve best-effort behavior by ignoring errors Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Integration test reportCommit: 5bda4e5
Top 3 slowest tests (at least 2 minutes):
|
caroline-db
reviewed
Sep 18, 2026
| ctx := m.fetcher.ctx | ||
| return func() tea.Msg { | ||
| _ = browser.OpenURL(url) | ||
| _ = browser.Open(ctx, url) |
Contributor
There was a problem hiding this comment.
A data race occurs and is printed by pressing Enter twice quickly. Bubble Tea runs both browser commands concurrently, while openDefault mutates global browserpkg.Stderr. Please guard the save/set/open/restore sequence
Contributor
Author
There was a problem hiding this comment.
That is a preexisting issue.
Contributor
There was a problem hiding this comment.
The change here exposes this potential race, but it is difficult to trigger or reproduce with a normal opener. will leave as non-blocking.
caroline-db
approved these changes
Sep 21, 2026
Collaborator
Integration test reportCommit: 9237f8a
9 interesting tests: 6 flaky, 3 FAIL
Top 50 slowest tests (at least 2 minutes):
|
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
air list's TUI opened the selected run's MLflow URL withgithub.com/pkg/browserdirectly. Switch it tolibs/browser.Open(ctx, url), threading the fetcher's context through to the call site.Why
pkg/browserignores theBROWSERenv var, soBROWSER=noneand custom browser commands break.libs/browseris the repo's required wrapper for opening URLs.Tests
go build,go vet,go test ./experimental/air/cmd -run TestListModel(11/11), and the air acceptance suite pass.This pull request and its description were written by Isaac.