I believe we also need to expand our reservation model. We track amount of steps, current step and one error, however, more than one job step can fail. Therefore I suggest to change Error to Errors []string so it can track multiple errors. When on it, I also suggest to put StepTitles []string that will contain titles (descriptions) of all steps for UI. With this change, in UI we can render much better output in some sort of "list" of steps:
- Ensure public key is present
- Launch instance on AWS
And as the reservation progresses, we can "mark" those as done (or as an error allowing showing error message for each step).
In summary, I would work on a PR that refactors one field and adds a new field. Both being SQL arrays, something that Postgres with pgx supports natively out of the box. Opinions?
Verified