-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Always separate decimals by a dot in metrics response #10699
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
base: 4.19
Are you sure you want to change the base?
Conversation
@blueorangutan package |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #10699 +/- ##
=========================================
Coverage 15.16% 15.16%
Complexity 11327 11327
=========================================
Files 5415 5415
Lines 474849 474849
Branches 57914 57914
=========================================
+ Hits 72011 72018 +7
+ Misses 394788 394782 -6
+ Partials 8050 8049 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@winterhazel should we not deal with this in the UI in a more appropriate way? This introduces an incompatibility in the API that might break some integrations. |
@DaanHoogland compatibility-wise, yes; ideally, no. This API has an unpredictable formatting, which is a bad behavior. A single environment can even see two responses with different formatting for the same request depending on the MS that processes it. Addressing the UI is possible and better in regards to compatibility, but it is just working around an issue that can even result in integrations that do not consider this behavior (which I think most do not) unexpectedly breaking depending on the environment. I will modify this PR to address the UI instead and to document this behavior, so that the metrics view works for all users on the next release already, but I'll also map this issue hoping that someday we have a procedure to introduce breaking changes in order to be able to fix the underlying problem. |
@winterhazel , I’m not being strict in this incompatibility principle. I think this change is acceptable for v21 for instance. I prefer not to have it in 4.19.3 or 4.20.1. If it turns out a UI change would be extremely complicated, i will yield. |
@DaanHoogland well, in that case I'll make this PR target 4.21, and open another one for 4.19.3 or 4.20.1 working around this behavior in the UI. |
Description
Depending on the Management Server's Locale,
listVirtualMachinesUsageHistory
may return decimal values separated by a comma in thecpuused
field; however, the UI expects that this decimal is separated by a dot. In this situation, the metrics page will not show the CPU utilization graph properly (see #10672).This PR fixes this issue by always formatting the decimal value separated by a dot.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Before the patch, the CPU utilization graph would not be shown properly in step 4 because the decimal value in
cpuused
was being separated with a comma. After the patch, the graphs are shown properly because the value always gets separated with a dot.