text:
Unable to deploy the application even after having Azure OpenAI subscription

Please provide us with the following information:

This issue is for a: (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Working on a Mac Os Sonoma. Followed the steps given in the readme file.
azd auth login
azd init -t azure-search-openai-demo
azd up
Any log messages given by the failure

ERROR: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:
Deployment Error Details:
InvalidTemplateDeployment: The template deployment 'openai' is not valid according to the validation procedure. The tracking id is ' '. See inner errors for details.
SpecialFeatureOrQuotaIdRequired: The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI' or contains blocked QuotaId/Feature.
Expected/desired behavior

I requested for an Azure OpenAI subscription and got it yesterday night. The application should be deployed properly. I have no other application running and purged the old one.
Deployed it in the Azure location to use: 34. (Europe) West Europe (westeurope)
and 'openAiResourceGroupLocation' infrastructure parameter: as 3. (Europe) France Central (francecentral)
Note: I had an Azure OpenAI access for the same subscription id as the current one. But that got accidentally deleted.
OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Mac Os Sonoma
azd version?

run azd version and copy paste here.

azd version 1.5.0
Versions

Mention any other details that might be useful
With the previous OpenAI access, I successfully deployed it.

Thanks! We'll be in touch soon.

I have the exact scenario same problem
I got it working the first time. Then when I was done, I ran azd down --purge.
Afterwards when trying to setup the whole thing again, I keep getting the same error as @varunr02 got.
I tried restarting from scratch with completetly new environment, purge anything existing etc etc, but still no luck.
I tried applying for a new openAI subscription but still the same error.
I also tried different regions (us east, north europe etc).

I deleted the entire folder and created a new one. Now I'm getting this error.
ERROR: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:
Deployment Error Details:
InvalidTemplateDeployment: The template deployment 'appserviceplan' is not valid according to the validation procedure. The tracking id is ' '. See inner errors for details.
ValidationForResourceFailed: Validation failed for a resource. Check 'Error.Details[0]' for more information.
SubscriptionIsOverQuotaForSku: This region has quota of 0 instances for your subscription. Try selecting different region or SKU.
InvalidTemplateDeployment: The template deployment 'openai' is not valid according to the validation procedure. The tracking id is ' '. See inner errors for details.
SpecialFeatureOrQuotaIdRequired: The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI' or contains blocked QuotaId/Feature.

@PhilipNgo @varunr02  Are you able to create new OpenAI deployments in the Portal for gpt-3.5 turbo 0613 and text-embedding-ada-002 for the given region?

This is showing when selecting the region in the Instance Details except for North Italy:
The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI' or contains blocked QuotaId/Feature.
But North Italy is not there in the list of available openAiResourceGroupLocation (in terminal when using azd up)
Also, I'm currently using the $200 credit I got when opened a new account.

Hm, so you're saying that North Italy is the only region where you're able to create OpenAI resources? We don't have that enabled for the picker since it's not listed here: https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models
You can manually change infra/main.bicep openAiResourceGroupLocation to include "northitaly" if you think it'd work for you.
I think you may run into other issues if you're on the Azure free tier, but I'd like to make that work, so we can try to work through those.

I added northitaly to the resource group but it didn't show up in the terminal. I have added the screenshots of my entire process.
Is there any other way I can make this work? It worked fine for me last week. But I accidentally deleted something and had to request again for OpenAI access. Even after getting the access, it's not working.

Any update on this @pamelafox?

authors: PhilipNgo VioletPhilipN pamelafox varunr02

repo: Azure-Samples/azure-search-openai-demo


text:
Speech to Text profanity_filter "Raw" mode not available?

I'm running the sample code in Python for transcribing one blob. Both "Masked" and "Removed" options are working, but "Raw" is considered a bad request.
If this is by design, can we have the documentation reflect that?

The value to request no masking of profanity is None.
From the docs here:

Accepted values are None to disable profanity filtering, Masked to replace profanity with asterisks, Removed to remove all profanity from the result, or Tags to add profanity tags. The default value is Masked.

Closed as answered, please open a new issue if more support is needed.

source: gharchive/issue

authors: Mirrorzoom chlandsi pankopon

license: MIT

license_type: permissive

license_source: github-api


text:
Container app fails to start after azd up

Please provide us with the following information:

This issue is for a: (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

azd init -t hello-azd
azd up
Navigate to container app endpoint

Any log messages given by the failure

Expected/desired behavior
Container app endpoint should be accessible
OS and Version?

Windows 11

Versions

azd version 1.10.4 (commit 5e0b2d56a99bae47a607fa08506da31180bdf540)

Mention any other details that might be useful

Thanks! We'll be in touch soon.

I can take a look at this.
It seems that one of the environment variables STORAGE_URL isn't being set on the container, which prevents the app from starting up in Program.cs:
https://github.com/Azure-Samples/hello-azd/blob/0d98445617a95778e9407d31e4834e779c09130b/src/Program.cs#L17

repo: Azure-Samples/hello-azd


text:
API Doesn't build w/ Microsoft.Identity.Web >=1.x

Please follow the issue template below. Failure to do so will result in a delay in answering your question.

Library

[ ] msal@1.x.x or @azure/msal@1.x.x
[x] @azure/msal-browser@2.4.0

Important: Please fill in your exact version number above, e.g. msal@1.1.3.
Framework
.NET Core 3.1
Description
API Won't build
Error Message
'AuthenticationBuilder' does not contain a definition for 'AddMicrosoftIdentityWebApi' and no accessible extension method 'AddMicrosoftIdentityWebApi' accepting a first argument of type 'AuthenticationBuilder' could be found (are you missing a using directive or an assembly reference?)
Security

[ ] Is this issue security related?

Regression

[ ] Did this behavior work before?

Yes
Version:
MSAL Configuration
// Provide configuration values here.
// For Azure B2C issues, please include your policies.

Reproduction steps
// Provide relevant code snippets here.
// For Azure B2C issues, please include your policies.

Expected behavior
Browsers/Environment

[x] Chrome
[ ] Firefox
[x] Edge
[ ] Safari
[ ] IE
[ ] Other (Please add browser name here)

@Alfetta159 I'm unable to reproduce this. Are you sure all the packages are installed? Would you mind sharing your ProfileAPI.csproj?

@Alfetta159 : would it be a long path issue? : you might want to clone the repo close to the root of your hard drive (assuming this windows machine)

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <UserSecretsId>aspnet-ProfileAPI-03230DB1-5145-408C-A48B-BE3DAFC56C30</UserSecretsId>
    <WebProject_DirectoryAccessLevelKey>0</WebProject_DirectoryAccessLevelKey>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.9" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.9" Condition="'$(Configuration)' == 'Debug'" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.9" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.9" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.9" />
    <PackageReference Include="Microsoft.Identity.Web" Version="1.2.0" />
    <PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="1.2.0" />
  </ItemGroup>

</Project>

Moved it here: C:\ms-id-react-spa-webapi-obo , but no change.

A few things got me thinking:

I found it hard to believe that you guys would publish code that isn't working.
@jmprieur 's comment, "assuming that it's a Windows machine" made me try it on a Linux box that I have laying around. Works.
I saw this same error in other projects of my own.
Commit d5761362 works (i.e. Microsoft.Identity.Web 0.4.0)

So I looked in the object explorer for the method that was giving me the issue (AddMicrosoftIdentityWebApi), and OE was telling me that it was from a library based on .NET Core 2.2. So it's probably referring to an old package that I made myself a while ago which I had purged from my own NuGet server and pretty much all of my code.
To fix:

Deleted any folders referring to this package in C:\Users{me}.nuget\packages
Did a super-clean build (i.e. manually deleted build folders)

And it works.
And that's what I get for hi-jacking someone else's namespace.

authors: Alfetta159 derisen jmprieur


text:
Capture subnet reconciliations

Which issue this PR addresses:
https://issues.redhat.com/browse/ARO-2113
What this PR does / why we need it:
We wanna have a metric that shows if the subnet nsg controller is in the infinite loop. You can find more details in the JIRA ticket description.
Test plan for issue:
E2Es (are updated in this PR)
Is there any documentation that needs to be updated for this PR?

/azp run

/azp run

/azp run

/azp run

source: gharchive/pull-request

repo: Azure/ARO-RP


text:
Download and install mirror-proxy and overlaybd components for artifact streaming (not enabled)

What type of PR is this?
/kind feature

What this PR does / why we need it:
This is to download and install ACR's mirror-proxy and overlaybd components but not enable any of the systemd units corresponding to it. This is for Artifact Streaming on AKS.
Which issue(s) this PR fixes:

Fixes #
Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Pull Request Test Coverage Report for Build 4919878763

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 61.933%

Totals

Change from base Build 4916710050:
0%

Covered Lines:
2538

Relevant Lines:
4098

💛  - Coveralls

repo: Azure/AgentBaker


text:
fix: fix the issue in downloading windows e2e logs

What type of PR is this?

What this PR does / why we need it:
fix the issue in downloading windows e2e logs
Which issue(s) this PR fixes:

Fixes #
Requirements:

[x] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Pull Request Test Coverage Report for Build 9708046518
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 70.486%

Totals

Change from base Build 9707744418:
0.0%

Covered Lines:
2627

Relevant Lines:
3727

💛  - Coveralls

Pull Request Test Coverage Report for Build 9708088005
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 70.486%

Totals

Change from base Build 9707744418:
0.0%

Covered Lines:
2627

Relevant Lines:
3727

💛  - Coveralls

authors: AbelHu coveralls


text:
Don't encourage Automatic deletion of head branches, as people can break AzOps-pull action when PR merging

Describe the bug
We should not encourage automatically removing feature branches, as it can make PR merging fragile and beak the AzOps-pull action
Steps to reproduce

Proceed as explained in step 9 (Automatically delete head branches )
Later, when merging a PR, click on Merge, then ignore the warning about an Action haven't finished validations and proceed with merging the PR. Because the Action can take a couple minutes, people will click first the green Merge PR button, then ignore the warning about the actton and click on the now grey Merge PR button.
The branch will be automatically deleted from github, and the AzOps-pull action will fail with "Checking out existing local branch (branchname)
The Action fails and the PR is not taking into consideration, leaving a stale JSON file unprocessed in the Main branch

Screenshots

Screenshot for Context

I think this is what is happening to me. I pushed my branch and created a PR. The merge button was green
Now I get an error that the push action can't find the local branch "policy-assignment-vwan"

I think this is what is happening to me. I pushed my branch and created a PR. The merge button was green
Now I get an error that the push action can't find the local branch "policy-assignment-vwan"

Closing this issue as we've had a major overhaul of the AzOps engine and the implementation of the tool. Please visit the (AzOps-Accelerator)[https://github.com/Azure/AzOps-Accelerator] for more information.

authors: adamlash jstabl ljtill marcosgm

repo: Azure/Enterprise-Scale


text:
Is it possible to run the publisher as a standalone module?

We want to run a small and scalable environment. But we only need the twin and publisher module to communicate with a robot.
With the legacy mode, we can configure the publisher on the machine with the modules, and the twin module is recovering a C2D method request for reading values.
So is it possible or what is the minimum amount of resources to run the publisher? Where is it documented? I can see in the code the C2D methods are removed in the new version.
As I read it the publisher is getting is configuration from the CosmosDB?

We are currently planning a fully contained Edge hosting option for the entire platform.   Tentative for 3.0.
At this point, publisher can either be configured via publishednodes.json file or via the API (and thus CosmosDB).

hi Andreas, I'm the PM helping to coordinate our roadmap, and I'd like to better understand your requirements so we can capture them and align them with our roadmap (potentially for 3.0, as Marc called out). If you would like to hop on a call to chat, send me an email at rowwu@microsoft.com

Duplicate: #464

Standalone mode is supported from V2.7 onwards and documented in our Ops manual, please try our latest version (2.7.183).

authors: AndreasDpWD barnstee marcschier rowenwu

repo: Azure/Industrial-IoT


text:
Please add plan parameter to policy "ASC-AzureDefender-for-Servers.json"

Is your feature request related to a problem? Please describe.
MDFC for servers now has 2 sub plans.  I would like to specify which plan, rather than it defaulting to Plan 2.
Describe the solution you'd like
Please add a parameter of Plan with the options of Plan 1 and Plan 2
Describe alternatives you've considered
Perhaps I can set this with API or something, our organization is too large to manage in the GUI.
Additional context
New feature released 04/2022.

Hi @CodyDelcambre, here is the link about Microsoft Defender for Servers plan: https://docs.microsoft.com/en-us/azure/defender-for-cloud/defender-for-servers-introduction#what-are-the-microsoft-defender-for-server-plans.

Thanks @ShaykeAmar , I have read it and it is informative.  I am trying to understand why you've posed this.  Have I missed something in that article which could help me not need this policy amended?

ASC-AzureDefender-for-Servers.json to be modified with a parameter option to select Plan 1 / Plan 2,  instead of default to Plan2
To be reflected in "Configure Azure Defender for servers to be enabled" Builtin Policy

@vapasula Thanks!

Hi @vapasula, the built-in policy does not appear to have a parameter exposed to set the plan tier. Is this something that is still planned to be included in the future?

authors: CodyDelcambre ShaykeAmar oZakari vapasula

repo: Azure/Microsoft-Defender-for-Cloud


text:
pki: remove wildcard from subject alt names

This PR is designed to remove the wildcard FQDN from the end of the subjectAltNames in the APIServer certificate.  I was tempted to change some of the calling code to make the intent more clear, but opted for the 1-line change instead.
This PR resolves the following pyopenssl error:
WARNING:requests.packages.urllib3.contrib.pyopenssl:A problem was encountered with the certificate that prevented urllib3 from finding the SubjectAlternativeName field. This can affect certificate validation. The error was Codepoint U+002A at position 1 of '*' not allowed
/usr/local/lib/python3.5/dist-packages/requests/packages/urllib3/connection.py:337: SubjectAltNameWarning: Certificate for 10.0.0.1 has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
ERROR:requests.packages.urllib3.connection:Certificate did not match expected hostname: 10.0.0.1. Certificate: {'subject': ((('commonName', 'apiserver'),),), 'subjectAltName': []}
ERROR There was a problem retrieving data from the Kubernetes API server. URL: https://10.0.0.1:443/api/v1/namespaces/test-288243432, params: {}
ERROR:scheduler:There was a problem retrieving data from the Kubernetes API server. URL: https://10.0.0.1:443/api/v1/namespaces/test-288243432, params: {}

Hi @gabrtv, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

@anhowe I went with option 1 since FQDN is not used anymore. PTAL. Thanks!

authors: gabrtv msftclas

repo: Azure/acs-engine

license: mit

license_source: bigquery


text:
Added flag to use kubelogin in non-admin user scenario and updated readme to reflect changes

In response to: https://github.com/Azure/aks-set-context/issues/25

Still need to update action.yml

repo: Azure/aks-set-context


text:
Added support for Azure China and Azure US Gov

Added support for Azure China and Azure US Gov.

This will close https://github.com/Azure/aml-workspace/issues/18#issuecomment-650318246

repo: Azure/aml-registermodel


text:
Ashishonce/integration tests

adding the draft pull request here, try to find a way for cleanup task but that will be added in later iteration

@marvinbuss , please add azure credentials to this repository so the workflow can proceed.

@ashishonce Did you remove the tests, where a new resource group gets created?

@ashishonce Did you remove the tests, where a new resource group gets created?
Would be great if we could add integration tests for the first Action.
Great work

the integration test first adds a workspace and if resource group doesn't exisit it will get created.
check test_workspace.json file, it has create workspace flag enabled.

authors: ashishonce marvinbuss

repo: Azure/aml-workspace


text:
[BUG] When running extractor for OAS version 3 Json it is converting boolean values to string

Release version
4.0.3
Describe the bug
When running extractor pipeline with option OAS v3 json, specification.json generated will convert the boolean values to string which causing linting failed.
Expected behavior
boolean values should not converted to string.
example: expected result
"required" : true
generated specification result:
"required" : "true"
Actual behavior
generated specification result:
"required" : "true"
`"delete": {
"tags": [
"OptIn"
],
"summary": "Delete Opt-In",
"description": "Delete Opt-In status for a user. Resets them to not opted in.",
"operationId": "delete-users-userid",
"parameters": [
{
"name": "userId",
"in": "path",
**

"required": "true",

**
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Deleted Opt-In Data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OptInData"
},
"example": {
"userId": "string"
}
}
}
},`
Reproduction Steps
Run extractor pipeline with the generator option OpenAPIV3Json and analyse the specification.json.
83:11    error  path-params               Path parameter "userId" must have "required" property that is set to "true".                                                                                paths./AccountLinks/{userId}/accounts/{accountNumber}.get.parameters[0]   87:25    error  oas3-schema               "required" property must be equal to one of the allowed values.                                                                                paths./AccountLinks/{userId}/accounts/{accountNumber}.get.parameters[0].required   87:25    error  oas3-schema               "required" property type must be boolean.                                                                                paths./AccountLinks/{userId}/accounts/{accountNumber}.get.parameters[0].required

A few questions:

How did you create the initial API in the portal that you then extracted? Did you import a specification file?
Can you attach the full extracted specification.json (with sensitive information scrubbed)? The JSON in your issue isn't formatted correctly.

APIM is showing correct specification with no quote to boolean values.
When running extractor it will generate with quote. Find attached specification file. Search for "required" field. All the boolean are quoted. i.e "true".
Also this is happening with the integer values as well. You can find it in the same file.

Try to open the attached file in VS code with and check with spectral extension. same errors will be shown.
specification.json

it is not allowing me to upload json.

it is not allowing me to upload json.

You can create a new GitHub repository or fork this one, then upload the json file to your new repository.

@guythetechie it is still generating the same specification. Boolean values with quotes.

@mihirsurting - the fix has been deployed to the main branch. It will be in the next release (tomorrow, probably).

@guythetechie/ @waelkdouh, is there any timeline when build happened for new changes to reflect. TIA

As @guythetechie mentioned he is working on releasing today hopefully.

Fix pushed in latest release.

authors: guythetechie mihirsurting waelkdouh

repo: Azure/apiops


text:
Microsoft.Compute/VirtualMachines.properties.diagnosticsProfile.bootDiagnostics.storageUri

Describe the noise
Resource type
Microsoft.Compute/VirtualMachines
apiVersion (i.e. 2019-04-01)
2019-07-01
Client (PowerShell, Azure CLI, or API)
Powershell
Relevant ARM Template code (we only need the resource object for the above resourceType and apiVersion, but if it's easier you can include the entire template
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "enabled": true,
            "storageUri": "[
              reference(
                resourceId(
                  'Microsoft.Storage/storageAccounts', parameters('storageAccountName')
                )
              ).primaryEndpoints.blob
            ]"
          }

**Expected response
No noise once deployed
Current (noisy) response (either include a screenshot of the what-if output, or copy/paste the text)

Additional context
Doesn't appear to be resolving the reference prior to doing whatif comparison. It should resolve the reference prior to compare.

Closing as duplicate of #83

authors: JustinGrote alex-frankel

repo: Azure/arm-template-whatif


text:
Generate better common property docs

Java: https://github.com/Azure/azure-sdk-for-java/blob/master/azure-eventgrid/src/main/java/com/microsoft/azure/eventgrid/EventGridClient.java#L76
Ruby: https://github.com/Azure/azure-sdk-for-ruby/blob/master/data/azure_event_grid/lib/2018-01-01/generated/azure_event_grid/event_grid_client.rb#L23
Node: https://github.com/Azure/azure-sdk-for-node/blob/master/lib/services/eventgrid/lib/eventGridClient.js#L183

I hope this automatically publishes; otherwise, I'll have to go do it manuall (autorest.common is a pain)

It did publish! Wheee!
https://www.nuget.org/packages/Microsoft.AutoRest.Common/2.4.47

authors: fearthecowboy jianghaolu


text:
Question : How to call RestClient with V3 ?  migrate v2 to v3

hello
I was using Autorest.csharp to generate my client libraries from an AzureDevOps pipeline.
I am on version 2, I wanted to upgrade to version 3.
But I don't understand how to use the library, as the client classes are internal, and the client class constructor has techinqual objects like ClientDiagnostics, or HttpPipeline that I can create.
Do you have an example for calling autogenerated lib ?
Thx

The general pattern is to either use public-clients option or wrap them in a higher level "convenience layer", such as this.

authors: auriou chamons


text:
CI azure-sdk-for-python-track2 fails with npm version error?

https://github.com/Azure/azure-rest-api-specs-pr/pull/15061/checks?check_run_id=17055799343
❌Code Generator Failed [Logs] Generate from 02d7c2df491cbf7d1f61b58743d0002be9091978. SDK Automation 14.0.0
command	sh scripts/automation_init.sh ../azure-sdk-for-python-pr_tmp/initInput.json ../azure-sdk-for-python-pr_tmp/initOutput.json
cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
command	sh scripts/automation_generate.sh ../azure-sdk-for-python-pr_tmp/generateInput.json ../azure-sdk-for-python-pr_tmp/generateOutput.json
cmderr	[automation_generate.sh]  notice
cmderr	[automation_generate.sh] npm notice New major version of npm available! 9.6.7 -> 10.1.0
cmderr	[automation_generate.sh] npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.1.0
cmderr	[automation_generate.sh] npm notice Run npm install -g npm@10.1.0 to update!
cmderr	[automation_generate.sh] npm notice
cmdout	[automation_generate.sh] [Autorest]/mnt/vss/_work/1/s/azure-sdk-for-python-pr_tmp/venv-sdk/auto_temp.json does not exist!!!Error happened during codegen
error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-python-pr]: sh scripts/automation_generate.sh
warn	Skip package processing as generation is failed

@DevArjun23 closing because the npm issue has been mitigated


text:
New Recipes + Bug Fixes + Code Clean-Up | 26 September 2024

List of Changes in this PR:
New Recipes:

Added recipe to convert com.azure.core.http.policy.HttpLogOptions to io.clientcore.core.http.models.HttpLogOptions

Added recipe to convert com.azure.core.http.HttpHeaderName to io.clientcore.core.http.models.HttpHeaderName

Added recipe to convert com.azure.core.util.CoreUtils to com.azure.core.v2.util.CoreUtils

Added recipe to convert com.azure.core.http.policy.KeyCredentialPolicy to io.clientcore.core.http.pipeline.KeyCredentialPolicy

Added recipe to convert com.azure.core.credential.KeyCredential to io.clientcore.core.credential.KeyCredential

Added recipe to convert com.azure.core.client.traits.KeyCredentialTrait to io.clientcore.core.models.traits.KeyCredentialTrait

Added recipes to convert HttpTrait Builder methods:

Added recipes to convert Builder API methods (retryOptions, pipeline, addPolicy)
Added recipes to convert HttpClient, HttpPipeline, and HttpPipelinePolicy types

Added org.openrewrite.java.OrderImports recipe to match import order in v2 sample app

Other Changes and Fixes:

Removed any usages of star (*) imports

Removed unused imports

Fixed a bug where imports and variable declarations of FixedDelayOptions would stay, even after applying the migration recipes

Added unit tests for all of the new recipes

Fixed bug where ParameterizedType import was added incorrectly like so: importjava.lang.reflect.ParameterizedType

resolves #3
resolves #2
resolves #17
Adding the following "resolves" statements to this PR's description as they were missing on the description of PR #12:
resolves #5
resolves #8
resolves #9

Removed space in the check for importQualid

repo: Azure/azsdk-java-rewrite-recipes


text:
handle resource group errors and create it

Description
PR aims to:

Extract logic to create a resource group, so it can be reused when need to create Azure Resource Group.
On the create workload cluster method, updates the way to handle case where we fetch for not existing resource group and will raise an exception that we were not properly catching and will try to create Azure Resource Group.

History Notes

This checklist is used to make sure that common guidelines for an Azure CLI pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.
[ ] I adhere to the Command Guidelines.
[ ] I adhere to the Error Handling Guidelines.

Currently, the PR will remove creating Resource group if not found as CAPZ will do so for us.
But the method to create Resource group will stay as will be used for creating AKS management cluster
The UX flow for this is as follows:
If users runs az capi create -g <resource-group-name> and it is found will inform the user if they want to create cluster in specified group otherwise exit
if the not group variable specified or not found: It will inform the user if that no resource group found but CAPZ will create one.

repo: Azure/azure-capi-cli-extension


text:
[WindowsIoT] Add new extension to support windows iot

Add windowsiot extension.
Related swagger repo Aztorest.Az scripts: https://github.com/Azure/azure-rest-api-specs/pull/13634
Cli commands: az windows-iot-services create/list/show/update/delete

This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines

[ ] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
[ ] Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

WindowsIoT

authors: evelyn-ys yonzhan

repo: Azure/azure-cli-extensions


text:
az acr login - NotImplementedError: APIVersion 2019-12-01-preview is not available

This is autogenerated. Please review and update as needed.
Describe the bug
Logging into ACR isn't working due to API Version Error
Command Name
az acr login
Errors:
APIVersion 2019-12-01-preview is not available
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
    raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 711, in _run_job
    six.reraise(*sys.exc_info())
...
cli/command_modules/acr/_client_factory.py, ln 19, in cf_acr_registries
    return get_acr_service_client(cli_ctx).registries
azure/mgmt/containerregistry/container_registry_management_client.py, ln 208, in registries
    raise NotImplementedError("APIVersion {} is not available".format(api_version))
NotImplementedError: APIVersion 2019-12-01-preview is not available

To Reproduce:

az acr login -n {}

Expected Behavior
Environment Summary
Linux-4.15.0-1082-azure-x86_64-with-debian-stretch-sid
Python 3.6.9
Installer: PIP

azure-cli 2.6.0 *
azure-cli-ml 1.5.0

Extensions:
azure-cli-ml 1.5.0

Additional Context

acr

@ezwiefel can you please help me with registry name and registry location.

@jikuma I don't remember which registry name and location were causing the issues

This is a setup issue, not ACR issue. In short, the azure-mgmt-containerregsitry was not pulled down. @ezwiefel, please tell us how you installed the CLI.
@fengzhou-msft

@yugangw-msft I believe it was the default installation on the Azure Machine Learning Compute Instance

@ezwiefel can you run pip show azure-mgmt-containerregistry to check the version?

Hi, I get the same error during az acr login --name name while running it on jupyter terminal of my compute instance.
Any workaround?
@fengzhou-msft
Here is the version of container registry-
The
azureuser@dockertest4:/mnt/batch/tasks/shared/LS_root/mounts/clusters/dockertest4/code$ pip show azure-mgmt-containerregistry
Name: azure-mgmt-containerregistry
Version: 2.8.0
Summary: Microsoft Azure Container Registry Client Library for Python
Home-page: https://github.com/Azure/azure-sdk-for-python
Author: Microsoft Corporation
Author-email: azpysdkhelp@microsoft.com
License: MIT License
Location: /anaconda/envs/azureml_py36/lib/python3.6/site-packages
Requires: azure-common, msrest, msrestazure
Required-by: azureml-core, azure-cli

This is still an issue on compute instances. I have it working on my mac. I tried update to latest az cli and az ml cli and also updating pip azure -mgmt-containerregistry and still have the same issue.
az acr login --name amldbxsummitf07c5365
The command failed with an unexpected error. Here is the traceback:
APIVersion 2019-12-01-preview is not available
Traceback (most recent call last):
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 654, in execute
raise ex
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 718, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 711, in _run_job
six.reraise(*sys.exc_info())
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 688, in _run_job
result = cmd_copy(params)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 325, in call
return self.handler(*args, **kwargs)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/init.py", line 779, in default_command_handler
return op(**command_args)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/custom.py", line 236, in acr_login
password=password)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/_docker_utils.py", line 417, in get_login_credentials
is_login_context=True)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/_docker_utils.py", line 310, in _get_credentials
registry, resource_group_name = get_registry_by_name(cli_ctx, registry_name)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py", line 107, in get_registry_by_name
client = cf_acr_registries(cli_ctx)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/_client_factory.py", line 19, in cf_acr_registries
return get_acr_service_client(cli_ctx).registries
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/mgmt/containerregistry/container_registry_management_client.py", line 208, in registries
raise NotImplementedError("APIVersion {} is not available".format(api_version))
NotImplementedError: APIVersion 2019-12-01-preview is not available
To open an issue, please run: 'az feedback'

I would like to confirm that this is still an issue

Please try this workaround.

hi @ezwiefel does above solution work for you? let us know how it works. it's an issue of specific version of azure cli, fixed in latest releases.

authors: azeltov ezwiefel fengzhou-msft harshbangad hermandr jikuma yonzhan yugangw-msft yungezz

repo: Azure/azure-cli


text:
az keyvault create --network-acls* should work with --bypass or --default-action

This is autogenerated. Please review and update as needed.
Describe the bug
When you specify network ACLs using --network-acls, --network-acls-ips or --network-acls-vnet those parameters are ignored if you also add either the parameter --bypass or --default-action.
As we usually add network ACLs because we want to deny access not specified the current implementation doesn't allow us to do this. Those 3 parameters should always be parsed.
Command Name
az keyvault create
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az keyvault create --name {} --resource-group {} --subscription {} --location {} --enable-soft-delete {} --network-acls-vnets {} --default-action {}

Expected Behavior
Environment Summary
Windows-10-10.0.16299-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.10.0

Extensions:
application-insights 0.1.1
azure-devops 0.17.0
blueprint 0.1.0

Additional Context

Hi @bim-msft , could you please help have a look ? Thanks

authors: arrownj qetza


text:
cant run az iot hub list

Legacy CLI not installed
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az iot hub list
Errors:
No module named 'azure.mgmt.iothub.iot_hub_client'
Traceback (most recent call last):
python3/dist-packages/knack/cli.py, ln 206, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 608, in execute
    raise ex
cli/core/commands/__init__.py, ln 666, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 659, in _run_job
    six.reraise(*sys.exc_info())
...
cli/core/commands/__init__.py, ln 306, in __call__
    return self.handler(*args, **kwargs)
azure/cli/core/__init__.py, ln 484, in default_command_handler
    client = client_factory(cmd.cli_ctx, command_args) if client_factory else None
cli/command_modules/iot/_client_factory.py, ln 9, in iot_hub_service_factory
    from azure.mgmt.iothub.iot_hub_client import IotHubClient
ModuleNotFoundError: No module named 'azure.mgmt.iothub.iot_hub_client'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az iot hub list

Expected Behavior
Environment Summary
Linux-5.8.0-53-generic-x86_64-with-glibc2.29
Python 3.8.5
Shell: bash

azure-cli 2.0.81

Extensions:
azure-iot 0.9.7
azure-devops 0.17.0

Additional Context

Found a work-around. CLI was installed with apt install azure-cli. Removed, and re-installed with pip install azure-cli


text:
Command not working anymore within python script, but still working with cli

Describe the bug
Command Name
az network vnet list
Errors:
The credential data used by CLI has been expired because you might have changed or reset the password. Please clear browser's cookies and run 'az login'

To Reproduce:
Script to reproduce the behavior.
#!/usr/bin/python3
from azure.cli.core import get_default_cli

def azurer(args_str):
    args = args_str.split()
    cli = get_default_cli()
    cli.invoke(args)
    return cli.result.result

subscriptions = azurer("account list")
for s in subscriptions:
    vnets = azurer("network vnet list --subscription " + s['name'])
    if type(vnets) == dict:
        for v in vnets:
            print(v['name'])

Expected Behavior
Last time I used this script (some weeks ago) it was working fine.
Also, the same command (network vnet list --subscription xxxxxx) executed from the CLI is still working fine.
Environment Summary
Linux-4.4.0-19041-Microsoft-x86_64-with-debian-bullseye-sid, Ubuntu 20.04.3 LTS
Python 3.6.10
Installer: DEB

azure-cli 2.30.0

Additional Context
I've cleared my account (az account clear) and tried again, same result. I've also tried with this environment:
Windows-10-10.0.19041-SP0,
Python 3.9.4
Installer: PIP

azure-cli 2.30.0

obtaining this output:
User xxxxxxxxxxxxxxx does not exist in MSAL token cache. Run `az login`.

network

Please login and try again.

Cleared previous logins

~ » az account clear

New login, getting the list of subscriptions

~ » az login --username 'username@domain'
Password:
[
  {
    "cloudName": "AzureCloud",
		(...)
  }
]

Running the script, getting the list of subscriptions but not the list of networks in each subscription

~ » python3 myscript.py
DEBUG: output from "az account list"
[
  {
    "cloudName": "AzureCloud",
		(...)
  }
]
DEBUG: output from "az network vnet list --subscription xxxxxxxxxx"
The credential data used by CLI has been expired because you might have changed or reset the password. Please clear browser's cookies and run 'az login'

Running the same command manually from the cli, getting the result

~ » az network vnet list --subscription xxxxxxxxxx
[
  {
    "addressSpace": {
		(...)
   }
  }
]

@jiasli Could you have a look? Thanks.

This is because the Python script and direct az network vnet list command are calling different versions of Azure CLI.
The error message The credential data used by CLI ... has long been removed by #17072. Please make sure the correct version of Azure CLI is called by upgrading to the latest version
pip install --upgrade azure-cli

By the way, your script uses subscription name as --subscription which may break if there are spaces in it. You can use either subscription ID of shlex.split.
Use subscription ID:
from azure.cli.core import get_default_cli

def azurer(args_str):
    args = args_str.split()
    cli = get_default_cli()
    cli.invoke(args)
    return cli.result.result

subscriptions = azurer("account list")
for s in subscriptions:
    vnets = azurer("network vnet list --subscription " + s['id'])
    if type(vnets) == dict:
        for v in vnets:
            print(v['name'])

Use shlex.split:
from azure.cli.core import get_default_cli
import shlex

def azurer(args_str):
    args = shlex.split(args_str)
    cli = get_default_cli()
    cli.invoke(args)
    return cli.result.result

subscriptions = azurer("account list")
for s in subscriptions:
    vnets = azurer("network vnet list --subscription '" + s['name'] + "'")
    if type(vnets) == dict:
        for v in vnets:
            print(v['name'])

Thanks a lot @jiasli, I've been able to solve the issue!
Regards,
Matteo

Glad to know that! 😊

authors: jiasli kairu-ms mcomisso-elux yonzhan


text:
Unable to install rdbms-connect in Microsoft-Hosted Pipeline Agent

Hi,
I'm using Azure DevOps with a Microsoft-Hosted Pipeline Agent (have tried both windows-2019 and windows-2022)
Trying to run az extension add --name rdbms-connect --debug
in this task:
      - task: AzureCLI@2
        displayName: Azure CLI
        name: azclicreate
        inputs:
          ...

See the "included software" links under both agents for what's installed on the agents: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml
The --debug log is attached below.
azuredevops.log
Please shout out if more info is needed.

i have same issue
The system cannot find the path specified: 'C:\\Program Files\\Common Files\\AzureCliExtensionDirectory\\rdbms-connect'. Retrying ...

route to CXP team

FYI, a workaround until this is fixed is to use a Linux agent instead (ubuntu-latest) (and pscore instead of ps).

Adding the Service team for the devops/pipelines issue.

@v-anvashist, @V-hmusukula Please look into this issue once you get a chance.

@meastp I am not able to repro this issue.
We are using windows 10 and able to install rdbms connect
Thanks,
Anjali

@v-anvashist

I'm using Azure DevOps with a Microsoft-Hosted Pipeline Agent (have tried both windows-2019 and windows-2022)

i.e. not windows 10, but nice to know that at least some windows versions work :)

@meastp   Thanks for your response ! After detailed analysis we figured out that we are not owing the same.
@navba-MSFT  Could you please redirect this issue to some another team?
Thanks,
Anjali

please, any updates on how to fix this?

@v-anvashist Any updates on this? Its not working on my win10 nor in Pipeline Agent

authors: AliKhyar Rezpector888 meastp navba-MSFT nschoenberg v-anvashist yonzhan


text:
Enabling addon failure

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az aks enable-addons
Errors:
The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'rpartition'
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 658, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 692, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 328, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/custom.py", line 2232, in aks_enable_addons
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/addonconfiguration.py", line 695, in add_virtual_node_role_assignment
AttributeError: 'NoneType' object has no attribute 'rpartition'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az aks enable-addons --resource-group {} --name {} --addons {} --subnet-name {}

Expected Behavior
Environment Summary
Windows-10-10.0.22000-SP0
Python 3.10.4
Installer: MSI

azure-cli 2.36.0 *

Additional Context

route to CXP team

@mlovse1 Thanks for reaching out to us and sharing this feedback. Could you please let me know the complete Az CLI command that you had executed ? Also please run the CLI command with --debug switch and share the output here. Awaiting your reply.

@mlovse1 I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please share the --debug output details so that we can assist you further on this. Awaiting your reply.

@mlovse1 Once you are ready to resume troubleshooting on this, please provide us the details of the issue with --debug switch and the complete command that was executed. So for now, we will now proceed with closure of this github issue. Please feel free to reopen this thread once you have the requested details. We would be happy to help.

authors: mlovse1 navba-MSFT yonzhan


text:
Can not update storage file share smb properties

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az storage account file-service-properties update
Errors:
The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'smb'
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 657, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 691, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 328, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 200, in handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/storage/operations/account.py", line 693, in update_file_service_properties
AttributeError: 'NoneType' object has no attribute 'smb'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az storage account file-service-properties update --resource-group {} --account-name {} --versions {} --channel-encryption {} --auth-methods {} --kerb-ticket-encryption {}

Expected Behavior
Environment Summary
Windows-10-10.0.22000-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.28.0 *

Extensions:
azure-devops 0.18.0
connectedk8s 0.2.7
k8sconfiguration 0.2.0

Additional Context

storage

Getting the same problem, slightly different timing though.
I did a deployment this morning at 2022-06-03T01:51Z and this worked fine, a few hours later at 2022-06-03T04:23:34Z and we are getting the above error. As far as I can see nothing in the environment changed, these are being run from an Azure DevOps Agent:
azure-cli                         2.37.0

core                              2.37.0
telemetry                          1.0.6

Extensions:
azure-devops                      0.25.0

Dependencies:
msal                            1.18.0b1
azure-mgmt-resource             21.1.0b1

Running from my own laptop using the storage-preview extension of 0.7.4 (old version) worked fine, upgrading to 0.8.3 (the latest), or removing it completely and I get the above error message.
The specific command we are using (unsure if it matters):
az storage account file-service-properties update --resource-group <rg> --account-name <account> --enable-delete-retention true --delete-retention-days 7

This is a regression because of service response breaking change. CLI will be more compatible after https://github.com/Azure/azure-cli/pull/22691

@goelankit Please upgrade to that latest version of az cli 2.39.0 and retry.

authors: RakeshMohanMSFT evelyn-ys goelankit yonzhan zoeperryman


text:
[IoT] Add convenience arguments for hub/device update

Generic update is intended as a stopgap for new functionality and for advanced scenarios. The iot hub update and iot device update commands should expose convenience arguments for the most commonly updated parameters. This will improve the customer experience.
See https://github.com/Azure/azure-cli/blob/master/doc/authoring_command_modules/authoring_commands.md#generic-update-commands
for more info.

Feature request

Created item to target Nov this year https://msazure.visualstudio.com/One/_workitems/edit/4979134

authors: jlian tjprescott


text:
az monitor metrics list should have a parameter for the unit

Related command
az monitor metrics list
Is your feature request related to a problem? Please describe.
I would like to define the results per a pre-specified unit, which today is not possible. Nowadays, for instance, I would like to know the memory usage in bytes, and the command only returns results in a percentage of memory usage. The same for hard disk.
Describe the solution you'd like
The solution is to add a parameter called --unit with possible values per metric. For instance, percentage or bytes.
Describe alternatives you've considered
An alternative solution is to add a field in the JSON results with the total amount of memory or hard disk in bytes, so I can calculate it.

Thank you for opening this issue, we will look into it.

authors: mgdebayser yonzhan


text:
Encountered internal server error while processing the deployment what-if request

Describe the bug
I am trying to run az deploy what-if and keep getting InternalServerError as output and the command fails:
The Comman:
az deployment sub what-if --name '' --location 'westeurope' --template-file '' --parameter ''
Related command
none
Errors
ERROR: InternalServerError - Encountered internal server error while processing the deployment what-if request.
Diagnostic information:
timestamp '20240212T060623Z',
scope '/subscriptions/[removed]',
tracking id '00d61cb6-aebf-42b4-acb0-e62506c5e084',
request correlation id '1fa26211-3696-47ba-a6f9-9499bbce2c1b'.
Issue script & Debug output
DEBUG: cli.azure.cli.core.util: attempting to read file Resources/Solutions/[Removed]]/test.parameters.json as utf-8-sig
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ResourceManagementClient
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='/home/vsts/work/_temp/.azclitask/service_principal_entries.json', encrypt=False
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='/home/vsts/work/_temp/.azclitask/msal_token_cache.json', encrypt=False
DEBUG: cli.azure.cli.core.auth.binary_cache: load: /home/vsts/work/temp/.azclitask/msal_http_cache.bin
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
DEBUG: msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/[removed]/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/[removed]/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/[removed]/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/[removed]/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/[removed]/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/[removed]/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/[removed]/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
DEBUG: msal.application: Broker enabled? False
DEBUG: msal.application: Region to be used: None
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: [removed]
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/[removed]/providers/Microsoft.Resources/deployments/rdm-iac-sxdm-test/whatIf?api-version=2022-09-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'POST'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '54077'
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '[removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'deployment sub what-if'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --location --template-file --parameter --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.56.0 (DEB) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.11.5 (Linux-6.2.0-1019-azure-x86_64-with-glibc2.35) VSTS[removed]build_543_0'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: [Removed]
DEBUG: cli.azure.cli.command_modules.resource.custom: HTTP content is being overwritten to preserve template whitepace accurately. The request body logging may not accurately represent this.
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/[removed]/providers/Microsoft.Resources/deployments/rdm-iac-sxdm-test/whatIf?api-version=2022-09-01 HTTP/1.1" 202 0
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 202
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Location': 'https://management.azure.com/subscriptions/[removed]/operationresults/[removed]?api-version=2022-09-01&t=638433164466718140&c=[Removed]&s=[Removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'Retry-After': '15'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '1199'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '[removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '[removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTEUROPE:20240212T063406Z:[removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Mon, 12 Feb 2024 06:34:06 GMT'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '0'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies:
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/[removed]/operationresults/[removed]?api-version=2022-09-01&t=638433164466718140&c=[Removed]&s=[Removed]'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '[removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'deployment sub what-if'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --location --template-file --parameter --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.56.0 (DEB) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.11.5 (Linux-6.2.0-1019-azure-x86_64-with-glibc2.35) VSTS[removed]build_543_0'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/[removed]/operationresults/[removed]?api-version=2022-09-01&t=638433164466718140&c=[Removed]&s=[Removed] HTTP/1.1" 202 0
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 202
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Location': 'https://management.azure.com/subscriptions/[removed]/operationresults/[removed]?api-version=2022-09-01&t=638433164467030698&c=[Removed]&s=[removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'Retry-After': '15'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11999'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '[removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '[removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTEUROPE:20240212T063406Z:[removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Mon, 12 Feb 2024 06:34:06 GMT'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '0'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies:
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/[removed]/operationresults/[removed]?api-version=2022-09-01&t=638433164467030698&c=[Removed]&s=[removed]'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '[removed]'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'deployment sub what-if'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --location --template-file --parameter --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.56.0 (DEB) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.11.5 (Linux-6.2.0-1019-azure-x86_64-with-glibc2.35) VSTS[removed]_build_543_0'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/[removed]/operationresults/[removed]?api-version=2022-09-01&t=638433164467030698&c=[Removed]&s=[removed] HTTP/1.1" 200 383
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11998'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'removed'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'removed'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTEUROPE:20240212T063421Z:removed'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Mon, 12 Feb 2024 06:34:21 GMT'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '383'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"status":"Failed","error":{"code":"InternalServerError","message":"Encountered internal server error while processing the deployment what-if request. Diagnostic information: timestamp '20240212T063409Z', scope '/subscriptions/[removed]', tracking id '[removed]', request correlation id '[removed]'."}}
DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/resource/custom.py", line 936, in what_if_deploy_arm_template_at_subscription_scope
return _what_if_deploy_arm_template_at_subscription_scope_core(cmd,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/resource/custom.py", line 956, in _what_if_deploy_arm_template_at_subscription_scope_core
what_if_result = _what_if_deploy_arm_template_core(cmd.cli_ctx, what_if_poller, no_pretty_print, exclude_change_types)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/resource/custom.py", line 1028, in _what_if_deploy_arm_template_core
raise CLIError(err_message)
knack.util.CLIError: InternalServerError - Encountered internal server error while processing the deployment what-if request. Diagnostic information: timestamp '20240212T063409Z', scope '/subscriptions/[removed]', tracking id '[removed]', request correlation id '[removed]'.
   During handling of the above exception, another exception occurred:

   Traceback (most recent call last):
     File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/arm.py", line 109, in handle_template_based_exception
       raise CLIError(ex.inner_exception.error.message)
                      ^^^^^^^^^^^^^^^^^^
   AttributeError: 'CLIError' object has no attribute 'inner_exception'

   During handling of the above exception, another exception occurred:

   Traceback (most recent call last):
     File "/opt/az/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
       cmd_result = self.invocation.execute(args)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
       raise ex
       File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
       results.append(self._run_job(expanded_arg, cmd_copy))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 718, in _run_job
       return cmd_copy.exception_handler(ex)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/arm.py", line 114, in handle_template_based_exception
       raise CLIError(ex)
   knack.util.CLIError: InternalServerError - Encountered internal server error while processing the deployment what-if request. Diagnostic information: timestamp '20240212T063409Z', scope '/subscriptions/[removed]', tracking id '[removed]', request correlation id '[removed]'.

   ERROR: cli.azure.cli.core.azclierror: InternalServerError - Encountered internal server error while processing the deployment what-if request. Diagnostic information: timestamp '20240212T063409Z', scope '/subscriptions/[removed]', tracking id '[removed]', request correlation id '[removed]'.
   ERROR: az_command_data_logger: InternalServerError - Encountered internal server error while processing the deployment what-if request. Diagnostic information: timestamp '20240212T063409Z', scope '/subscriptions/[removed]', tracking id '[removed]', request correlation id '[removed]'.
   DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f33c2df11c0>]
   INFO: az_command_data_logger: exit code: 1
   INFO: cli.__main__: Command ran in 24.194 seconds (init: 0.183, invoke: 24.011)
   INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
   INFO: telemetry.client: Accumulated 0 events. Flush the clients.
   INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
   INFO: telemetry.save: Save telemetry record of length 3856 in cache
   INFO: telemetry.main: Begin creating telemetry upload process.
   INFO: telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.11/site-packages/azure/cli/telemetry/__init__.py /home/vsts/work/_temp/.azclitask"
   INFO: telemetry.process: Return from creating process
   INFO: telemetry.main: Finish creating telemetry upload process.

Expected behavior
Should see the expected change output of the what-if command
Environment Summary
azure-cli                         2.56.0 *
core                              2.56.0 *
telemetry                          1.1.0
Extensions:
azure-devops                      0.26.0
Dependencies:
msal                            1.24.0b2
azure-mgmt-resource             23.1.0b2
Python location '/opt/az/bin/python3'
Extensions directory '/opt/az/azcliextensions'
Python (Linux) 3.11.5 (main, Jan  8 2024, 09:08:13) [GCC 11.4.0]
Additional context
I have identified this call and module to be the issue:
Call:
param keyVaultName string
module FunctionKeyVault '../../Resources/KeyVaultModule.bicep' = {
name: '${deployment().name}-KeyVault'
params: {
location: location
keyVaultName: keyVaultName
tenantId: '[removed]'
}
scope: resourceGroup(resourceGroupName)
dependsOn: [
[removed]
]
}
Module:
param keyVaultName string
param location string
param tenantId string
resource qqq 'Microsoft.KeyVault/vaults@2021-10-01' = {
name: keyVaultName
location: location
properties: {
tenantId: tenantId
sku: {
name: 'standard'
family: 'A'
}
createMode: 'default'
}
}

Thank you for opening this issue, we will look into it.

Nevermind. Found the issue.
I called a Module with Within a Module. An both had the same deployment name.
What i would have expected is an error saying the deployment name was already taken (like what happens if i have the same deployment name in the same file)

Closed

authors: cwistedt yonzhan


text:
[Docker] Use Python based on Alpine for Dockerfile

Closes https://github.com/Azure/azure-cli/issues/1027

Image size will go from 751.1 MB to 263.3 MB.

:shipit:

@tjprescott It's a lightweight Linux distribution. Before, it was based on Debian.

authors: JasonRShaver derekbekoe


text:
{Packaging} Be more strict on requests

Close #18499
Context
This command will go into almost endless backtracking:
pip requests~=2.24.0 azure-cli

The conflict comes from requests~=2.24.0
https://github.com/psf/requests/blob/v2.24.0/setup.py#L47
    'urllib3>=1.21.1,<1.26,!=1.25.0,!=1.25.1',

and azure-cli-core
https://github.com/Azure/azure-cli/blob/162be08eefaa1d64974a07b6179babe4c5b2830a/src/azure-cli-core/setup.py#L62
azure-cli-core requires the latest urllib3 due to https://github.com/Azure/azure-cli/pull/18324.
Change
By being more strict on requests, pip fails more quickly:
> pip install requests~=2.24.0 -e src/azure-cli-core

ERROR: Cannot install azure-cli-core==2.25.0 and requests~=2.24.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested requests~=2.24.0
    azure-cli-core 2.25.0 depends on requests~=2.25.1

Packaging

authors: jiasli yonzhan


text:
{App Service} Fix: #24489: Remove single quote from example text as it…

… breaks the code
Fixes https://github.com/Azure/azure-cli/issues/24489
Related command

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

App Service

authors: RakeshMohanMSFT yonzhan


text:
[App Service] Hotfix: az webapp config appsettings settings are registered as Deployment slot setting anytime when using --slot-settings

Related command
az webapp config appsettings set
Description
Settings are registered as Deployment slot setting anytime when using "--slot-settings" though there are designated "slotSetting=false" in a Json file.
The official document mentions the option of "--slot-settings" will mark as Deployment slot setting by default, however current behavior is the user cannot choose Deployment slot setting or not if using "--slot-settings".
https://learn.microsoft.com/en-us/cli/azure/webapp/config/appsettings?view=azure-cli-latest#az-webapp-config-appsettings-set-optional-parameters
Also, I think the expected behavior before until this PR was merged is the user can choose whether Deployment slot setting or not by Json file even if using the option of "--slot-settings".
Testing Guide

create a json file.
For example:

[
  {
    "name": "TEST_SETTING1",
    "value": "test_value1",
    "slotSetting": false
  },
  {
    "name": "TEST_SETTING2",
    "value": "test_value2",
    "slotSetting": true
  }
]

az webapp config appsettings set -g <resource_group> -n <resource_name> --slot-settings @<created_file>
If needed, you can test with a slot name.
az webapp config appsettings set -g <resource_group> -n <resource_name> -s <slot_name> --slot-settings @<created_file>

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[x] The PR title and description has followed the guideline in Submitting Pull Requests.

[x] I adhere to the Command Guidelines.

[x] I adhere to the Error Handling Guidelines.

App Service

AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_update_webapp_settings_thru_json.yaml') in your current record mode ('once').
E           No match for the request (<Request (PUT) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_json000001/providers/Microsoft.Web/serverfarms/webapp-config-plan000003?api-version=2022-03-01>) was found.
E           Found 13 similar requests with 1 different matcher(s) :
E
E           1 - (<Request (PUT) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_json000001/providers/Microsoft.Web/serverfarms/webapp-config-plan000003?api-version=2020-12-01>)..)
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

Please update the code from the remote dev branch and then re-record the yaml file for test_update_webapp_settings_thru_json

@mag-chang Please address these CI issues

Please note that since we will launch the release of this sprint the day after tomorrow. If you cannot address all the comments tomorrow, we will have to postpone the release of this PR to the next sprint (02-07)

@zhoxing-ms Thank you for your suggestion. I changed the base branch into dev and re-create testing yaml for my test. However, I cannot resolve the error at CI though these tests are success on my local machine.
I suspect my environment and CI are different anything. I am going to try again for resolution.

@mag-chang Any update?
Please note that since we will launch the release of this sprint the day after tomorrow. If you cannot address all the comments tomorrow, we will have to postpone the release of this PR to the next sprint (03-07)

@zhoxing-ms Sorry for late. I'm struggling for fixing. I will try to resolve today, but I may request to postpone this PR if I cannot fix in tomorrow.

authors: mag-chang yonzhan zhoxing-ms


text:
Trailing slash on issuer URL causes issues

The trailing slash on the issuer URL in the code sample will cause the federated credential to not work when leveraging the azure/login action in a pipeline. The error it throws is "AADSTS70021: No matching federated identity record found for presented assertion".
Removing the trailing slash fixes it and works as expected.
Description
Documentation update when using az ad app federated-credential create to create a federated credential.
The official GitHub documents also call this out as not having a trailing slash https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#:~:text=(Issuer) The issuer of the OIDC token%3A https%3A//token.actions.githubusercontent.com
This checklist is used to make sure that common guidelines for a pull request are followed.

[x] The PR title and description has followed the guideline in Submitting Pull Requests.

[x] I adhere to the Command Guidelines.

[x] I adhere to the Error Handling Guidelines.

role

authors: mluker yonzhan


text:
Fix #26326: az network vnet subnet update: --nat-gateway null doesn't work

Related command

Fix: https://github.com/Azure/azure-cli/issues/26326
Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

Thank you for your contribution! We will review the pull request and get back to you soon.

/azp run

authors: necusjz yonzhan


text:
{Keyvault} Enhance resource group validator

Related command

az keyvault mgmt plane commands
Description

For mgmt plane commands in az keyvault module, --resource-group parameter is not required. If customer provide --vault-name without --resource-group, we will call vault_client.list() to list all the vaults in sub and find the match by vault name to complete the resource group info.
But this is very time consuming when there're hundreds of vaults within sub, so we enhance the query with filter.
Before: vault_client.list()
After: vault_client.list(filter="resourceType eq 'Microsoft.KeyVault/vaults' and name eq 'vault_name'")
Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

Keyvault

The change fails the Full Test CI check

authors: FumingZhang evelyn-ys yonzhan


text:
{IoT} Service-side HIS renewal of IoT Hub policy keys

Related command

az iot hub policy renew-key
Description

This moves key generation for IoT Hub policy key renewals to the service side, rather than the client.
Testing Guide

This change is completely hidden from the user interface. The following example command should continue to renew policy keys for the IoT Hub:
az iot hub policy renew-key --name {policyName} --hub-name {hubName} --resource-group {resourceGroupName} --rk primary

This checklist is used to make sure that common guidelines for a pull request are followed.

[x] The PR title and description has followed the guideline in Submitting Pull Requests.

[x] I adhere to the Command Guidelines.

[x] I adhere to the Error Handling Guidelines.

Thank you for your contribution! We will review the pull request and get back to you soon.

@yonzhan @zhoxing-ms is there a reason this slipped to the next milestone? It's been open for 2 weeks and we really need this to go into a sooner release as the previous implementation causes service errors

Due to Company-wise CCOA policy, we could not release until after Jan 6th. CloudShell and Azure PS also follow the same schedule. Sorry for the inconvenience caused.

Understood - sorry I was out and didn't realize the CCOA was extended, thanks!

authors: c-ryan-k yonzhan


text:
Fix: Extension metadata not being loaded

Pin the version of wheel until a fix is available.
This is due to https://github.com/pypa/wheel/issues/235

View a preview at https://prompt.ws/r/Azure/azure-cli/6164
This is an experimental preview for @microsoft users.

authors: derekbekoe promptws


text:
[functionapp] Remove deprecated devops-build command

The az functionapp devops-build has been deprecated for more than 2 weeks and suppose to be removed in version 2.0.68 (Sprint 64).
This PR removed the command and suppose to be out in Sprint 64.

This checklist is used to make sure that common guidelines for a pull request are followed.

[X] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

[X] I adhere to the Command Guidelines.

@ahmedelnably

Howdy @Hazhzeng, I've gone ahead and merged your changes with the most recent version of dev to fix some conflicts for you. Other than having your local repository need a pull there should be no further action needed by you.

Much appreciated @marstr

@yugangw-msft Thanks for reminding. The HISTORY.rst is up to date now.

authors: Hazhzeng marstr


text:
Azure CNI not working when upgrading to Ubuntu 18.04

We have a Kubernetes cluster in Azure, running Kubernetes 1.18.6 , Azure CNI 1.1.5 on Ubuntu 16.04. As the kubelet starts it runs the iptables command from here. This all works fine, we've been running this for over a year and have had no major issues with it (older version of Kubernetes but same CNI version).
What happened:
Upgraded a worker to 18.04. The kubelet was failing to register then node.
Kubelet log: lots of
Jul 29 14:03:09 tools-test-worker-00 kubelet[10323]: I0729 14:03:09.127669   10323 nodeinfomanager.go:403] Failed to publish CSINode: nodes "tools-test-worker-00" not found
Jul 29 14:03:09 tools-test-worker-00 kubelet[10323]: E0729 14:03:09.128737   10323 kubelet.go:2268] node "tools-test-worker-00" not found

I eventually saw
kubelet[7777]: I0729 13:57:30.586855    7777 cloud_request_manager.go:115] Node addresses from cloud provider for node "tools-test-worker-00" not collected: Get http://169.254.169.254/metadata/instance?api-version=2019-03-11&format=json: dial tcp 169.254.169.254:80: i/o timeout

So I added /sbin/iptables -t nat -I POSTROUTING -d 169.254.169.254 -j RETURN before running kubelet (with systemd ExecStartPre), kubelet started but was failing to start a pod in the default namespace
Jul 29 14:23:10 tools-test-worker-00 kubelet[9145]: I0729 14:23:10.780779    9145 kuberuntime_manager.go:422] No sandbox for pod "liveness3_default(242a5264-a782-43e4-8489-a595b3d3ccb2)" can be found. Need to start a new one
Jul 29 14:23:10 tools-test-worker-00 kubelet[9145]: I0729 14:23:10.838185    9145 kuberuntime_manager.go:422] No sandbox for pod "debug3_default(553e14e2-a256-47cd-9c28-67b0fbe0b4fb)" can be found. Need to start a new one
Jul 29 14:23:21 tools-test-worker-00 kubelet[9145]: E0729 14:23:21.135658    9145 remote_runtime.go:105] RunPodSandbox from runtime service failed: rpc error: code = Unknown desc = failed to setup network for sandbox "115a3a68cea1f3274d7f69ef12be865176f89bda891c97a693377f6c3f4c2584": Failed to allocate pool: Failed to delegate: Failed to allocate pool: Invalid address space
Jul 29 14:23:21 tools-test-worker-00 kubelet[9145]: E0729 14:23:21.135770    9145 kuberuntime_sandbox.go:68] CreatePodSandbox for pod "liveness3_default(242a5264-a782-43e4-8489-a595b3d3ccb2)" failed: rpc error: code = Unknown desc = failed to setup network for sandbox "115a3a68cea1f3274d7f69ef12be865176f89bda891c97a693377f6c3f4c2584": Failed to allocate pool: Failed to delegate: Failed to allocate pool: Invalid address space
Jul 29 14:23:21 tools-test-worker-00 kubelet[9145]: E0729 14:23:21.135805    9145 kuberuntime_manager.go:727] createPodSandbox for pod "liveness3_default(242a5264-a782-43e4-8489-a595b3d3ccb2)" failed: rpc error: code = Unknown desc = failed to setup network for sandbox "115a3a68cea1f3274d7f69ef12be865176f89bda891c97a693377f6c3f4c2584": Failed to allocate pool: Failed to delegate: Failed to allocate pool: Invalid address space

I also repeated it with CNI 1.1.3 and got the same errors.
What you expected to happen:
It to just work
How to reproduce it:
Not entirely sure how you would as everyone is doing AKS these days :D
Stand up a VNet in azure, 2 VMs Ubuntu 18.04
Setup a master node, and a worker node (with the 30 IPs on the NIC)
On the worker node start kubelet with the 2 iptables rules mentioned above
Orchestrator and Version (e.g. Kubernetes, Docker):
Kubernetes 1.18.6
Containerd 1.2.13
Operating System (Linux/Windows):
Ubuntu 18.04
Kernel (e.g. uanme -a for Linux or $(Get-ItemProperty -Path "C:\windows\system32\hal.dll").VersionInfo.FileVersion for Windows):
Linux tools-test-worker-00 5.3.0-1032-azure #33~18.04.1-Ubuntu SMP Fri Jun 26 15:01:15 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Anything else we need to know?:
iptables whilst kubelet was crashing (using /sbin/iptables -t nat -A POSTROUTING -m addrtype ! --dst-type local ! -d 10.4.0.0/18 -j MASQUERADE)

