Azure-Player / azure.datafactory.tools

Tools for deploying Data Factory (v2) in Microsoft Azure
https://azureplayer.net/adftools
MIT License
209 stars 69 forks source link

No retries on REST API time-outs #295

Open unboiled opened 1 year ago

unboiled commented 1 year ago

Describe the bug Recently the ADF REST API seems to time-out frequently, causing the deployment to fail. While API time-outs are a Microsoft issue, I do think a retry on the API calls should be essential. For me this is happening multiple times a day now.

Since ADF is only a rather small part of the deployment, having to re-run the whole thing for multiple projects at a time can be quite daunting.

I do would understand if you'd see this as an enhancement rather than a bug though. Please let me know how you see this issue!

To Reproduce N/A, intermittent issue with Microsoft

Expected behaviour When an API time-out occurs, the script should re-attempt the API call a few times, up to a configurable amount. This prevents deployments to fail.

Screenshots image

Version of PowerShell module of:

Provide all files to reproduce the issue

2023-03-29T08:40:02.1628240Z Start deploying object: [pipeline].[pipeline_name] (2 dependency/ies)
2023-03-29T08:41:42.3155920Z New-AzResource : Operation failed because a request timed out.
2023-03-29T08:41:42.3158039Z At /home/AzDevOps/.local/share/powershell/Modules/azure.datafactory.tools/0.101.0/private/Deploy-AdfObjectOnly.ps1:135 char:13
2023-03-29T08:41:42.3159873Z +             New-AzResource `
2023-03-29T08:41:42.3196750Z +             ~~~~~~~~~~~~~~~~
2023-03-29T08:41:42.3204598Z + CategoryInfo          : CloseError: (:) [New-AzResource], Exception
2023-03-29T08:41:42.3205922Z + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceCmdlet
2023-03-29T08:41:42.4383179Z ##[error]Script failed with exit code: 1