-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate conflicting deployments performed when enabling DeployAllMultipleTemplateParameterFiles and ParallelDeployMultipleTemplateParameterFiles #886
Comments
Hi @Xitric thanks for reporting this. I initially had challenges trying to reproduce this result. However I have now succeeded to consistently get the same outcome "duplicate jobs/deployments". I am however only able to reproduce this give a condition which the module does not expect because that would indicate other unexpected environment conditions. Let me explain what I had todo to get here with the settings mentioned in the issue:
From what I am able to deduce at this time it is not a bug, however I am interested in finding out why this happens from time to time in your environment it would be great if we could figure that out. One thing that I can think of as a small compensating factor that would be simple to implement in the module and overcome the scenario I have tested every time, change how we construct the deployment job name. What I discovered during my testing is that due to a small difference in how a What do you think @Xitric should we go for the deployment name logic improvement? |
@Jefajers I will try to create a minimally reproducible example from the accelerator repo using our configurations to hopefully let you reproduce this consistently. Perhaps we have yet another configuration that is causing this, which I have overlooked. I can assure you that we do not have any lingering parameter conversion files in git. |
Thanks it would be very valuable to understand the given situation I appreciate your assistance🤓. |
@Jefajers I got a lot closer to what is causing this issue for us. Here is what I did:
If I disable If I rename the files to something like this, the issue also ceases to occur and only one deployment is performed:
So it has something to do with how we name our templates and parameter files, and how AzOps interprets that. Creating a file |
Hi again @Xitric, thanks given the above scenario I am now able to reproduce the result without any unexpected manipulation 😌. I have an ide of how to combine the previous suggestion of streamlining the deployment name together with further validations to not only get the expected amount of deployments but even more importantly I think we might have an additional issue that could result in template pairs not even changed in the PR could be queued up for deployment which is never expected to happen. Will update this issue with associated PR once I have a more complete suggestion of a fix 🚑. |
Describe the bug
In our AzOps repository, we have enabled both
AllowMultipleTemplateParameterFiles
,DeployAllMultipleTemplateParameterFiles
andParallelDeployMultipleTemplateParameterFiles
. This works great the majority of the time, but sometimes it causes deployments to fail.Firstly, we noticed that the validation pipeline would report the What-If results on our deployments twice:
In the pipeline output we can also see that it is processing a separate deployment for both the template and the parameter file:
Sometimes this succeeds, and other times it fails with the error:
In the case described above, only the Bicep template was modified and not the corresponding parameter file.
Importantly, it should be noted that so far, we have only observed this behaviour when we have a 1-1 relationship between Bicep templates and parameter files. We perform a large number of deployments where we have numerous parameter files per Bicep template, and in these cases we haven't observed duplicate deployments.
TL;DR: If we change a Bicep template that is associated with multiple parameter files, deployments are only processed for the parameter files and not the Bicep template itself. If we change a Bicep template that is associated with a single parameter file, deployments are only processed for both the parameter file and the Bicep template itself.
Steps to reproduce
AllowMultipleTemplateParameterFiles
,DeployAllMultipleTemplateParameterFiles
andParallelDeployMultipleTemplateParameterFiles
ThrottleLimit
is at least 2The text was updated successfully, but these errors were encountered: