Repository navigation
[agentbricks] Say why endpoint invoke <app> can't find the app - #834
Open
elainewang-db wants to merge 1 commit into
Open
elainewang-db wants to merge 1 commit into
elainewang-db wants to merge 1 commit into
Conversation
`endpoint invoke <app>` looked the app up with `get_app_url`, which returns None for any failed `apps get` and drops its stderr, so every failure read "Could not resolve a URL for Databricks App '...'": a signed-out profile, a network error, and an app deployed to another workspace all looked the same. Resolve the URL through a new `AppsClient.app_url`, built on `find`: a missing app names the profile it was looked up with and points at `-p`, any other failure keeps the CLI's message and the sign-in hint `find` already gives, and an app without a URL says so. Deploy keeps using `get_app_url`. Co-authored-by: Isaac <no-reply@databricks.com>
This branch has not been deployed
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.
What
agentbricks endpoint invoke <app>now says why it can't reach an app instead of always printing "Could not resolve a URL for Databricks App '...'":No Databricks App named 'agent-bricks-x' in the workspace for profile 'ml'., with a hint to pass the right workspace's profile with-pand to list deployments.apps getfailure (signed-out profile, network, bad host): the CLI's own message plus the sign-in hint, viaAppsClient.find's existing error.agentbricks deployments get.Why
get_app_urlreturns None for any failedapps getand drops its stderr. While manually testing 0.8.0, invoking an app from a shell where Agent Bricks fell back to another workspace's profile gave only "Could not resolve a URL", with nothing about which workspace it searched or why it failed.Changes
AppsClient.app_url(name), built onfind.EndpointService._resolve_endpointuses it.get_app_urlis unchanged; deploy still uses it.Testing
apps_client_test.pycases: the URL, a missing app with and without a profile, anotherapps getfailure keeping its stderr, and an empty or missing URL. The endpoint service, loadtest and CLI tests now mockapp_url.ruff check,ruff format --checkandty checkare clean.agentbricks -p ml endpoint invoke agent-bricks-lg-ewrel0802108 ...against a deleted app prints the new not-found error and hint.Related: #694 makes the profile choice itself consistent; this PR makes a failed lookup say what happened either way.
This pull request and its description were written by Isaac.