Repository navigation
serving-endpoints: accept the endpoint name in permissions commands - #7662
Open
anshul0713 wants to merge 6 commits into
Open
anshul0713 wants to merge 6 commits into
anshul0713 wants to merge 6 commits into
Conversation
The permissions API only accepts a serving endpoint's ID, but every other serving-endpoints command takes the name, and the ID only shows up in `get` output. Passing the name failed with "is not a valid Inference Endpoint ID". Resolve a value that isn't shaped like an ID to the endpoint's ID with a get; IDs and names that don't resolve are passed through unchanged, so the API's own error is still what the user sees. The fake server now rejects non-ID values for serving endpoint permissions the way the real API does. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Anshul Gupta <anshul.gupta@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Anshul Gupta <anshul.gupta@databricks.com>
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=1 unreleased=0 coverage=0 failing=0
TestAccept/cmd/workspace/serving-endpoints/permissions-by-name: branch ✅ | main (479098f) ❌ | latest (v1.26.0) ❌main (479098f): latest (v1.26.0): same output as main (479098f) |
Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Anshul Gupta <anshul.gupta@databricks.com>
The fake server now rejects non-ID values for serving endpoint permissions, like the real API. The direct engine already uses the endpoint ID (endpoint_id); only this test fixture used the name. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Anshul Gupta <anshul.gupta@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Anshul Gupta <anshul.gupta@databricks.com>
Collaborator
✅ Integration test reportCommit: 53b30a0
Top 3 slowest tests (at least 2 minutes):
|
Sankalp-Mittal
left a comment
Contributor
There was a problem hiding this comment.
🤖 AI review (Claude Fable 5.2 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.
Address review feedback on permissions-by-name: - A failed name lookup now returns that error instead of passing the value through to the API's "not a valid Inference Endpoint ID" error. The API only accepts root or 32 hex characters, so such values always failed; only the message changes. Endpoints without an ID get a clear error too. - The fake server accepts "root", and its comment explains why dashed UUIDs pass. - The acceptance test passes a literal 32-character ID and root and shows no lookup request for them. - Usage and help say NAME_OR_ID. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Anshul Gupta <anshul.gupta@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.
Changes
databricks serving-endpoints get-permissions,set-permissionsandupdate-permissionsnow also accept the endpoint name. When the argument isn't shaped like an endpoint ID (32 lowercase hex characters), the CLI looks the endpoint up withserving-endpoints getand uses its ID.get-permission-levelsalready worked with a name, so it isn't changed.Why
Every other
serving-endpointscommand takes the endpoint name, and the ID only appears ingetoutput. Passing the name to a permissions command failed with'my-endpoint' is not a valid Inference Endpoint ID.In agent trials of a governance journey, agents had to discover this and then fetch the ID first.Backward compatibility
rootor 32 hex characters, the only values the API accepts) is passed through unchanged, with no extra request.Endpoint with name '...' does not exist.) instead of the API'sis not a valid Inference Endpoint ID. An endpoint with no ID, such as a pay-per-token endpoint, gets its own error.NAME_OR_IDinstead ofSERVING_ENDPOINT_ID.Tests
acceptance/cmd/workspace/serving-endpoints/permissions-by-namecovering set and get by name, get by ID, and an unknown name.is not a valid Inference Endpoint IDerror when serving endpoint permissions are requested with a value that isn't an ID. It acceptsroot, and dashed UUIDs because that's how it mints endpoint IDs.root, and the recorded requests show no lookup for them.bundle/direct/dresourcespermissions fixture used the endpoint name as the permissions object ID, which the real API rejects and the fake now rejects too. It now uses the endpoint ID, matching what the direct engine does (endpoint_id)../task lintpasses.This pull request and its description were written by Isaac.