-
Notifications
You must be signed in to change notification settings - Fork 266
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
Fix Avoid triggering notifications if only the metadata changes (continuation in prelanding branch) #4310
Fix Avoid triggering notifications if only the metadata changes (continuation in prelanding branch) #4310
Conversation
…nto avoid-triggering-notifications-if-only-the-metadata-changes
…s-if-only-the-metadata-changes
…ns-if-only-the-metadata-changes Fix Avoid triggering notifications if only the metadata changes
op = true; | ||
} | ||
// By definition, notificationVector cannot be empty in blacklist case | ||
// (checked at parsing 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.
A .test will be added to cover this case, in a separate PR.
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.
PR #4317
NTC (in this PR)
@@ -0,0 +1,229 @@ | |||
# Copyright 2023 Telefonica Investigacion y Desarrollo, S.A.U |
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.
Add also a .test for the basic notifyOnMetadataChange CRUD. For instance:
- Create entity without notifyOnMetadataChange (defaults to true)
- Modify entity with notifyOnMetadataChange: false
- Modify entity with notifyOnMetadataChange: true
- Modify entity with notifyOnMetadataChange: false
- Modify entity witout notifyOnMetadataChange (defaults to true)
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.
s/entity/subscription/ above :)
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.
Fixed in aee4daa
9373975
to
2fd6f7b
Compare
2fd6f7b
to
aee4daa
Compare
…-metadata-changes-prelanding
...t/cases/1048_subscription_cache/refresh_cache_wins_notif_fail_with_update_in_the_middle.test
Outdated
Show resolved
Hide resolved
...f_metadata_changes_but_not_the_attribute_value_itself/notifyOnMetadataChange_basic_crud.test
Outdated
Show resolved
Hide resolved
...f_metadata_changes_but_not_the_attribute_value_itself/notifyOnMetadataChange_basic_crud.test
Outdated
Show resolved
Hide resolved
...f_metadata_changes_but_not_the_attribute_value_itself/notifyOnMetadataChange_basic_crud.test
Outdated
Show resolved
Hide resolved
@chetan-NEC I'd suggest to have a look to the changes 12edfad...f749ec9 in this PR. This is the way of solving the implementation in the line I commented here. The key change is to make Note that with this changes no modification has to be done in the ngsiNotify module. The decission to trigger subscription or not is done before in the CB logic, upon entity update processing. As side effect of this, unit tests doesn't need any change so they are passing again. I think it would be a good idea if you could review this changes in deep. It would increase you knowledge on Context Broker code so you new PRs will be easier for you :) |
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.
LGTM
Issues #3727
This PR incorporates the work in PR #4300. I will continue the work from that point
CC: @chetan-NEC