-
Notifications
You must be signed in to change notification settings - Fork 94
Allow MERGE operations into empty array values #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
98e4511
Allow MERGE operations into empty array values
chuckdries 479bc11
Log alert when merging into an empty array
chuckdries 6eec8b4
Don't coerce empty arrays for merge when value is not an object, and …
chuckdries 8a881f4
Do not allow empty array coercion in setWithRetry
chuckdries 97ae1fb
Actually, allow empty array coercion in setWithRetry. Might as well b…
chuckdries 08939c9
Prettier diff
chuckdries dfaa39b
Cover setWithRetry and mergeCollection for empty array coercion behavior
chuckdries f00e111
Improve checkCompatibilityWithExistingValue comment
chuckdries dad8aa4
Revert unnecessary changes to mergeInternal
chuckdries 9ce1bc7
Better comments for future engineers
chuckdries File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: Is this enough data for someone to tell what went wrong and fix it? Having the key is nice, but I feel like having the value would almost be necessary. Though, I don't love the idea of logging the value since there is not a good way to know if it's sensitive or not. Is there any other data that we can include that would be helpful? I think probably the most useful thing would be the requestID (if one exists), but that sounds difficult to grab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't see a great way to get the requestID that delivered the update. We could maybe log in SaveResponseInOnyx for any SET
[]operation, but that would be potentially noisier than we want, and that wouldn't cover pusher updates. I also don't want to log the value for the reason you statedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The log statements that make it to the backend will have a user email and a datetime. It'll take a bit of legwork but it's probably not impossible to work backwards from that and the onyx key and figure out what the user was doing