Bug 1404048 - rpm-test-trigger ignores all messages because b'QE' != 'QE'
Summary: rpm-test-trigger ignores all messages because b'QE' != 'QE'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: rpm-test-trigger
Classification: Community
Component: general
Version: unreleased
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-12 23:44 UTC by Dan Callaghan
Modified: 2016-12-14 04:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-14 04:35:36 UTC


Attachments (Terms of Use)

Description Dan Callaghan 2016-12-12 23:44:01 UTC
Dec 13 05:39:10 burette.usersys.redhat.com rpm-test-trigger[16426]: 2016-12-13 05:39:09,961 rpmtesttrigger.trigger INFO Ignoring state change to: b'QE' for advisory: 24008. Only listening for QE, NEW_FILES.

Seems like Proton is giving us back the message with strings as raw bytes instead of decoded to unicode, so the comparison always fails.

Unsure why this doesn't reproduce in our tests -- it must be some difference between the messages we are sending in our tests vs. what appears on the real message bus.

Note that the above log message came from my instance of rpm-test-trigger which is hooked up to a local broker receiving messages from the "legacy bridge" service. The legacy bridge is forwarding the messages it receives as is, but need to check at which point the bytes -> unicode decoding should or should not be happening...

Comment 1 Dan Callaghan 2016-12-13 03:01:21 UTC
So the AMQP 1.0 protocol has both binary and string data types, the former is returned as bytes() in Proton, the latter is decoded as UTF-8 and returned as unicode() in Proton.

String (in AMQP land) is clearly the right type here for these messages. That is what we are producing in the test suite. So I think this should be fixed on the legacy bridge side, to ensure that it only deals in unicode values in its messages (so that they become AMQP strings not binary, matching what we are testing in the test suite).

Comment 2 Dan Callaghan 2016-12-14 04:35:36 UTC
So this issue was just with the (at the time, unmerged) legacy bridge code:

https://gerrit.beaker-project.org/5529

I fixed it in patch set 4 of that review.


Note You need to log in before you can comment on or make changes to this bug.