Story #8876

Updated by Brett Smith over 4 years ago

Baseline: Job show tab becomes more like the Pipeline Instance show tab. This is how it renders child work units.

Follow the structure in #8651 to implement work unit proxies for job and pipeline instance.

These
Work Unit methods need to be implemented, and may have different implementations for jobs and pipeline instances: needed:

* modified_by_user_uuid A @label@ method
* created_at
* started_at
* finished_at
* Some kind of @state@
A @components@ method that returns one of the following states: Queued, Running, Stopped. real objects in a ??? (Array? (Name TBD.) Hash?)
* A @success?@ @parameters@ method that returns true if the work unit finished successfully, false if it has a permanent failure, @script_parameters@ for jobs and nil if the final state is not determined. @nil@ for pipeline instances
* progress
*
A method to indicate where there are logs, if any. (Log rendering is explicitly not part of this story.) any
* A @label@ method. For either jobs or pipeline instances, when they're the top-level thing you're looking at, the label is the name. Otherwise, it comes from the object's components field.
* A @components@ method that returns real objects in a ??? (Array? Hash?)

Both work units also need the following methods, which are expected to return nil for pipeline instances because they're not relevant:

* @parameters@
*
script
* script_repository
* script_version
* supplied_script_version
* docker_image
* runtime_constraints
* modified_by_user_uuid
*
priority
* nondeterministic
* created_at
* started_at
* finished_at
* state
* progress

* output

Back