-
Notifications
You must be signed in to change notification settings - Fork 13
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
Change Request: Do not derive internal number types from config file number types. #5
Comments
I think this merits further discussion. The current architecture allows the user to choose, through judicious modification of the config file, the kind of comparison to be performed on the value. If the config file contains a string value, a string comparison is performed. If the config file contains an integral value, the value provided by the APIC, even if it's a string or a floating-point number, is compared as an integer. (There seems to be consensus among Python modules how to handle JSON's -- well, JavaScript's -- decision to have only one numeric data type: the built-in Also, it appears that the Python Those are the reasons behind the current behavior. Do you have a use case negatively affected by this? |
Thanks for the background. Yes, my broken use case is to generate my aci exporter config from/with Therefore, my preference would be for some way ACI exporter to accept what JSON -> YAML would give -- which is apparently Thanks! |
'type' can be 'str', 'int' or 'float'; if present, the value is converted to this type. Potential solution for issue #5.
Sorry for keeping silent for a week; my job had me focused elsewhere. I've introduced a |
Thanks so much, @RavuAlHemio . I will check this out as soon as I can. |
Would it be agreeable/possible to derive the types from the APIC API itself?
see: google/jsonnet#683
I looked at this over in my fork: https://github.com/josdotso/prometheus_aci_exporter/pulls?q=is%3Apr+is%3Aclosed
Please let me know if I should PR my commits to your repo.
The text was updated successfully, but these errors were encountered: