Surface psql list errors instead of reporting an empty workspace#5515
Open
simonfaltum wants to merge 1 commit into
Open
Surface psql list errors instead of reporting an empty workspace#5515simonfaltum wants to merge 1 commit into
simonfaltum wants to merge 1 commit into
Conversation
Co-authored-by: Isaac
Collaborator
|
Commit: 5d7dce3
22 interesting tests: 15 SKIP, 7 KNOWN
Top 28 slowest tests (at least 2 minutes):
|
pietern
approved these changes
Jun 10, 2026
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.
Why
Found during a full-repo review of the CLI.
databricks psqllists both provisioned database instances and autoscaling projects to populate its interactive selector, but it discarded the errors from both list calls. When both calls fail (for example, an auth failure), the user gets "no Lakebase databases found in workspace" instead of the real error, which sends them debugging the wrong problem.Changes
Before, list-API failures were silently ignored and surfaced as an empty-workspace message; now, when both list calls fail, the underlying errors are returned to the user.
listAllDatabasesreturns an error joined from both call errors when both fail. A single failing call is still tolerated, since a workspace may have only one of the two products enabled. The interactive selection path wraps and returns the error, and shell completion reportsShellCompDirectiveErrorinstead of silently completing nothing.Test plan
listAllDatabasescovering both calls failing (error returned,errors.Ismatches both), each single call failing (tolerated), and both succeedinggo test ./cmd/psql/passesgo test ./acceptance -run 'TestAccept/cmd/psql'passes./task fmt-q,./task lint-q, and./task checkspassThis pull request and its description were written by Isaac.