Follow API test implementation: https://github.com/Percona-Lab/pmm-api-tests/blob/b2f90c9829b2e3ac506e13c630143410543de5bb/server/updates_test.go#L91-L214
- Call /v1/Updates/Start API to receive authentication token and initial log offset.
- Call /v1/Updates/Status API with authentication token and current log offset. Add received lines to log, update current log offset with a received one. Stop, wait for user confirmation (they should push a button) and do a full page reload if done == true.
- Call /v1/Updates/Status immediately after the previous call returned data. (Server will block response until some data is available).
- Call /v1/Updates/Status with 500ms if the previous call returned any error: network error, nginx error, 500 API response, any other error.
- Stop after 600 (2 rps * 5 minutes) consecutive errors. Reset error counter when a non-error response is received.