Add "None" action type for a DevOps Stage
Description
When creating a stage on a DevOps Pipeline users are presented with the following options for the "Action" that pipeline should perform.
This can be unintuitive though as when adding hte last stage, there is no action to take, but the user must still select something.
It is proposed to add a "No Action" or "None" option here and make it the default option. This makes it more obvious as to the purpose of the stage in question.
We already do not show the "Deploy Action" row for the last stage, so there is no need for extra effort here.
Which customers would this be available to
Team + Enterprise Tiers (EE)
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate
Example of user getting a little lost here: https://eu.posthog.com/project/2209/replay/01909d13-3a88-797a-bf84-4c77d84c5310?t=808
After some investigation , it's doable but not as an easy win.
Because the stage action is stored in the database, a quick ui alteration is not possible. We'd need to:
- alter the existing PipelineStages action column to allow a 'none' or null value via migration file
- add the 'none' or null value in the available SNAPSHOT_ACTIONS and VALID_ACTIONS_FOR_DEVICES in forge/ee/db/models/PipelineStage.js:7 and forge/ee/db/models/PipelineStage.js:17
- alter the getOrCreateSnapshotForSourceInstance and getOrCreateSnapshotForSourceDevice from the Pipeline Controller methods to account for new stage action
- deploySnapshotToInstance, deploySnapshotToDevice and deploySnapshotToDeviceGroup from the Pipeline Controller might need some attention
- alter ui, if action is set to none, I don't think we'd need to require a target instance (also the order of 'choose instance' & 'select action' should be reversed)
From the UX side, I stand by this is something we should support - but from the architectural/server side, I shall revert to @knolleary
I'll pick this up and review what's needed on the backend.