Skip to content

Small fix to round ci_compute_minutes after addition operation

Max Fan requested to merge 376270-fix-rounding-floating-numbers into master

What does this MR do and why?

Currently, because of the addition of numbers it'll sometime return a floating point number. This is ugly on the UI so we want to round this.

Screenshots or screen recordings

Before the rounding fix

image

image

After

Should look something like this: image

Since ruby rounding only has floating point inaccuracies seldomly, this is hard to reproduce as the calculation is dependent on build runtime

How to set up and validate locally

Run the spec without the round(2) option

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #376270 (closed)

Edited by Max Fan

Merge request reports