[Fix] Fix empty databricks_share creation failing with 'no fields to update'#5443
Open
slimbnsalah wants to merge 1 commit intodatabricks:mainfrom
Open
[Fix] Fix empty databricks_share creation failing with 'no fields to update'#5443slimbnsalah wants to merge 1 commit intodatabricks:mainfrom
databricks_share creation failing with 'no fields to update'#5443slimbnsalah wants to merge 1 commit intodatabricks:mainfrom
Conversation
databricks_share creation failing with 'no fields to update'databricks_share creation failing with 'no fields to update'
Skip the UpdateShare API call in the Create method when there are no objects, owner, or comment to update. The Create method was calling w.Shares.Update() unconditionally after w.Shares.Create(), causing the API to reject the request with 'no fields to update' when creating a share with no object blocks. This mirrors the guard already present in the Update method. Fixes databricks#5442
f901db5 to
7dd21e8
Compare
|
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 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
The Plugin Framework implementation of
databricks_sharecallsw.Shares.Update()unconditionally in theCreatemethod afterw.Shares.Create(). When the resource is created with noobjectblocks, theUpdateSharerequest has an emptyUpdatesslice, noOwner, and noComment, causing the API to reject it with:Fix
Wrapped the
Updatecall in theCreatemethod with a guard that skips it when there is nothing to update:This mirrors the guard already present in the
Updatemethod at line 386:When there's nothing to update, the share returned by
Createis used directly for state.Fixes #5442