Question regarding dependencies

I’m having trouble getting my step dependencies to work the way I want them to. In this scenario I am using Octopus Deploy to run a SQL agent job, and also to backup/restore a database from my local environment to my AWS environment. Because we run a blue/green like (not exactly) environment I have an input variable to flag my deployment as going to the A environment or the B environment. Because Octopus doesn’t allow me to have multiple choice variables I am relying on the user to correctly enter A or B and nothing else into the variable box before they kick off the deployment. For this reason my very first step checks to see whether the inputted variable is either A or B and nothing else. If this fails all subsequent steps should be cancelled.

After this the deployment kind of splits into two tracks one track is simple as it has a single step running a SQL agent job and waiting for successful completion. The other track includes a backup, upload to S3, download from S3 and restore step. Those are all obviously dependent on each other and run on 2 different roles (one here to backup, one at AWS to restore) hence they cannot all be child steps as child steps run against the same role.

Once both tracks are successful there is a final step to do the cutover. I will try to illustrate this whole scenario, no comments on the awful diagram please :slight_smile:

The entire process takes about 7 hours but I about 1.25hrs of that is wasted as step 4 waits for step 2 to complete. Where did I go wrong?

Thanks,
Jeff

Hi Jeff,

Thanks for getting in touch! Would you mind sending through a deployment log so I can better understand the timing? Also a screenshot of your process page would be great.
Hopefully I can find some suggestions for you.

Vanessa

Hi Vanessa,

Thanks for getting back to me. I’ve made a few changes since I reached out yesterday so the deployment process page I’m sending won’t match up with the deployment log I’m sending. I added a few additional steps as well as moved the SQL – Execute SQL Agent Job to run in parallel with the Upload Job which is longer so that it won’t hold anything up. It’s not ideal but it will work for now.

Thanks,
Jeff

ServerTasks-8501.log.txt (69 KB)

Hi Jeff,

My thought is the following.
Add a few of your steps as child steps for the two that can run in parallel. So step 5-6 could be child steps of step 3 which means they will run after 3 but while 4 is still running.
I’ve attached a horrible example of the POC for what I mean… it might help a bit?

Let me know what you think.
Vanessa

Hi Vanessa,

Thanks that will work for now. In the future I’d love to see steps that were dependent on specific other steps (Rather than all previous) or child steps that could ran on different machines/roles.
Thanks,
Jeff