-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Provide clear error message for reserved annotation keys #12523
Merged
Merged
Conversation
This file contains 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
The log is more clear now:
Looks good to me! |
As described in https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-annotations > The annotations type is a map where the keys are restricted to be of type symbol or of type ulong. > All ulong keys, and all symbolic keys except those beginning with "x-" are reserved. Prior to this commit, if an AMQP client used a reserved annotation key, the entire AMQP connection terminated with a function_clause error message that might be difficult to understand for client libs: ``` <<"Session error: function_clause\n[{amqp10_framing,'-decode_annotations/1-fun-0-',\n [{{symbol,<<\"aa\">>},{utf8,<<\"bbb\">>}}],\n [{file,\"amqp10_framing.erl\"},{line,158}]},\n {lists,map,2,[{file,\"lists.erl\"},{line,1559}]},\n {amqp10_framing,decode,1,[{file,\"amqp10_framing.erl\"},{line,127}]},\n {lists,map_1,2,[{file,\"lists.erl\"},{line,1564}]},\n {lists,map,2,[{file,\"lists.erl\"},{line,1559}]},\n {mc_amqp,init,1,[{file,\"mc_amqp.erl\"},{line,102}]},\n {mc,init,4,[{file,\"mc.erl\"},{line,150}]},\n {rabbit_amqp_session,incoming_link_transfer,4,\n [{file,\"rabbit_amqp_session.erl\"},{line,2341}]}]">> ``` This commit ends only the session and provides a clearer error message.
ansd
force-pushed
the
annotation-key-error
branch
2 times, most recently
from
October 16, 2024 13:13
3e2f699
to
358ff79
Compare
This commit fixes the CI error on `main` branch where amqp_system_SUITE failed with the following error: ``` Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. at System.Environment.FailFast(System.String) at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode() at System.Globalization.GlobalizationMode..cctor() at System.Globalization.CultureData.CreateCultureWithInvariantData() at System.Globalization.CultureData.get_Invariant() at System.Globalization.CultureInfo..cctor() at System.String.ToLowerInvariant() at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetArch() at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment..cctor() at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier() at Microsoft.DotNet.Cli.MulticoreJitProfilePathCalculator.CalculateProfileRootPath() at Microsoft.DotNet.Cli.MulticoreJitActivator.StartCliProfileOptimization() at Microsoft.DotNet.Cli.MulticoreJitActivator.TryActivateMulticoreJit() at Microsoft.DotNet.Cli.Program.Main(System.String[]) Exit code: 134 (pid <0.1533.0>) ```
ansd
force-pushed
the
annotation-key-error
branch
from
October 16, 2024 14:36
f1111ee
to
8c0cd1b
Compare
This PR also makes |
ansd
added a commit
that referenced
this pull request
Oct 16, 2024
Provide clear error message for reserved annotation keys (backport #12523)
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.
As described in https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-annotations
Prior to this commit, if an AMQP client used a reserved annotation key, the entire AMQP connection terminated with a function_clause error message that might be difficult to understand for users:
This commit ends only the session and provides a clearer error message.