Octopus.Deploy error adding step

(Julia) #1

Hi:

I am trying to add a step using Octopus.Deploy dll in a project and I get the following error:

Exception calling “Modify” with “1” argument(s): "There was a problem with your request.

  • Package reference to 7Zip could not be deleted because it is used for the project’s release versioning strategy.
    "

In the project settings the Release Versioning is configured to “Use the version number from an included package” with package step set to 7Zip package step.

If I change this setting to “Generate version numbers using template” and run again the script to add a step, the steps is added and no error is raised.

I am using the following software versions:

Octopus v2018.9.6
Octopus.Client 6.0.2 (previous release also failed eg. 4.13.10)

Powershell script used to add the step can be found here:

Screenshot of the project:

Thanks for your suppport,
Julia

(Matt Richardson) #3

Hi Julia

Thanks for getting in touch! Sorry to see you’re having trouble adding a step.

This does appear to be a weird one - I’ve setup the scenario locally to test it out, and it adds the step as expected - I’m not seeing any errors.

Are you able to send me the the JSON for the deployment process? You access this from the overflow menu (the 3 dots) in the top right on the process list.

This error message appears when one of packages is removed from a step, and its being used for the release versioning. So, it appears somehow the update request that is being sent to the server doesn’t have the right structure (ie, the packages are not supplied).

One way that I could conceivably think this could happen was if the version of OctopusClients was old. I see you’ve included the version number there (thanks!), but it might be worth double checking to really make sure that that is the actual version being used.

If its urgent, a workaround for this for now would be to temporarily script the change to the release strategy, add the step, then change it back. Not ideal, but it should work.

Look forward to getting to the bottom of this.

Cheers,
Matt

(Julia) #4

Hi Matt:

The workaround proposed works fine, thanks.

Find attached the JSON of the project. It is a simple project created just to test the problem.

BR,

Julia

teststepadd-process.json (1.69 KB)

(Matt Richardson) #5

Hi Julia

Thanks for letting me know.

The JSON you’ve sent through looks pretty much identical to mine, so that didn’t help as much as I’d hoped. If you’re able to send through the JSON for the project (from http://youroctopusserver/api/projects/teststepadd), hopefully I’ll be able to figure out the issue from that.

Equally, if you’re happy with the workaround, we can just close this ticket as a glitch in the matrix :slight_smile:

Let me know how you want to proceed.

Cheers,
Matt

(Julia) #6

Hi Matt:

Please find the json of the project attached.

BR,

Julia

teststepadd.json (1.95 KB)

(Matt Richardson) #7

Hi Julia

Sorry for the delay in getting back to you - it was a public holiday here yesterday.

I’ve setup a project on the same version of Octopus (2018.9.6) as you’ve got, I’m using the same Octopus.Client (6.0.2), with the project & process setup as similar as I can, but unfortunately, I still cant reproduce the issue.

Are there any differences with the script you’re using to create the new step, compared to the one you’ve linked? Can you share the exact script you’re using?

Another possibility is use something like Fiddler to capture the network traffic that is being sent to Octopus. That might shed some light on whats going on.

Look forward to getting to the bottom of it.

Cheers,
Matt

(system) closed #8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.