AWS creates NaN co2e values when usage type is EUW2-PublicIPv4:InUseAddress #1225
Labels
bug
Something isn't working
seeking contributor
Appropriate for an outside contributor to do and requires less context on the ccf methodology
Preflight Checklist
Issue Details
Expected Behavior
When dealing with an unknown usage type, the data should still give a valid number for it
Actual Behavior
Co2e for a single row estimate can be a NaN, which then affects any other valid numbers that it is accumulated with
To Reproduce
Could be reproduced via a unit test in CostAndUsageReports.test.ts:
using the following data for the query result in athena.fixtures.ts:
Additional Information
Some information on this type of usage can be found here. I have tracked down the areas of code that allow NaN's to make it into results but not sure of the best fix.
Seems to me that the simplest fix is to also set the co2e to zero when the kilowatt hours are NaN but I don't know if it'd be safer to prevent NaNs from being generated earlier in the process.
The text was updated successfully, but these errors were encountered: