I am baffled what is going on. At first my complaint was it was sending out two notifications / emails. Octopus support convinced me it was because of an email address being in two DL’s. Fine, bought that.
However, now I am in the process of converting my notifications to Slack. Guess what. It is sending two Slack notifications.
After looking at this further, I found that the project is actually executing twice.
The pattern is this:
- Start project
- It spins at the Task Progress saying waiting. But as it is doing that, it is actually executing. I see the files being copied, backed up, all of the tasks in my project, and then a slack notification go out. Once that is done, it then progresses to showing progresses in Task Progress.
- In Task progress, it shows each of the steps, as expected, and does it again. I can see the files copying / backing up, etc… and another Slack notification goes out.
- These are about a minute a part (deployment is about 39-40 seconds each).
Then I can see that BOTH of the deployments are shown under history on the right. One and then the other is exactly the same but says (#2) after it.
I looked at the RAW log and they both have the same task id, e.g. ServerTasks-5210
It is not targeting multiple roles, just a single roll, that server has that roll assigned, so it’s not like it is doing both because of that.
Any ideas? This is NOT good!!!
I think I’ve narrowed this down and it does appear to be a bug…
If the particular component version has never been deployed it works as expected (it deploys 1X).
If you re-deploy the component version, it will deploy it 2X.
I am using channels, not sure if this was introduced with that or if it has been around longer.
Thanks for getting in touch. This is a bit strange as we’ve never seen anything like this previously. That said, we should be able to figure out what is happening.
- How do you trigger your releases/deployments? I see from a previous support ticket that you’re using TFS and utilised Channels and ARC as well. Are you still using ARC or are you using another approach?
- Does the double deployment/slack notification happen when you create a release and deploy it from the Octopus web portal?
NOTE: I closed the duplicate email thread on this issue. I’ll reply here with any suggestions/help.
Looking forward to your reply!
I am not using ARC because when using channels it only supports one channel.
So I’ve created my own ARC process—when the build completes, it calls a Web Service to create and add a NuGet package to Octopus (always did this) and the additional piece it does now is create a release. That works fine, no problems. One Slack or Email notification and it shows the status as it runs. Just like it is supposed to.
The problem is when I create a new release and deploy a previously deployed package, it spins and spins, waiting, but it is actually deploying during that time. I can see files copying, backing u p, and the Slack Notifcation, then the real deployment starts, showing the status during as normal, and again creating a Slack notification. It just executes it 2X.
The WS has nothing to do with this because I am creating the release through Octopus.
The only other thing is I am using channels. It is selecting the correct channel. I have it set to specify a certain Life cycle for each channel.
On a side note, if each channel uses a different life cycle, what am I supposed to select for the Project lifecycle(since it is irrelevant)? What is the impact of what I select? Seems silly to just pick some random (or first) because it is required when it isn’t used.
I sent a Flash video the shows exactly what I’m describing.
I think I may have this figured out. In addition to the ARC, there is a feature on the life cycle phase that is only indicated by a lightning bolt or something. It appears that this represents automatic deployment as well. I think that may have been the issue.
I’ve removed those phases and added back without…I’ll confirm.
My other question (unrelated), though, any thoughts?
If each channel uses a different life cycle, what am I supposed to select for the Project lifecycle(since it is irrelevant)? What is the impact of what I select? Seems silly to just pick some random (or first) because it is required when it isn’t used.
Thanks for the detailed replies. It sounds like you found the issue. My initial suspicion was that there were duplicate releases created but I think you’ve cleared that up. The lifecycle lightning bolt (see Screenshot1 for an example) indicates that Octopus will automatically deploy to the selected environment when you move to that phase. If you had lifecycle phase with an environment with a lightning bolt, this would automatically start a deployment to that environment. If this hasn’t solved your problem, can you attach screenshots of your project process, channels and lifecycle screens? I think that should help us confirm the exact issue.
In regards to your follow-up question, project lifecycles are a bit redundant if you fully utilise channels however we keep them as a safe default. The default lifecycle is also used on the main dashboard to determine which environments to show. It can be handy to have a project lifecycle covering all environments used across different channels so you can easily see what releases are in which environments.
Let me know how you go.