Related command
az webapp webjob triggered run
Describe the bug
Performing az webapp webjob triggered run ... to run a WebJob fails if the WebJob is already running, since the Azure API returns Http 409 Conflict. This is reasonable, but annoying for my use-case. As part of a deployment, I want to make sure that a specific WebJob is run as soon as possible. This WebJob is also on a timer, which causes this deployment pipeline to occasionally fail.
To Reproduce
- Start a triggered WebJob in any way (Portal/Azure CLI etc)
- While the WebJob is still running, trigger it using
az webapp webjob triggered run ...
Expected behavior
Since a Http 409 Conflict response from the Azure API means that the job is already started, I would argue that the Azure CLI command has been successful. Now, I suppose that the running job could be an earlier instance of the job running, which might be unexpected, so it might be considered a breaking change to just blanket ignore if Http 409 is returned. Perhaps a switch parameter potentially named --ignore-already-running or something similar would be a better solution.
Environment summary
azure-cli 2.39.0
Additional context
This behavior today matches the behavior of both the new Az and the legacy azurerm PowerShell modules.
Related command
az webapp webjob triggered runDescribe the bug
Performing
az webapp webjob triggered run ...to run a WebJob fails if the WebJob is already running, since the Azure API returns Http 409 Conflict. This is reasonable, but annoying for my use-case. As part of a deployment, I want to make sure that a specific WebJob is run as soon as possible. This WebJob is also on a timer, which causes this deployment pipeline to occasionally fail.To Reproduce
az webapp webjob triggered run ...Expected behavior
Since a Http 409 Conflict response from the Azure API means that the job is already started, I would argue that the Azure CLI command has been successful. Now, I suppose that the running job could be an earlier instance of the job running, which might be unexpected, so it might be considered a breaking change to just blanket ignore if Http 409 is returned. Perhaps a switch parameter potentially named
--ignore-already-runningor something similar would be a better solution.Environment summary
azure-cli 2.39.0
Additional context
This behavior today matches the behavior of both the new
Azand the legacyazurermPowerShell modules.