-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Azure Bicep Deployment Issues #26752
Comments
@oZakari Please set
before you run the cmdlet and collect the debug |
Hi @msJinLei, here you go. Above this are just bunch of other similar types of warnings for the policy deployments
|
@msJinLei - based on the discussion in this thread, it looks like the issue was introduced in Azure PowerShell 13. Is it possible this was introduced due to a change in some of the core components in Azure PowerShell? I am not sure that we have made many (or any) changes to the cc @jeskew / @anthony-c-martin |
@tsmallig33 - I think this is related to #26732. Looks like the error being returned in the error ("Received unexpected type Newtonsoft.Json.Linq.JObject") is coming from this code path, though it's not clear why: azure-powershell/src/Resources/ResourceManager/SdkClient/NewResourceManagerSdkClient.cs Line 498 in 1bbb74d
|
I believe the PR is not released yet. Please correct me if anything incorrect @VeryEarly |
I think this was the PR where the deployments SDK was updated which looks to be related: #26507 |
We don't upgrade newtonsoft json library recently. Could you take a look? |
* Fix Deployment Type Issue #27652 * Update to JObject * Update to only deserialize DeploymentExtended * Remove unused method --------- Co-authored-by: Tate Smalligan <[email protected]>
* Fix Deployment Type Issue #27652 * Update to JObject * Update to only deserialize DeploymentExtended * Remove unused method --------- Co-authored-by: Tate Smalligan <[email protected]>
Fixed by #26776 |
+1 |
Hi, We have a similar error message only difference being we are using template spec. Support ticket 2411250050002160 is also raised for this from last 10 days. I see that a PR is merged to fix this. The PR contains changes in Az.Resources and it is version is updated to 7.7.0. I see that our deployment is still failing even after using az.resources of 7.7.0. |
We are also facing the same issue as of yesterday (12/3/2024) for APP services, SQL Server and Front door deployment. Sometime rerun works, but most of the time it fails. |
I apologize for the problems this is causing. The fix has been checked in, and will be available in the next release of Azure PowerShell. @Azure/azure-powershell-team should be able to share an ETA. Until then, the only workaround I can recommend is to downgrade to the previous working version (12.5.0). The problem is innately non-deterministic; it may succeed always, sometimes or never, but chance of failure is likely higher with more complex deployments. |
note you do not have to downgrade to 12.5.0 fully. You could downgrade az.resources to 7.6.0 only and all other modules to be on the latest. |
Description
Bug Report: Azure PowerShell Version 13.0.0 Causes Deployment Failures in ALZ-Bicep
Description:
Using Azure PowerShell version 13.0.0 has led to multiple reports of ALZ-Bicep deployment failures in both Azure DevOps pipelines and GitHub Actions workflows, where the latest version is specified. The issue is also reproducible in local environments.
The problem appears to impact specific modules within the ALZ-Bicep framework. In particular, I have confirmed failures when deploying the ALZ Default Policy Assignments module.
The following error is encountered during deployment:
Error: Code=; Message=Received unexpected type Newtonsoft.Json.Linq.JObject
.Note: For the failing deployment, we do load in a json file using the Bicep function: loadJsonContent
Workaround:
Pinning Azure PowerShell to version 12.5.0 or 12.4.0 resolves the issue.
Impact:
This issue affects deployments in:
Initial Reports of Error Here: Azure/ALZ-Bicep#907
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: