flowfuse icon indicating copy to clipboard operation
flowfuse copied to clipboard

Add "None" action type for a DevOps Stage

Open joepavitt opened this issue 1 year ago • 3 comments

Description

When creating a stage on a DevOps Pipeline users are presented with the following options for the "Action" that pipeline should perform.

Screenshot 2024-08-01 at 18 22 13

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

joepavitt avatar Aug 01 '24 17:08 joepavitt

Example of user getting a little lost here: https://eu.posthog.com/project/2209/replay/01909d13-3a88-797a-bf84-4c77d84c5310?t=808

joepavitt avatar Aug 09 '24 12:08 joepavitt

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)

cstns avatar Aug 11 '24 06:08 cstns

From the UX side, I stand by this is something we should support - but from the architectural/server side, I shall revert to @knolleary

joepavitt avatar Aug 11 '24 17:08 joepavitt

I'll pick this up and review what's needed on the backend.

knolleary avatar Aug 12 '24 08:08 knolleary