Open Revolyssup opened 2 years ago
Thank you for filing this, @Revolyssup
Thank you for the report @Revolyssup.
Can you help me understand - are you saying that the correct type is int as exported by Nighthawk, but fortio incorrectly takes that in as a string? Or are we saying that fortio is correct and we should adjust the Nighthawk's fortio transform to export QPS as string instead of int?
@MUzairS15 will you offer these details? Let's work through this item.
yes, @mum4k
fortio
exports QPS as string
https://pkg.go.dev/fortio.org/fortio/periodic#RunnerResults.
Another example is RetCodes
https://github.com/fortio/fortio/blob/v1.55.0/fhttp/httprunner.go#L37
Fortio expects map[int]int
were as nighthawk
transforms it as map'[string]int
https://github.com/envoyproxy/nighthawk/blob/0fb828685228ab42bd7d3338eae157f759a6d68a/api/client/transform/fortio.proto#L49
The Transformation
needs to be updated.
Thank you for explaining that @MUzairS15, given this just needs a modification in the interface between Nighthawk and Fortio, we should be ok to make this change without breaking anyone. I will go ahead and mark this issue as "help wanted", that way anyone with the cycles can pick it up and contribute the fix.
Title: Mismatched type for fortio response causes failure in interconversion
Description: The message format in protobuff here https://github.com/envoyproxy/nighthawk/blob/f42add9bb5c71a5652db2f9471dda357b96d5ee2/api/client/transform/fortio.proto#L31 mismatches the expected datatype by fortio here https://github.com/fortio/fortio/blob/d2a2d42f4f17df4c09e608353546ebd0d443747d/periodic/periodic.go#L221 on the field
RequestedQPS
This is causing Unmarshalling to fail while conversion from one to another. Reproduction steps:
Logs:
Call Stack: