-
Notifications
You must be signed in to change notification settings - Fork 108
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
Correct Shovel struct field types #172
Conversation
@pathcl thank you. How can I reproduce the issue this strives to address? |
A really basic Shovel in 3.8 uses "singular" values for source and destination URIs: [
{
"node": "rabbit@warp10",
// ...
"name": "amqp://",
"vhost": "/",
"type": "dynamic",
"state": "running",
"src_uri": "amqp://",
"src_protocol": "amqp091",
"dest_protocol": "amqp091",
"dest_uri": "amqp://",
"src_queue": "src-queue",
"dest_queue": "dest-queue"
}
] |
I now realize the difference: the above is from the Shovel management HTTP API endpoint and #171 uses the runtime parameters endpoint, which indeed can use slightly different values. In addition, there can be multiple URIs (that are tried until one of the succeeds). |
@michaelklishin I also noticed if we use passwords like '#123' rabbit will complain with 400 error since we're not urlencoding |
Percent-encoding of various parts of URIs is a separate issue. Some would argue that libraries should not do that at all. |
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.
With this PR, tests cannot compile because they provide a single URI (which is still perfectly valid) and not an array.
We have to support both types for these fields. I'm looking into it.
This is a 3.8-specific API endpoint feature but we still support deserialization of 3.7 responses. Closes #172.
DestinationURI/SourceURI it's an slice at least in rabbitmq 3.8.9
issue related: #103