Skip to content
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

Retry Multiplier and Jitter should be float or string #36

Closed
jjrodenburg opened this issue Jul 16, 2021 · 0 comments · Fixed by #41
Closed

Retry Multiplier and Jitter should be float or string #36

jjrodenburg opened this issue Jul 16, 2021 · 0 comments · Fixed by #41
Assignees
Labels
bug 🐛 Something isn't working

Comments

@jjrodenburg
Copy link

jjrodenburg commented Jul 16, 2021

What happened:
Retry multipliers and Jitters can either be of type float or ISO 8601 duration string per the specification. The code in retry.go currently has the type as intstr.IntOrString. To use a multiplier or jitter as float, you have to parse it from the string. This works, but it seems odd that the SDK allows them to be provided as integers when the spec says they have to be floats or strings.

What you expected to happen:
Be able to provide a float in a non-string representation and get it without having to parse a string. Eg, an equivelant functionality to intstr.IntOrString along the lines of FloatOrString.

How to reproduce it:

Anything else we need to know?:

Environment:

  • Specification version used:
  • Go version:
@jjrodenburg jjrodenburg added the bug 🐛 Something isn't working label Jul 16, 2021
@ricardozanini ricardozanini self-assigned this Sep 23, 2021
ricardozanini added a commit to ricardozanini/sdk-go that referenced this issue Sep 23, 2021
ricardozanini added a commit that referenced this issue Sep 24, 2021
* Fix #36 - Introduce FloatOrString to handle numeric values

Signed-off-by: Ricardo Zanini <[email protected]>

* Fix formatting

Signed-off-by: Ricardo Zanini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants