Repository navigation
fix(scopes): namespace data update entry topics with scope ID - #954
Closed
Tyagiquamar wants to merge 2 commits into
Closed
Tyagiquamar wants to merge 2 commits into
Tyagiquamar wants to merge 2 commits into
Conversation
Signed-off-by: Tyagiquamar <mohdquamartyagi@gmail.com>
✅ Deploy Preview for opal-docs canceled.
|
Author
|
Hi, friendly ping for review on this PR when you have a moment. Happy to address any feedback. Thanks! |
Author
|
Hi, just following up on this when you get a chance. The branch is up to date and checks are green. If it looks good from your side, it should be ready to merge. Happy to make any changes if needed. Thanks! |
…spacing Signed-off-by: Mohd Quamar Tyagi <104281681+Tyagiquamar@users.noreply.github.com>
Member
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.
Summary
Ensures data update entry topics published via \POST /scopes/{scope_id}/data/update\ are properly scope-namespaced ({scope_id}:data:{topic}) to match OPAL client subscription topic expectations.
Problem
When a data update was posted to \POST /scopes/{scope_id}/data/update, \publish_data_update_event\ in \opal_server/scopes/api.py\ rewrote each entry's topics to \data:{topic}.
Although \ScopedServerSideTopicPublisher\ published to the channel {scope_id}:data:{topic}, the \DataUpdate\ payload received by the client contained \�ntry.topics = ['data:{topic}']. Since scoped OPAL clients subscribe to {scope_id}:data:{topic}, the client's topic check (\set(entry.topics).isdisjoint(self._data_topics)) evaluated to \True, causing every scoped data entry to be skipped as non-matching.
Solution
Closes #920