High-level implementation: Versioning for flows and agents

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Porting from #553290 (comment 2602393221):

Create UI

Add the draft option to the create UI.

The result of this would be:

  • when creating a new agent with draft checked: v1.0.0-draft is created
  • when creating a new agent with draft unchecked: v1.0.0 is created

Editing UI

Add the draft option to the UI and when editing any version, and one of MAJOR MINOR PATCH bump options when editing a non-draft. The result would be:

  • when editing vX.Y.Z-draft and keeping draft checked: vX.Y.Z-draft is updated
  • when editing vX.Y.Z-draft and unchecking draft: vX.Y.Z-draft is updated to vX.Y.Z
  • when editing vX.Y.Z and selecting PATCH with draft checked: vX.Y.A-draft is created (where A=Z+1)
  • when editing vX.Y.Z and selecting MINOR with draft checked: vX.A.Z-draft is created (where A=Y+1)
  • when editing vX.Y.Z and selecting MAJOR with draft checked: vA.Y.Z-draft is created (where A=X+1)
  • when editing vX.Y.Z and selecting PATCH with draft unchecked: vX.Y.A is created (where A=Z+1)
  • when editing vX.Y.Z and selecting MINOR with draft unchecked: vX.A.Z is created (where A=Y+1)
  • when editing vX.Y.Z and selecting MAJOR with draft unchecked: vA.Y.Z is created (where A=X+1)

I anticipate that we'd send the draft argument + PATCH/MINOR/MAJOR enum args to the backend to do the leg work

Edited by 🤖 GitLab Bot 🤖