Repository navigation
fix(set): set onelake shortcut with query target bug fix - #105
Merged
Merged
Conversation
may-hartov
requested review from
Ali Abu-Foul (aliabufoul),
aviatco,
Alon Yeshurun (ayeshurun),
ohadedry and
shirasassoon
December 28, 2025 08:16
Alon Yeshurun (ayeshurun)
approved these changes
Dec 28, 2025
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.
The set shortcut command fails when using -q target with the following error:
set: [InvalidInput] The new name matches the existing name. No changes will be made
Root Cause
When the name property is not the target of the set shortcut command, the "name" of the shortcut remains the same - and the operation will fail (in fab_fs_set_onelake), even though the supported queries defined in JMESPATH_UPDATE_SHORTCUT include target.
Updating the shortcut target is a valid and useful scenario, for example when redirecting a shortcut to a different lakehouse
Fix
When the command query is target, the CLI now calls the Create Shortcut API with ShortcutConflictPolicy=OverwriteOnly.
Since OneLake shortcuts do not expose a public Update API, updating a shortcut is performed by creating it again with the same name and path while using the OverwriteOnly conflict policy, which replaces the existing shortcut when the name and path are unchanged.
This behavior aligns with the documented REST API semantics. [OneLake Sh...soft Learn | External]
Validation
Added test coverage for the target update scenario.