Skip to content

Separate save code now status refresh routine from the listing ui

This introduces a new endpoint to refresh the status of the save code now requests. This endpoint will be called periodically. That concern is out of scope of the listing ui and source of status update desynchronization [1]

The listing ui now feels more immediate as implementation wise, it no longer writes when actually listing rows.

This slightly improves the code by typing it a bit more. A new SaveOriginRequestInfo got added to represent the save origin request to display view side. This matches what other views manipulates.

Related to T3280

Test Plan

tox (happy tests or so i thought)

container:

  • listing ui only lists

  • cron calling the refresh endpoint to update the save requests statuses regularly [1]

  • [1]

$ kubectl get cronjob save-code-now-refresh-visit-status
NAME                                 SCHEDULE      SUSPEND   ACTIVE   LAST SCHEDULE   AGE
save-code-now-refresh-visit-status   */1 * * * *   False     0        60s             6m20s

webapp log outputs regularly

[webapp] 10.42.0.65 - - [23/Apr/2021:08:56:02 +0000] "GET /api/1/origin/save/refresh/ HTTP/1.1" 200 511 "-" "curl/7.76.1-DEV"

Migrated from D5583 (view on Phabricator)

Merge request reports