fix(catalog): URL-encode entity_name slashes in entity tag paths - #1575
Open
jaideeppyne wants to merge 1 commit into
Open
jaideeppyne wants to merge 1 commit into
jaideeppyne wants to merge 1 commit into
Conversation
Unity Catalog entity names (e.g. column `Inferences/Second`) are a single path segment on the Entity Tag Assignments API. Interpolating a raw `/` splits the path and yields NotFound. Encode with quote(..., safe="") so `/` becomes `%2F`. Fixes databricks#1493 Signed-off-by: Jaideep Pyne <jaideeppyne1997@gmail.com> NO_CHANGELOG=true
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
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.
Problem
Unity Catalog allows entity names that contain
/(e.g. a column named`Inferences/Second`). The Entity Tag Assignments API treatsentity_nameas a single path segment, so/must be percent-encoded as%2F.EntityTagAssignmentsAPIcurrently interpolatesentity_name(andtag_key) into the path without encoding. A raw/splits the path, matches no route, and fails withNotFound: No API found ....Solution
_escape_path_parameter()that usesurllib.parse.quote(param, safe="")so/becomes%2F(unlike_escape_multi_segment_path_parameter, which intentionally preserves/for Files API paths).entity_nameandtag_keyinEntityTagAssignmentsAPI(list/get/delete/update).Testing
_escape_path_parameter(/→%2F, FQN with slash, other reserved chars).EntityTagAssignmentsAPI.list/get/deletecall_api.dowith%2Fin the path.Fixes #1493
NO_CHANGELOG=true