-
Notifications
You must be signed in to change notification settings - Fork 9
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
fix: correctly handle []any
type
#110
Conversation
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
WalkthroughThe recent updates focus on enhancing the Changes
Assessment against linked issues
Poem
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- go.work.sum
Files selected for processing (2)
- amqpjobs/conv.go (1 hunks)
- tests/jobs_amqp_test.go (1 hunks)
Additional comments: 2
amqpjobs/conv.go (1)
- 41-42: The conversion of
float32
to string is done by casting tofloat64
and then formatting. This is necessary becausestrconv.FormatFloat
requires afloat64
. However, be aware that this cast could potentially lead to precision issues. Ensure that this precision is acceptable for the application's requirements.tests/jobs_amqp_test.go (1)
- 693-699: The change in the
Version
field from "2.9.0" to "2023.3.7" indicates a shift from semantic versioning to date-based versioning. Ensure that this new versioning scheme is consistently applied across the entire codebase and documentation.
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
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.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files selected for processing (3)
- amqpjobs/conv.go (1 hunks)
- amqpjobs/conv_test.go (2 hunks)
- amqpjobs/item.go (1 hunks)
Additional comments: 7
amqpjobs/conv.go (2)
10-17: The summary states that the return type of
convHeaders
has been changed, but both the summary and the hunk indicate that the return type was and still ismap[string][]string
. Please clarify if there was actually a change in the return type.20-67: The implementation of
convHeadersAnyType
looks solid and handles a variety of types, including recursive handling for[]any
. Good use of logging for unknown types.amqpjobs/conv_test.go (2)
5-9: The import of
go.uber.org/zap
is correctly added to support the new logging functionality in theTestConv
function.39-39: Ensure that the rest of the test cases are updated if necessary to reflect any changes in the
convHeaders
function behavior, especially considering the new return typemap[string][]string
.amqpjobs/item.go (3)
241-247: The summary states that the
unpack
method now takes an additionallog
argument, but the code shows thatconvHeaders
is being called withd.log
. Theunpack
method signature itself has not changed. Please clarify if the summary should be updated to reflect that the change is within theunpack
method's body, not its signature.244-244: The change to pass
d.log
toconvHeaders
aligns with the summary and is correctly implemented.242-247: The
unpack
function correctly initializes a newItem
and sets itsheaders
field using theconvHeaders
function.
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- amqpjobs/conv_test.go (2 hunks)
Additional comments: 4
amqpjobs/conv_test.go (4)
5-9: The import of
go.uber.org/zap
is correctly added to support the new logging functionality.36-37: Proper initialization and error handling for the
zap.Logger
instance.38-38: The
convHeaders
function call is correctly updated to include the newlog
parameter.40-41: The test assertions for float values are correctly checking the expected string representations.
Reason for This PR
closes: roadrunner-server/roadrunner#1793
Description of Changes
[]any
type was missed in the headers handler.License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.
PR Checklist
[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]
git commit -s
).CHANGELOG.md
.Summary by CodeRabbit
Refactor
Documentation
New Features