-
Notifications
You must be signed in to change notification settings - Fork 4k
Additional JSON CLI formatter fix #14511
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
Merged
lukebakken
merged 1 commit into
rabbitmq:main
from
lukebakken:lukebakken/rabbitmq-server-14509
Sep 5, 2025
Merged
Additional JSON CLI formatter fix #14511
lukebakken
merged 1 commit into
rabbitmq:main
from
lukebakken:lukebakken/rabbitmq-server-14509
Sep 5, 2025
Conversation
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
A list of binaries was incorrectly converted by `unicode:characters_to_binary` into one big binary. Add a function head to match this case. Also, add tests for the values that were not correctly formatted prior to rabbitmq#14101 and rabbitmq#14381
the-mikedavis
approved these changes
Sep 5, 2025
Collaborator
the-mikedavis
left a comment
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.
I gave this a try locally and status looks good to me now
main:
{
// ...
"enabled_plugin_file": "/tmp/rabbitmq-test-instances/rabbit-1@mango2/enabled_plugins",
"active_plugins": "rabbitmq_auth_backend_httprabbitmq_shovel_managementrabbitmq_recent_history_exchangerabbitmq_peer_discovery_k8srabbitmq_event_exchangerabbitmq_shardingrabbitmq_auth_mechanism_sslrabbitmq_peer_discovery_awsrabbitmq_awsrabbitmq_toprabbitmq_stream_managementrabbitmq_streamrabbitmq_stream_commonrabbitmq_peer_discovery_consulrabbitmq_random_exchangerabbitmq_tracingrabbitmq_federation_prometheusrabbitmq_trust_storerabbitmq_peer_discovery_etcdrabbitmq_peer_discovery_commoneetcdrabbitmq_auth_backend_ldaprabbitmq_federation_managementrabbitmq_managementrabbitmq_federationrabbitmq_queue_federationrabbitmq_exchange_federationrabbitmq_federation_commonrabbitmq_auth_backend_oauth2base64urloauth2_clientjoserabbitmq_consistent_hash_exchangerabbitmq_auth_backend_internal_loopbackrabbitmq_web_stomp_examplesrabbitmq_web_stomprabbitmq_stomprabbitmq_jms_topic_exchangerabbitmq_web_mqtt_examplesrabbitmq_web_mqttrabbitmq_mqttrabbitmq_shovel_prometheusrabbitmq_shovelamqp10_clientgunrabbitmq_prometheusacceptrabbitmq_management_agentprometheusrabbitmq_web_dispatchamqp_clientcowboyrabbitmq_auth_backend_cacherabbitmq_amqp1_0",
"data_directory": "/tmp/rabbitmq-test-instances/rabbit-1@mango2/mnesia/rabbit-1@mango2",
"raft_data_directory": "/tmp/rabbitmq-test-instances/rabbit-1@mango2/mnesia/rabbit-1@mango2/quorum/rabbit-1@mango2",
"log_files": "/tmp/rabbitmq-test-instances/rabbit-1@mango2/log/[email protected]<stdout>",
// ...
}This branch:
{
// ...
"enabled_plugin_file": "/tmp/rabbitmq-test-instances/rabbit-1@mango2/enabled_plugins",
"active_plugins": [
"rabbitmq_auth_backend_http",
// ...
"rabbitmq_amqp1_0"
],
"data_directory": "/tmp/rabbitmq-test-instances/rabbit-1@mango2/mnesia/rabbit-1@mango2",
"raft_data_directory": "/tmp/rabbitmq-test-instances/rabbit-1@mango2/mnesia/rabbit-1@mango2/quorum/rabbit-1@mango2",
"log_files": [
"/tmp/rabbitmq-test-instances/rabbit-1@mango2/log/[email protected]",
"<stdout>"
],
// ...
}
michaelklishin
approved these changes
Sep 5, 2025
Collaborator
|
@lukebakken @the-mikedavis thank you for the quick turnaround! |
michaelklishin
added a commit
that referenced
this pull request
Sep 5, 2025
Additional JSON CLI formatter fix (backport #14511)
mergify bot
pushed a commit
that referenced
this pull request
Sep 5, 2025
A list of binaries was incorrectly converted by `unicode:characters_to_binary` into one big binary. Add a function head to match this case. Also, add tests for the values that were not correctly formatted prior to #14101 and #14381 (cherry picked from commit 3280bed) (cherry picked from commit fe0697d)
lukebakken
added a commit
to lukebakken/rmq-rabbitmq-server
that referenced
this pull request
Oct 21, 2025
The bug addressed by this PR was found while running the following command: ``` rabbitmqctl environment --formatter=json ``` ...after configuring the `rabbit` application to use `cacerts` with a list of binaries as the value, rather than `cacertfile`. This PR also fixes the formatting of the `tcp_listeners` and `ssl_listeners` output, because `[5672]` is a valid list of unicode codepoints that `unicode:characters_to_binary` will happily convert it, resulting in `"tcp_listeners": "ᘨ"` in the output. I also ensured that the fixes in rabbitmq#14511 and rabbitmq#14398 still work as intended.
lukebakken
added a commit
to lukebakken/rmq-rabbitmq-server
that referenced
this pull request
Oct 22, 2025
The bug addressed by this PR was found while running the following command: ``` rabbitmqctl environment --formatter=json ``` ...after configuring the `rabbit` application to use `cacerts` with a list of binaries as the value, rather than `cacertfile`. This PR also fixes the formatting of the `tcp_listeners` and `ssl_listeners` output, because `[5672]` is a valid list of unicode codepoints that `unicode:characters_to_binary` will happily convert it, resulting in `"tcp_listeners": "ᘨ"` in the output. I also ensured that the fixes in rabbitmq#14511 and rabbitmq#14398 still work as intended.
mergify bot
pushed a commit
that referenced
this pull request
Oct 22, 2025
The bug addressed by this PR was found while running the following command: ``` rabbitmqctl environment --formatter=json ``` ...after configuring the `rabbit` application to use `cacerts` with a list of binaries as the value, rather than `cacertfile`. This PR also fixes the formatting of the `tcp_listeners` and `ssl_listeners` output, because `[5672]` is a valid list of unicode codepoints that `unicode:characters_to_binary` will happily convert it, resulting in `"tcp_listeners": "ᘨ"` in the output. I also ensured that the fixes in #14511 and #14398 still work as intended. (cherry picked from commit 4072326)
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.
Fixes #14509
A list of binaries was incorrectly converted by
unicode:characters_to_binaryinto one big binary. Add a function head to match this case.Also, add tests for the values that were not correctly formatted prior to #14101 and #14381