-
Notifications
You must be signed in to change notification settings - Fork 121
[rfc2737] Fix issue: expect redis pubsub data to be str type instead of bytes type #196
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
Conversation
@qiluo-msft can you please take a look? |
@@ -675,7 +675,7 @@ def _update_per_namespace_data(self, pubsub): | |||
|
|||
db_entry = msg["channel"].split(":")[-1] | |||
data = msg['data'] # event data | |||
if not isinstance(data, bytes): | |||
if not isinstance(data, str): |
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.
str [](start = 36, length = 3)
This seems a valid fix. Wondering how it worked before? I think it hit a type runtime error below "set" in data
?
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.
it was b"set" before.
@qiluo-msft can we merge and set label to 202012 |
183162f Fix issue: expect redis pubsub data to be str type instead of bytes type (#196) #### Why I did it Update submodule pointer for snmpagent to include PR sonic-net/sonic-snmpagent#196 #### How I did it Update submodule pointer for snmpagent #### How to verify it Run build
183162f Fix issue: expect redis pubsub data to be str type instead of bytes type (sonic-net#196) #### Why I did it Update submodule pointer for snmpagent to include PR sonic-net/sonic-snmpagent#196 #### How I did it Update submodule pointer for snmpagent #### How to verify it Run build
- What I did
Change redis pubsub expect data type from bytes to str. There was a snmpagent framework change which transfer redis pubsub data from bytes to str, after that change, there is no need for non-framework code to do this transfer. So now we need handle str data directly.
- How I did it
Change data expectation from bytes to str
- How to verify it
Run regression and manual test
- Description for the changelog