Step templates with Parameters defined cannot be edited

William Lieurance's Avatar

William Lieurance

20 Apr, 2017 09:53 PM

Hi there,

I've found a weird situation in OctopusDeploy around step templates. Normally, after I create a step template using the API I can edit it, either with the API directly again or through the web UI. However, somewhere between 3.12.0 (works) and 3.12.4 (does not), I'm seeing an issue. I've tried it on 3.12.5 (does not work) and 3.12.6 (does not work) as well. If the step template contains a "Parameter", any later attempts to update it returns the strangely-worded error

  "ErrorMessage": "There was a problem with your request.",
  "Errors": [
    "An action template verision with this name and version already exists."

I'm able to replicate this error with the following step template declaration:

  "Name": "fail-on-edit",
  "Description": "Proof of bug concept",
  "ActionType": "Octopus.TentaclePackage",
  "Version": 0,
  "Properties": {
  "Parameters": [
        "Name": "dummy-parameter",
        "DefaultValue": "#{Octopus.Project.Name}",
        "DisplaySettings": {
          "Octopus.ControlType": "SingleLineText"
After POSTing that json blob to $OCTOPUS_URL/api/actiontemplates , the resulting step template can no longer be edited, for example by adding features to it or adding text in any textbox. Any idea what might be causing that error?


  1. Support Staff 1 Posted by Rob Pearson on 21 Apr, 2017 03:17 AM

    Rob Pearson's Avatar

    Hi William,

    Thanks for getting in touch. I wasn't able to reproduce the issue but I think I've figured out what is happening. That error message is shown when there is a duplicate step template name and version in a database history table (Octopus maintains a history of step template changes/details). I'm guessing there is some wierd combination of things happening that is causing this issue.

    Can you run the following queries against your Octopus database and share the results?

    SELECT Id, Name, Version, LatestActionTemplateId, ActionType FROM ActionTemplateVersion;
    SELECT Id, Name, Version, ActionType, CommunityActionTemplateId FROM ActionTemplate;

    NOTE: You can make this conversation private if there is anything you'd like to keep private.

    I suspect there is a duplicate step template name/version in the history table (ActionTemplateVersion) and it's causing problems. If we can confirm this, we can likely isolate/fix the bug or cleanup your database.

    Looking forward to your reply.



  2. 2 Posted by William Lieuran... on 21 Apr, 2017 09:23 PM

    William Lieurance's Avatar

    Very cool, Rob. On additional investigation based on what you put in your response, I figured out that the first upload of the template is fine, but if you delete that template, then add a new one with the same name, it is the replacement that cannot be edited.

    In the meantime, I'll get with my DBA to pull the queries you wanted.


  3. Support Staff 3 Posted by Rob Pearson on 24 Apr, 2017 01:05 AM

    Rob Pearson's Avatar

    Hi William,

    Just a quick follow-up, one of my team members found a bug based on your reply and created a GitHub issue to get it fixed. Can you take a look at it and let me know if this is the same issue you're seeing or if your scenario is different.



  4. 4 Posted by William Lieuran... on 24 Apr, 2017 10:54 PM

    William Lieurance's Avatar

    That issue is exactly what we're seeing. Turns out if I manually prune the orphaned ActionTemplateVersion rows (solution 1 of the github issue there) then my cannot-edit-step-templates problem is solved. This is a perfectly serviceable workaround until that issue is resolved.

    Thanks so much!

  5. Support Staff 5 Posted by Rob Pearson on 25 Apr, 2017 11:17 PM

    Rob Pearson's Avatar

    Hi William,

    Thanks for the reply and confirmation. That issue should get actioned at some point in future.

    In the mean time, happy deploying!



Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

25 May, 2017 02:43 AM
25 May, 2017 02:39 AM
25 May, 2017 02:36 AM
25 May, 2017 02:34 AM
25 May, 2017 02:22 AM


25 May, 2017 02:08 AM
25 May, 2017 01:10 AM
25 May, 2017 01:04 AM
24 May, 2017 11:59 PM
24 May, 2017 08:55 PM
24 May, 2017 08:14 PM