Fix labs panic on empty release list and make update check best-effort#5503
Merged
Conversation
Co-authored-by: Isaac
Collaborator
|
Commit: b404cb6
22 interesting tests: 15 SKIP, 7 KNOWN
Top 29 slowest tests (at least 2 minutes):
|
Drop the per-test explanation that duplicated the proxy.go why-comment and compress the remaining multi-line comments to one line each. No behavior changes. Co-authored-by: Isaac
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. Two related problems in the
databricks labsupdate check that runs before every command of an installed project:databricks labs <project> ...invocation until the quota resets.Changes
Before, an empty release list crashed the CLI and any update-check failure aborted the command; now the upgrade hint is skipped and the command runs normally in both cases.
cmd/labs/project/project.go:checkUpdatesreturns early when the loaded release list is empty instead of indexing into it.cmd/labs/project/proxy.go: a failing update check is logged at debug level and the command proceeds, instead of returning the error.Test plan
TestCheckUpdatesWithEmptyReleaseList: panics with "index out of range [0] with length 0" before the fix, passes after.TestRunningCommandWhenUpdateCheckFails: runslabs blueprint echowith the GitHub API returning HTTP 500; fails with "github request failed: 500 Internal Server Error" before the fix, passes after.go test ./cmd/labs/...passes../task fmt-q,./task lint-q, and./task checkspass.This pull request and its description were written by Isaac.