#201 Keep a history of state_reason values
Closed: Fixed 7 years ago Opened 7 years ago by ralph.

We currently only store the latest state_reason on a module. It would be nice to keep a history, i.e., if it gets started, fails, gets resubmitted, fails, gets resubmitted, fails, and then gets resubmitted and succeeds: that would be nice to know.


I'll add that it would be nice to store the history of state_reason values on every component build as well.

For modules: I would suggest something like a new table containing module transitions with the following schema: id, module_id, datetime, old_state, new_state, state_reason

The tasks would be:
- prepare schema upgrade
- change ModuleBuild in models.py, especially transition method
- provide GET method (by module ID) in the REST API for getting state transitions history
- the original state_reason in module_builds would reflect the most recent state (as it does now)

For components: ATM, I am not sure that it makes sense as they can be marked only as "failed" , or did I miss something?

The proposal for modules looks good to me. :+1:

For components, I think it makes sense to keep a history of task_id values. That way if they fail over and over, we can go back and look at the links to those tasks to dig into more info about why they failed.

Metadata Update from @fivaldi:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

7 years ago

Metadata Update from @fivaldi:
- Issue assigned to fivaldi

7 years ago

Login to comment on this ticket.

Metadata