Code review comment for ~hyask/autopkgtest-cloud:skia/fix_push_amqp

Revision history for this message
Skia (hyask) wrote :

I've found a way to print the strings with escaped endline **and** without converting to bytes: `repr()`. We could indeed use that in `pull-amqp` to avoid printing bytes, but then I couldn't solve the problem of interpreting the `\n` as a real single character endline. We could in the end hack that with a `.replace("\\n", "\n")` (or `.replace(r"\n", "\n")`, it's the same), but I find it even more hacky since we don't really cover everything, and I think passing the information with bytes is more robust.

As we discussed, we need to build a plan to change the message format to be easier to work with.

Also discussed, I've added a log and a skip condition if the heuristic for bytes fails, meaning the message is probably malformed.

« Back to merge proposal