Cray-HPE / sat

System Admin Toolkit
https://cray-hpe.github.io/docs-sat/
MIT License
4 stars 5 forks source link

CRAYSAT-1869: Addressing the value rounding bug #230

Closed shivaprasad-metimath closed 3 months ago

shivaprasad-metimath commented 4 months ago

IM:CRAYSAT-1869 Reviewer:Ryan

Summary and Scope

There is a rounding error when SAT reports status on percentage done. It rounds up to 100% when the actual number reported by BOS is something like 99.9475. For anything other than 100%, most people would not care. But 100% means it is all done, so why would SAT still be waiting for it to go over 100%

Hence, Updating the rounding to 2 decimal places instead of no decimal places and then not rounding if the value above 99 to address the bug and showing upto 10 decimal places.

The same case is added part of the unit test for the class.

Issues and Related PRs

List and characterize relationship to Jira/Github issues and other pull requests. Be sure to list dependencies.

Testing

List the environments in which these changes were tested.

Tested on:

Would need a large system to validate this changes. hence a unittest case has been added to validate the scenario.

Test description:

Will have to power off and power on the nodes to verify using a BOS session template

Risks and Mitigations

minimal

Pull Request Checklist