PipedreamHQ / roadmap

Pipedream is an integration platform for developers. Have a feature request or bug to report? Add it here.
https://pipedream.com
30 stars 5 forks source link

Editing an Action should just create a new version of the Action, not a duplicate Action #400

Closed rcmontrose closed 4 years ago

rcmontrose commented 4 years ago

Describe the bug In the Action section, if you edit an Action, it creates a duplicate Action, with the exact same name, and version 0.1. If you edit an Action and Save it 4 times, you have 4 duplicate Actions, all version 0.1, except the code, has changed to depending on the editing.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Actions.' Click 'New' to create a new Action.
  2. Call it Test Action and the name steps.testAction
  3. Add the lines: // This is the original Action console.log('ORIGINAL Action');
  4. Click Save. You have saved version 0.1 of the Action.
  5. Go back to the editor and changed ORIGINAL to Original. Click Save. It's saved with version 0.1 again.
  6. Go back to the Action tab and you see two identical Actions. image

Expected behavior I would expect the version number to increase to 0.2 and there's just a single copy of the Action. I would expect any workflows using this Action to reflect the edited version and I wouldn't need to delete and readd the newer version of the Action to use it.

Desktop (please complete the following information):

Additional context Actions are expected to be like a Library code and if I update the Library code, then anything calling the library wouldn't need to change (unless I changed the inputs or outputs). Zapier's Code Zaps allow you to edit the Zap and it's used in your Zap (Workflow) and you don't need to delete and re-add the edited Code Zap to use it.

dylburger commented 4 years ago

This behavior was caused by a related bug, where toggling the Latest flag failed to display the latest version of the action (all versions of all actions were displayed).

That bug has been fixed so I'm closing this issue.