Problem: Instance action history may not show when refreshing instance details page
Problem/Opportunity Statement
When Exosphere first loads on the instance details page (or the browser is refreshed on this page), sometimes the Action History is blank, which should never be the case, as every instance has at least a "create" action.
I suspect this is because Exosphere does a Cmd.batch
(in Rest.Nova.requestServer
) to perform two API calls at the same time: request the instance, and the instance action history. If the API call for the action history comes back before the API call for the instance itself, Exosphere will have no instance in the model to store the instance action history inside of, so the action history is dropped on the floor:
What would success / a fix look like?
One of the following:
- Request server events after receiving the server, if we don't have them already
- Instead of using a CRUD-y model, switch to an event sourcing architecture to store results of API calls. Just kidding, maybe???