I snipped out some rules, but I don't think that they were relevant
root@tools-test-worker-00:~# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
KUBE-SERVICES  all  --  anywhere             anywhere             /* kubernetes service portals */

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
KUBE-SERVICES  all  --  anywhere             anywhere             /* kubernetes service portals */

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
KUBE-POSTROUTING  all  --  anywhere             anywhere             /* kubernetes postrouting rules */
MASQUERADE  all  --  anywhere            !10.4.0.0/18          ADDRTYPE match dst-type !LOCAL

Chain KUBE-KUBELET-CANARY (0 references)
target     prot opt source               destination

Chain KUBE-MARK-DROP (2 references)
target     prot opt source               destination
MARK       all  --  anywhere             anywhere             MARK or 0x8000

Chain KUBE-MARK-MASQ (68 references)
target     prot opt source               destination
MARK       all  --  anywhere             anywhere             MARK or 0x4000

Chain KUBE-NODEPORTS (1 references)
target     prot opt source               destination
KUBE-MARK-MASQ  tcp  --  localhost/8          anywhere             /* ingress-nginx/ingress-nginx:https */ tcp dpt:30001
KUBE-XLB-4E7KSV2ABIFJRAUZ  tcp  --  anywhere             anywhere             /* ingress-nginx/ingress-nginx:https */ tcp dpt:30001
KUBE-MARK-MASQ  tcp  --  localhost/8          anywhere             /* ingress-nginx/ingress-nginx:http */ tcp dpt:30000
KUBE-XLB-REQ4FPVT7WYF4VLA  tcp  --  anywhere             anywhere             /* ingress-nginx/ingress-nginx:http */ tcp dpt:30000

Chain KUBE-POSTROUTING (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere             mark match ! 0x4000/0x4000
MARK       all  --  anywhere             anywhere             MARK xor 0x4000
MASQUERADE  all  --  anywhere             anywhere             /* kubernetes service traffic requiring SNAT */

Chain KUBE-PROXY-CANARY (0 references)
target     prot opt source               destination
...
Chain KUBE-SEP-4VDVLS7C74EHFEEO (1 references)
target     prot opt source               destination
KUBE-MARK-MASQ  all  --  10.4.0.13            anywhere             /* kube-system/coredns:dns */
DNAT       udp  --  anywhere             anywhere             /* kube-system/coredns:dns */ udp to:10.4.0.13:53

Chain KUBE-SEP-63BCXCZXITMJZ6KL (1 references)
target     prot opt source               destination
KUBE-MARK-MASQ  all  --  10.4.0.37            anywhere             /* default/kibana:http */
DNAT       tcp  --  anywhere             anywhere             /* default/kibana:http */ tcp to:10.4.0.37:5601
...

Chain KUBE-SERVICES (2 references)
target     prot opt source               destination
KUBE-MARK-MASQ  tcp  -- !10.4.0.0/18          172.16.0.1           /* default/kubernetes:https cluster IP */ tcp dpt:https
KUBE-SVC-NPX46M4PTMTKRN6Y  tcp  --  anywhere             172.16.0.1           /* default/kubernetes:https cluster IP */ tcp dpt:https
KUBE-MARK-MASQ  udp  -- !10.4.0.0/18          172.16.0.10          /* kube-system/coredns:dns cluster IP */ udp dpt:domain
KUBE-SVC-ZRLRAB2E5DTUX37C  udp  --  anywhere             172.16.0.10          /* kube-system/coredns:dns cluster IP */ udp dpt:domain
KUBE-MARK-MASQ  tcp  -- !10.4.0.0/18          172.16.0.10          /* kube-system/coredns:dns-tcp cluster IP */ tcp dpt:domain
KUBE-SVC-FAITROITGXHS3QVF  tcp  --  anywhere             172.16.0.10          /* kube-system/coredns:dns-tcp cluster IP */ tcp dpt:domain
KUBE-MARK-MASQ  tcp  -- !10.4.0.0/18          172.16.11.131        /* default/kibana:http cluster IP */ tcp dpt:http
KUBE-SVC-GYQBIT3U2LMZ4H3E  tcp  --  anywhere             172.16.11.131        /* default/kibana:http cluster IP */ tcp dpt:http
KUBE-NODEPORTS  all  --  anywhere             anywhere             /* kubernetes service nodeports; NOTE: this must be the last rule in this chain */ ADDRTYPE match dst-type LOCAL

Chain KUBE-SVC-FAITROITGXHS3QVF (1 references)
target     prot opt source               destination
KUBE-SEP-V2TWSMP5HSEO77UF  all  --  anywhere             anywhere             /* kube-system/coredns:dns-tcp */ statistic mode random probability 0.50000000000
KUBE-SEP-AQIH42UCMJIZ52GE  all  --  anywhere             anywhere             /* kube-system/coredns:dns-tcp */

Chain KUBE-SVC-GYQBIT3U2LMZ4H3E (1 references)
target     prot opt source               destination
KUBE-SEP-63BCXCZXITMJZ6KL  all  --  anywhere             anywhere             /* default/kibana:http */

Chain KUBE-XLB-4E7KSV2ABIFJRAUZ (1 references)
target     prot opt source               destination
KUBE-SVC-4E7KSV2ABIFJRAUZ  all  --  10.4.0.0/18          anywhere             /* Redirect pods trying to reach external loadbalancer VIP to clusterIP */
KUBE-MARK-MASQ  all  --  anywhere             anywhere             /* masquerade LOCAL traffic for ingress-nginx/ingress-nginx:https LB IP */ ADDRTYPE match src-type LOCAL
KUBE-SVC-4E7KSV2ABIFJRAUZ  all  --  anywhere             anywhere             /* route LOCAL traffic for ingress-nginx/ingress-nginx:https LB IP to service chain */ ADDRTYPE match src-type LOCAL
KUBE-MARK-DROP  all  --  anywhere             anywhere             /* ingress-nginx/ingress-nginx:https has no local endpoints */

Chain KUBE-XLB-REQ4FPVT7WYF4VLA (1 references)
target     prot opt source               destination
KUBE-SVC-REQ4FPVT7WYF4VLA  all  --  10.4.0.0/18          anywhere             /* Redirect pods trying to reach external loadbalancer VIP to clusterIP */
KUBE-MARK-MASQ  all  --  anywhere             anywhere             /* masquerade LOCAL traffic for ingress-nginx/ingress-nginx:http LB IP */ ADDRTYPE match src-type LOCAL
KUBE-SVC-REQ4FPVT7WYF4VLA  all  --  anywhere             anywhere             /* route LOCAL traffic for ingress-nginx/ingress-nginx:http LB IP to service chain */ ADDRTYPE match src-type LOCAL
KUBE-MARK-DROP  all  --  anywhere             anywhere             /* ingress-nginx/ingress-nginx:http has no local endpoints */

So I'm sure I'm missing something simple. If you need any more info/logs just ask, I can easily add a 18.04 worker to the cluster I have running.

^^ fixed cni version typo :)

So, @terrycain and I are both working on this. If it's helpful I can convert the Chef Cookbooks we've written to deploy these clusters into a simplified bash version along with some basic Terraform. Hopefully would make things easier to replicate.

authors: cpressland terrycain

repo: Azure/azure-container-networking


text:
Update virtual-machines-size-specs.md

(The complete list of valid options should potentially be validated with the team who owns the sizes - these simply worked for me.)  When allocating the A* sizes in Azure Resource Manager, you need to use Standard_A* or Basic_A* (some only support standard). When trying to allocate with simply "A8" as an example, this did not work.

Hi @AlanSt, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no contribution license agreement is required at this point. Real humans will now evaluate your PR.

TTYL, AZPRBOT;

@AlanSt Thanks for the contribution!  I've sent this to the author for review.

@AlanSt - thanks for this feedback and sorry for the delay responding. I'll repro this against the latest Azure PowerShell bits and update the article accordingly this week. I'll also reply back with the result.

@AlanSt -- After some digging, I think the allowed values are different depending on whether the VM is created in the Service Management stack or the Resource Manager stack. This means accepting the update in your PR won't cover all the uses. Instead, I'll need to rework the info and have put that in my work queue. For the interim, I'll add a note re this discrepancy. Thanks again for bringing this to my attention.
~Kathy

@AlanSt We're closing this PR based upon the response from the author.  Please comment if you feel we should reopen.

authors: AlanSt KBDAzure azurecla deneha

repo: Azure/azure-content


text:
Update active-directory-application-proxy-publish.md

Just a typo.

Hi @DuoKristina, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no contribution license agreement is required at this point. Real humans will now evaluate your PR.

TTYL, AZPRBOT;

@DuoKristina : Thanks for your contribution to the Azure documentation! The author, @kgremban, has been notified to review your proposed change.

#sign-off

authors: DuoKristina PRmerger azurecla kgremban