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

Graphite web accepts string input for parameters that should be floats or ints; CarbonAPI does not #105

Closed
carrieedwards opened this issue Sep 9, 2022 · 0 comments · Fixed by #106
Labels
bug Something isn't working

Comments

@carrieedwards
Copy link
Collaborator

Describe the bug
Graphite web appears to allow users to specify strings for functions that that parameters that should be floats or ints. This can be seen in the parameter validation. When the validation functions for floats or ints are called, the values are casted into the float or int data type. CarbonAPI throws an error if a string is passed in for a parameter that is supposed to be a float or int.

For example, the following method would be handled in Graphite web:

scaleToSeconds(testMetric, '5')

But it would throw a 'bad type' error in CarbonAPI.

CarbonAPI's handling of parameters should be updated to match how CarbonAPI does it, so CarbonAPI should allow strings to be passed in for ints and floats.

@carrieedwards carrieedwards added the bug Something isn't working label Sep 9, 2022
@carrieedwards carrieedwards linked a pull request Sep 9, 2022 that will close this issue
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.

1 participant