cylc-uiserver
cylc-uiserver copied to clipboard
scan: check the UUID for stopped workflows
- Follow on from #223
- Required before we start serving offline data.
Each workflow "run" is identified by a UUID. This is preserved by restart but can be changed e.g. by deleting & re-installing a workflow, by deleting the DB or (I think) by warm starts (?).
When the UUID change the UIS needs to wipe all previously cached data on that workflow to avoid polluting the new workflow with the old data. Currently we only check the UUID on restart (from the contact file) which means we only react to this when/if the workflow is restarted. This is fine because we currently do not serve offline data, however, when we start serving offline data we will need to also perform this check for every workflow scan.
The UUID is preserved in the database, the code to retrieve the UUID is already implemented (https://github.com/cylc/cylc-flow/pull/4292). If the DB is deleted that should be handled the same as if the UUID had changed (i.e. wipe the UIS data store for that workflow).
Pull requests welcome!