silverstripe-archive / deploynaut

A web based tool for performing deployments
BSD 3-Clause "New" or "Revised" License
71 stars 26 forks source link

add a deleted state for deployments for ui updates and auditing #860

Closed stojg closed 7 years ago

stojg commented 7 years ago

By using a soft delete approach we still keep the data for auditing and can send 'real time' updates to the UI about which deployment(s) was deleted for other users having the same page opened.

helpfulrobot commented 7 years ago

@stojg, thanks for your PR! By analyzing the blame information on this pull request, I identified @halkyon, @mateusz and @micmania1 to be potential reviewers

halkyon commented 7 years ago

Won't this show in history still? you may have to filter it out in the DeployHistory() method on server-side?

stojg commented 7 years ago

The history only shows

case deployStates.STATE_COMPLETED:
case deployStates.STATE_INVALID:
case deployStates.STATE_FAILED:

There is a point, if we are talking about blending the new and old ui and switching between them. I will add it to the feature flag thing check tho

halkyon commented 7 years ago

Yeah, it's more the perspective of the API never returning a deleted state or something.

stojg commented 7 years ago

I'm not sure how to solve 'the API never returning a deleted state' without setting up new actions, new XHR requests, reducers etc.

stojg commented 7 years ago

The "old UI" checks out okay since it only returns if the IsNewDeployEnabled flag is off

DNDeployment::STATE_COMPLETED,
DNDeployment::STATE_FAILED,
DNDeployment::STATE_INVALID
halkyon commented 7 years ago

ah okay, all good then