The step name 'Notify: Deployment started' contains invalid characters. Names can only contain letters, numbers, periods, commas, dashes, underscores or hashes

Hi!

We recently updated from 1.6.x version of Octopus Deploy and are now running version 2.1.3.1223.

In one on the projects we have a colon “:” in the step names like ‘Notify: Deployment started’.

In the current version it seams that colon is no longer allowed in the step name. When trying to remove it with “Step details” and “Save” it results in a long list of errors. One for each step i have with a colon. Like:

The step name ‘Notify: Deployment started’ contains invalid characters. Names can only contain letters, numbers, periods, commas, dashes, underscores or hashes.
The action name ‘Notify: Deployment started’ contains invalid characters. Names can only contain letters, numbers, periods, commas, dashes, underscores or hashes.
The step name ‘Stop: Scheduled Tasks’ contains invalid characters. Names can only contain letters, numbers, periods, commas, dashes, underscores or hashes.
The step name ‘Stop: IIS server’ contains invalid characters. Names can only contain letters, numbers, periods, commas, dashes, underscores or hashes.
The action name ‘Stop: IIS server’ contains invalid characters. Names can only contain letters, numbers, periods, commas, dashes, underscores or hashes.

As I cannot save I cannot see how to get around the issue.

Can anyone please help me! I am stucked!

Hi,

When you imported from 1.6, the import should have been blocked because of this issue. Did that not happen?

Paul

Hi,

No. As far as I understand the update was done without any blocks for this issue.

The migration was done from Octopus 1.6.x to (2.0.10.1066 or) 2.0.13.1100 and then later updated to our current version 2.1.3.1223.

I done know if updating to the new 2.3.3.1369 version will help this issue.

/Olov

Hi,

There was a bug in the early 2.0 releases that prevented the import from rejecting these invalid names.

To fix the issue you’ll need to:

  • First, log in to the Octopus UI with permission to edit the process
  • Copy the script below and replace storefront with the “slug” of your project (shown in the URL when viewing the project in Octopus)
  • Paste the resulting script into the browser console (in Chrome press Ctrl+Shift+I and select Console).
var client = Octopus.App.Client;
var slug = 'storefront';
var orig = ':';
var repl = '-';

client.get('/api/projects/' + slug).then(function(project){
  client.get(project.Links.DeploymentProcess).then(function(process){
    _.each(process.Steps, function(step){
      step.Name = step.Name.replace(orig, repl);
      _.each(step.Actions, function(action){
        action.Name = action.Name.replace(orig, repl);
      });
    });
    client.put(process.Links.Self, process).then(function(saved){
      alert('Done.');
    });
  });
});

You should see a message box with ‘Done.’ when it completes successfully.

Hope this helps,
Nick