[v14] Propagate resource revision to/from the backend#33214
Merged
rosstimothy merged 1 commit intobranch/v14from Oct 17, 2023
Merged
[v14] Propagate resource revision to/from the backend#33214rosstimothy merged 1 commit intobranch/v14from
rosstimothy merged 1 commit intobranch/v14from
Conversation
634301f to
8911f83
Compare
fspmarshall
approved these changes
Oct 11, 2023
Contributor
Author
|
Friendly ping @justinas |
Contributor
Author
|
PTAL @justinas |
mdwn
approved these changes
Oct 17, 2023
* Set revision on resources retrieved from the backend Adds a new `MarshalOption` that ensures the resource revision is set when unmarshalling a backend item. The new `WithRevision` option was also applied everywhere that the legacy `WithResourceID` was being used. * Prevent storing resource revision in the backend item value The revision follows the same semantics as the resource id for marshalling. This prevents both items from showing up in the value of the backend item, which can prevent compare and swap operations from completing succesfully. Each backend is responsible for persisting the revision in some manner. The existing PreserveResourceID was reused to prevent having to make multiple copies of a resource when clearing the id and revision. The marshal option will be updated in a follow up when the resource id is removed. * Prevent backend items with empty revisions All resource revisions are now being set on a backend.Item before persisting the item to the backend. * Ignore revision in resource comparisons
8911f83 to
903d831
Compare
Merged
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.
Backport #32040 and part of #32871 to branch/v14
While this is not functionally required since the backends in v14 don't know about revisions it should reduce conflicts and unify revision handling during resource marshaling.