UK-Export-Finance / dtfs2

Digital Trade Finance
MIT License
11 stars 1 forks source link

fix(FN-3460): fix numerical rounding errors during report upload #3546

Closed sw-mattw closed 1 month ago

sw-mattw commented 1 month ago

Introduction :pencil2:

During bank report upload to portal, we occasionally observe floating-point rounding errors for numerical cells. These are presented as validation errors (see screenshot below), meaning the report cannot be submitted.

Facility utilisation values of 3938753.80 and 761579.37 are two examples of this.

A spreadsheet with this issue has been attached to the ticket itself.

This affects production.

Validation errors for the above figures: Note that the value displayed in Excel (3938753.80) does not match the value in the entry column of the first row (due to this rounding issue).

369045787-3683f4e4-c47e-4884-a6e4-0b8918516b42

Resolution :heavy_check_mark:

Miscellaneous :heavy_plus_sign:

N/A

codecov-commenter commented 1 month ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 33.17%. Comparing base (1f4b137) to head (8922903).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-2.0.1 #3546 +/- ## ============================================== Coverage 33.16% 33.17% ============================================== Files 1397 1398 +1 Lines 31254 31256 +2 Branches 5002 5002 ============================================== + Hits 10366 10368 +2 Misses 18266 18266 Partials 2622 2622 ``` | [Flag](https://app.codecov.io/gh/UK-Export-Finance/dtfs2/pull/3546/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=UK-Export-Finance) | Coverage Δ | | |---|---|---| | [api-test](https://app.codecov.io/gh/UK-Export-Finance/dtfs2/pull/3546/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=UK-Export-Finance) | `0.39% <ø> (ø)` | | | [unit-test](https://app.codecov.io/gh/UK-Export-Finance/dtfs2/pull/3546/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=UK-Export-Finance) | `33.43% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=UK-Export-Finance#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
11.5% Duplication on New Code

See analysis details on SonarCloud

abhi-markan commented 1 month ago

Ignoring failing company house tests due to head branch ahead with recent company house API response change and possibly due to APIM migration.