-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Service Bus] Bug Fix: Correlation Rule Filter with the "label" doesn't filter the messages #13069
Merged
15 commits merged into
Azure:master
from
HarshaNalluru:harshan/sb/issue/rule-filter-mismatch
Jan 7, 2021
Merged
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
a44a36a
getConnectionString helper method
HarshaNalluru 84494ea
new helper method to sanitize the serializable object
HarshaNalluru 08b872e
New test suite - Potentially, can be expanded to test all kinds of rules
HarshaNalluru 526a83c
todo comment
HarshaNalluru a4635b7
export sanitizeSerializableObject to use it in the tests
HarshaNalluru 9f46679
sanitizeSerializableObject tests
HarshaNalluru 43e9adf
fix exisiting tests for createRule
HarshaNalluru 3204422
updateRule test fix
HarshaNalluru 1ba7660
changelog
HarshaNalluru aae2759
doc comments
HarshaNalluru 3f88c75
Helper method
HarshaNalluru 1a58699
remove try catch
HarshaNalluru 40ae9ad
Add a negative case too
HarshaNalluru 98c3d07
isJSONLikeObject
HarshaNalluru 4212559
remove .only
HarshaNalluru 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 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 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.
I haven't seen a check like this used before, what's the reason for this?
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.
This is to differentiate among the "object"s. This would filter the JSON objects and won't match any array or other kinds of objects.
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.
SOF References:
https://stackoverflow.com/a/11183002/4137356
https://stackoverflow.com/a/36675341/4137356
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.
That's probably worth putting in as a comment (or even just factoring this out into a small function with a comment).
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.
btw, does
{}.constructor
construct a new empty object every time it's called? Or is JS smart enough to treat that empty literal as a constant of some sort?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.
I think it constructs a new empty object. But nobody references this object, so should be fine? (because the garbage collection takes care of it)
Or do you think there is a better way to do this?
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.
I was thinking you only need to create one, statically, unless there's some benefit to recreating it each time.
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.
Added a const
EMPTY_JSON_OBJECT_CONSTRUCTOR
, let me know if that's good/