[core] Fix publisher_id type mismatch in GCS pubsub#61518
Open
kaori-seasons wants to merge 1 commit intoray-project:masterfrom
Open
[core] Fix publisher_id type mismatch in GCS pubsub#61518kaori-seasons wants to merge 1 commit intoray-project:masterfrom
kaori-seasons wants to merge 1 commit intoray-project:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request effectively resolves a type mismatch issue where a bytes object (self._publisher_id) was incorrectly compared with a string literal. This fix prevents spurious debug logs and ensures correct comparison logic. Additionally, minor improvements to log message formatting and grammar have been applied, enhancing code clarity and maintainability.
eec0a55 to
9e9f99f
Compare
- Fix comparison of bytes vs str: self._publisher_id is initialized as b"" (bytes) but was compared against "" (str). In Python 3, b"" != "" is always True, causing spurious debug logs on first connection. - Add missing space between f-string fragments in debug log. - Fix grammar: "only happens" -> "only happen". Signed-off-by: kaori-seasons <yuluoxinsheng@gmail.com> Signed-off-by: hageshiame <2664504212@qq.om>
9e9f99f to
56d6f15
Compare
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.
Description
Related issues
Additional information