zonemaster / zonemaster-backend

The Zonemaster Backend - part of the Zonemaster project
Other
14 stars 23 forks source link

Make job_status report proper percentages #1150

Closed mattias-p closed 7 months ago

mattias-p commented 9 months ago

Purpose

This PR makes job_status and test_progress return proper percentages (instead of 1/99ths).

Context

This PR should not be merged before the v2023.2 release.

Fixes zonemaster/zonemaster#1176.

Changes

TestAgent is made to set progress to proper percentages. Because DB::test_progress() clams the progress value to a maximum of 99, this change will not interfere with the state semantics of the progress value even when TestAgent requests a progress value of 100.

How to test this PR

Run a job using zmtest and verify that the job finishes out at 100 percent progress with all the results included, just like it should.