cnabio / cnab-spec

Cloud Native Application Bundle Specification
https://cnab.io
Other
958 stars 99 forks source link

Clarify pending status, introduce running #340

Closed carolynvs closed 4 years ago

carolynvs commented 4 years ago

The current definition for the pending (previously underway) status is difficult to understand when it is acceptable to use and what it really means about the state of the installation. It's described as both a long term state and temporary. It is also described as "to be avoided".

We would like to redefine the state to make it more clear on what the state means, and to make it acceptable for tools to use. Pending now means that the operation has been requested (most likely queued) but has not begun executing. Tools that are immediately executing commands as they are issued would most likely choose to not use this state. However solutions that accept bundle operations from many users at once, for example a cnab operator, may choose to use this state.

This also introduces a new state: running. Tools may use this state to indicate that a bundle is currently executing an operation. This can be used by tools to provide operational insight into the activity of the system. For example, when an upgrade takes 30 minutes and people don't know that it's already running, it could easily be initiated more than once by multiple people on the same installation. Allowing tools to make the current status of the installation visible, helps avoid this situation.

Closes #312

carolynvs commented 4 years ago

Would a tool be expected to generate a new claim and result with this "conclusive" status? Or just modify the result on/associated with an existing claim?

The expectation is result is a modifiable sub-document, it contains fields that are outputs from the execution of the bundle (per the other PR), and they can be set without requiring a new claim to be created.

vdice commented 4 years ago

and they can be set without requiring a new claim to be created.

This makes sense. In a follow-up, we might consider adding specification that status updates from transient to completed statuses either should or must update the result object and either should not or must not update the associated claim or claim revision...

technosophos commented 4 years ago

Follow-up issues should be filed in cnab-go and libcnab-rust

carolynvs commented 4 years ago

I will open a follow-on PR to standardize our verbs and add cancelled.