text:
Updating the Azure DevOps Extension version to 0.19.0.

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)
[X] Have you run python scripts/ci/test_index.py -q locally?

For new extensions:
a

[ ] 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.

devops

devops

Created a new release for azure-devops-cli-extension. (https://dev.azure.com/ms/azure-devops-cli-extension/_build/results?buildId=130286&view=logs&j=516a99d3-db7c-5136-ef8c-05c63e967392)

Created a new release for azure-devops-cli-extension. (https://dev.azure.com/ms/azure-devops-cli-extension/_build/results?buildId=130286&view=logs&j=516a99d3-db7c-5136-ef8c-05c63e967392)

hi @houk-ms could you pls help to support this release? thanks. cc @fengzhou-msft

hi @houk-ms could you pls help to support this release? thanks. cc @fengzhou-msft

/azp run

@chandrasekharmudili can you take a look at the Linter error. A show command should be defined with show_command or custom_show_command to get the right exit code in case of 404.

@chandrasekharmudili any update?

/azp run

@chandrasekharmudili can you take a look at the Linter error. A show command should be defined with show_command or custom_show_command to get the right exit code in case of 404.

@fengzhou-msft : can you please re-run the instance once again because the build mentioned here has expired.

/azp run

@gauravsaralMs Please resolve conflicts first.

authors: chandrasekharmudili fengzhou-msft gauravsaralMs kairu-ms yonzhan yungezz


text:
keyvault secret set

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az keyvault secret set
Errors:
No module named 'azure.keyvault.v7_0'
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 528, in execute
    self.commands_loader.load_arguments(command)
azure/cli/core/__init__.py, ln 299, in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
cli/core/commands/__init__.py, ln 291, in load_arguments
    super(AzCliCommand, self).load_arguments()
...
<frozen importlib._bootstrap>, ln 961, in _find_and_load_unlocked
<frozen importlib._bootstrap>, ln 219, in _call_with_frames_removed
<frozen importlib._bootstrap>, ln 1014, in _gcd_import
<frozen importlib._bootstrap>, ln 991, in _find_and_load
<frozen importlib._bootstrap>, ln 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azure.keyvault.v7_0'

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 secret set --name {} --vault-name {} --value {}

Expected Behavior
Environment Summary
Linux-5.4.0-31-generic-x86_64-with-glibc2.29
Python 3.8.2
Shell: bash

azure-cli 2.0.81

Extensions:
azure-devops 0.17.0

Additional Context

@bim-msft please take a look

hi @bim-msft same issues reported several times, is there anything we could to avoid it?

@yungezz Hi, the root cause for this has still not been found yet. It seems the data-plane SDK azure-keyvault was upgraded from 1.1.0 to 4.x incorrectly (see another case #13507 ).
Some clues:

Most of afftected version is 2.0.81
Most of afftected OS is Linux-5.4.0-29-generic-x86_64-with-glibc2.29

This might be an OS side issue instead of CLI side, anyway, will follow up this.

Hi @acworkma You can try to upgrade your Azure CLI version to latest to avoid this issue. Another way to resolve it is using azure-keyvault==1.1.0. Please let me know if these 2 ways don't workaround you.

Closing due to longtime inactivity. If anything needs us to help with, feel free to reopen it, thanks.

Duplicate of #13101. To fix it, please see https://github.com/Azure/azure-cli/issues/19640#issuecomment-924578571.

source: gharchive/issue

authors: acworkma bim-msft jiasli yonzhan yungezz

repo: Azure/azure-cli

license: MIT

license_type: permissive

license_source: github-api


text:
az storage share create misses --auth-mode login option

When trying to create a storage share without credentials, it works and shows big options. But this option is not implemented.
"There are no credentials provided in your command and environment, we will query for the account key inside your storage account.
Please provide --connection-string, --account-key or --sas-token as credentials, or use --auth-mode login if you have required RBAC roles in your command. For more information about RBAC roles in storage, visit https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli.
Setting the corresponding environment variables can avoid inputting credentials in your command. Please use --help to get more information."
[Enter feedback here]

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 9ae881ef-ad75-32e6-6e64-6b526a2d9a5d
Version Independent ID: 99971e2e-9ff6-f865-07f7-61efbcb16021
Content: az storage share
Content Source: latest/docs-ref-autogen/storage/share.yml
Service: storage
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

Storage

Hi @Josefczak, it is by design that share service doesn't support --auth-mode login, which requires Azure AAD credentials. So in this scenario, we will recommend you to use --account-key, --connection-string or --sas-token for authentication.

But we will refine the warning with right options.

authors: Josefczak Juliehzl yonzhan


text:
[Track 2 migration] Migrate BotService

Migrate BotService to track 2 SDK.

Track 2 migration

authors: jsntcy yonzhan


text:
azure-cli 2.30.0 throws ERROR: {'Azure-cli-ml Version': '1.33.0', 'Error': TypeError("init() got an unexpected keyword argument 'async_persist'",)}

The latests version of  az cli on the Ubuntu agents (2.30.0) breaks when running az ml commands.
I'm running the following
  - task: AzureCLI@1
    displayName: "Azure CLI: Install AZ ML Extension"
    inputs:
      azureSubscription: "${{ parameters.AZURE_SUBSCRIPTION }}"
      scriptLocation: inlineScript
      inlineScript: "az extension add --name azure-cli-ml --yes"
      useGlobalConfig: true

  - task: AzureCLI@1
    displayName: "Azure CLI: Update Service (${{ parameters.SERVICE_NAME }})"
    inputs:
      azureSubscription: "${{ parameters.AZURE_SUBSCRIPTION }}"
      scriptLocation: inlineScript
      useGlobalConfig: true
      inlineScript: |
        az ml service update \
        --name ${{ parameters.SERVICE_NAME }} \
        --resource-group ${{ parameters.SERVICE_RESOURCE_GROUP }} \
        --scoring-timeout-ms ${{ parameters.SERVICE_SCORING_TIMEOUT}} \
        --workspace-name ${{ parameters.SERVICE_WORKSPACE_NAME }}

This was running fine with az cli 2.29.2 and as a workaround I've configured my pipeline to downgrade with this
  - task: Bash@3
    displayName: "Bash: Downgrade AZ CLI to [2.29.2]"
    inputs:
      targetType: "inline"
      workingDirectory: "$(Build.SourcesDirectory)"
      script: |
        sudo add-apt-repository https://packages.microsoft.com/repos/azure-cli
        sudo apt update
        apt-cache policy azure-cli
        sudo apt install -y --allow-downgrades azure-cli=2.29.2-1~focal

Logs from the error
==============================================================================
Task         : Azure CLI
Description  : Run Azure CLI commands against an Azure subscription in a Shell script when running on Linux agent or Batch script when running on Windows agent.
Version      : 1.164.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-cli
==============================================================================
/usr/bin/az --version
azure-cli                         2.30.0

core                              2.30.0
telemetry                          1.0.6

Extensions:
azure-cli-ml                      1.33.0
azure-devops                      0.21.0

Python location '/opt/az/bin/python3'
Extensions directory '/opt/az/azcliextensions'

Python (Linux) 3.6.10 (default, Oct 29 2021, 10:11:58)
[GCC 7.5.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy
Setting active cloud to: AzureCloud
/usr/bin/az cloud set -n AzureCloud
/usr/bin/az login --service-principal -u *** --password=*** --tenant ***
[
  {
   ***** Redacted ******
    }
  }
]
/usr/bin/az account set --subscription ***** Redacted ******
/bin/bash /home/vsts/work/_temp/azureclitaskscript1636529461981.sh
ERROR: {'Azure-cli-ml Version': '1.33.0', 'Error': TypeError("__init__() got an unexpected keyword argument 'async_persist'",)}

Logs when things were working
==============================================================================
Task         : Azure CLI
Description  : Run Azure CLI commands against an Azure subscription in a Shell script when running on Linux agent or Batch script when running on Windows agent.
Version      : 1.164.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-cli
==============================================================================
WARNING: You have 2 updates available. Consider updating your CLI installation with 'az upgrade'

Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy
/usr/bin/az --version
azure-cli                         2.29.2 *

core                              2.29.2 *
telemetry                          1.0.6

Extensions:
azure-cli-ml                      1.33.0
azure-devops                      0.21.0

Python location '/opt/az/bin/python3'
Extensions directory '/opt/az/azcliextensions'

Python (Linux) 3.6.10 (default, Oct 29 2021, 08:10:01)
[GCC 7.5.0]

Legal docs and information: aka.ms/AzureCliLegal

Setting active cloud to: AzureCloud
/usr/bin/az cloud set -n AzureCloud
/usr/bin/az login --service-principal -u *** --password=*** --tenant ***
[
  {
    ***** Redacted ******
       }
  }
]
/usr/bin/az account set --subscription ***** Redacted ******
/bin/bash /home/vsts/work/_temp/azureclitaskscript1636443057305.sh
AKS service creation operation finished, operation "Succeeded"

async_persist is dropped during MSAL migration (https://github.com/Azure/azure-cli/pull/19853). azure-cli-ml should adopt to the new azure-cli-core 2.30.0.

When can we expect a fix? Is there a workaround right now?

When can we expect a fix? Is there a workaround right now?

As a workaround I've downgraded the azure-cli with this
  - task: Bash@3
    displayName: "Bash: Downgrade AZ CLI to [2.29.2]"
    inputs:
      targetType: "inline"
      workingDirectory: "$(Build.SourcesDirectory)"
      script: |
        sudo add-apt-repository https://packages.microsoft.com/repos/azure-cli
        sudo apt update
        apt-cache policy azure-cli
        sudo apt install -y --allow-downgrades azure-cli=2.29.2-1~focal

However there seems to be a new (unrelated) issue with a new azure-cli-ml version, so I've also downgraded/locked it with this
  - task: AzureCLI@1
    displayName: "Azure CLI: [az extension add --name azure-cli-ml --version 1.33.1]"
    inputs:
      azureSubscription: "${{ parameters.AZURE_SUBSCRIPTION }}"
      scriptLocation: inlineScript
      # 1.5.0 throws some kind of auth error.
      inlineScript: "az extension add --name azure-cli-ml --version 1.33.1"
      useGlobalConfig: true

@Cam-Borrowell what was the issue with the new azure-cli-ml version 1.33.1?

@Cam-Borrowell what was the issue with the new azure-cli-ml version 1.33.1?

With these versions
azure-cli                         2.29.2 *

core                              2.29.2 *
telemetry                          1.0.6

Extensions:
azure-devops                      0.21.0
azure-cli-ml                       1.5.0
```

```
ERROR: {'Azure-cli-ml Version': '1.5.0', 'Error': AuthenticationException:
	Message: Could not retrieve user token. Please run 'az login'
	InnerException _retrieve_token() missing 1 required positional argument: 'token_resource'
	ErrorResponse
{
    "error": {
        "code": "UserError",
        "inner_error": {
            "code": "Authentication"
        },
        "message": "Could not retrieve user token. Please run 'az login'"
    }
}}
```

azure-cli-ml 1.5.0 is an old package. Do you see any issues when you upgrade it to 1.33.1?
@kairu-ms When azure cli parses the package version, does 1.33.1 come newer than 1.5.0?

azure-cli-ml 1.5.0 is an old package. Do you see any issues when you upgrade it to 1.33.1?
@kairu-ms When azure cli parses the package version, does 1.33.1 come newer than 1.5.0?

@Mossaka After my initial workaround the agents were automatically using 1.5.0 when I was running az extension add --name azure-cli-ml so that's why I had to go back and lock in version 1.33.1. No issues with azure-cli-ml 1.33.1 along with azure-cli 2.29.2

Thanks for your inputs!

Though I don't have the full pipeline YAML, I would like to mention that Azure CLI 2.29.2 and 2.30.0's login contexts aren't compatible.
Make sure to downgrade Azure CLI first before calling an Azure CLI task.

When can we expect a fix? Is there a workaround right now?

As a workaround I've downgraded the azure-cli with this
  - task: Bash@3
    displayName: "Bash: Downgrade AZ CLI to [2.29.2]"
    inputs:
      targetType: "inline"
      workingDirectory: "$(Build.SourcesDirectory)"
      script: |
        sudo add-apt-repository https://packages.microsoft.com/repos/azure-cli
        sudo apt update
        apt-cache policy azure-cli
        sudo apt install -y --allow-downgrades azure-cli=2.29.2-1~focal

However there seems to be a new (unrelated) issue with a new azure-cli-ml version, so I've also downgraded/locked it with this
  - task: AzureCLI@1
    displayName: "Azure CLI: [az extension add --name azure-cli-ml --version 1.33.1]"
    inputs:
      azureSubscription: "${{ parameters.AZURE_SUBSCRIPTION }}"
      scriptLocation: inlineScript
      # 1.5.0 throws some kind of auth error.
      inlineScript: "az extension add --name azure-cli-ml --version 1.33.1"
      useGlobalConfig: true

Nice. It worked for me. just FYI this command works if you are using image "ubuntu-latest (20.04)", if you are using "ubuntu-18.04", change "focal" to  "bionic"

@Cam-Borrowell Apologies for the late reply. Could you please let us know if you are still facing this issue ? Awaiting your reply.

authors: Cam-Borrowell Mossaka jiasli navba-MSFT sigeisler tranguyen221


text:
az quota list giving an error

Following the instructions for az quota list, I get an error:
Command:
az quota list --scope "subscriptions/${CUSTOMER_SUBSCRIPTION_ID}/providers/Microsoft.Compute/locations/australiaeast"

Error:
Command group 'quota' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
(InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.Compute' for api version '2021-03-15-preview'.
Code: InvalidResourceType
Message: The resource type could not be found in the namespace 'Microsoft.Compute' for api version '2021-03-15-preview'.

[Enter feedback here]
Version of az cli:
az version
{
  "azure-cli": "2.36.0",
  "azure-cli-core": "2.36.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "account": "0.2.2",
    "ad": "0.1.0",
    "aks-preview": "0.5.56",
    "azure-cli-ml": "1.37.0",
    "azure-devops": "0.23.0",
    "dataprotection": "0.2.0",
    "quota": "0.1.0"
  }
}

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 96b74af1-0d1f-759a-1b76-85f8b97b4869
Version Independent ID: 3ec784bc-0bff-e794-2fc3-dcb3d0e14ee3
Content: az quota
Content Source: latest/docs-ref-autogen/quota.yml
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

quota

is there way to change the api version to work around this?

I am getting this same error. Is there any update on a workaround?

Hi, currently quota only supports Network RP , not Compute RP, which is expected in 2-4 weeks. In addition, your parameter seems to be wrong, it should be ‘ az quota list --scope "subscriptions/${CUSTOMER_SUBSCRIPTION_ID}/providers/Microsoft.Compute/locations/australiaeast" '. Please refer to : https://review.docs.microsoft.com/en-us/rest/api/quota/quota/list?branch=newquota

the docs show compute examples, so there was expectation that they would work (in preview)
https://docs.microsoft.com/en-us/cli/azure/quota?view=azure-cli-latest#az-quota-list-examples

Compute RP is not working yet, and is expected to be available in 2-4 weeks.

Hi, currently quota only supports Network RP , not Compute RP, which is expected in 2-4 weeks. In addition, your parameter seems to be wrong, it should be ‘ az quota list --scope "subscriptions/${CUSTOMER_SUBSCRIPTION_ID}/providers/Microsoft.Compute/locations/australiaeast" '. Please refer to : https://review.docs.microsoft.com/en-us/rest/api/quota/quota/list?branch=newquota

Thanks - I updated the scope. I'm still getting the error with azure-cli 2.37.0, and will wait for Compute RP to be supported

Hi, @Rahul Singh. May I ask how long it will take to support Compute PR?

Is it working now? I am getting same error.
Command group 'quota' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
(InvalidResourceType) The resource type 'locations' could not be found in the namespace 'Microsoft.Compute' for api version '2021-03-15-preview'. The supported api-versions are '2015-05-01-preview,2015-06-15,2016-03-30,2016-04-30-preview,2016-08-30,2017-03-30,2017-12-01,2018-04-01,2018-06-01,2018-10-01,2019-03-01,2019-07-01,2019-12-01,2020-06-01,2020-12-01,2021-03-01,2021-04-01,2021-07-01,2021-11-01,2022-03-01,2022-08-01'.
Code: InvalidResourceType
Message: The resource type 'locations' could not be found in the namespace 'Microsoft.Compute' for api version '2021-03-15-preview'. The supported api-versions are '2015-05-01-preview,2015-06-15,2016-03-30,2016-04-30-preview,2016-08-30,2017-03-30,2017-12-01,2018-04-01,2018-06-01,2018-10-01,2019-03-01,2019-07-01,2019-12-01,2020-06-01,2020-12-01,2021-03-01,2021-04-01,2021-07-01,2021-11-01,2022-03-01,2022-08-01'.

Quota does not currently support Compute PR.

Can you give me few examples of what command currently works? I am trying to check quota for Purview, Synapse and SQL DB.

Can you give me few examples of what command currently works? I am trying to check quota for Purview, Synapse and SQL DB.

@rahuls-microsoft, could you please help provide some information?

The Microsoft.Compute Resource provider is not supported yet, only Microsoft.Network Resource provider is supported through this Api. We will notify when more RPs are onboarded. Currently QuotaRP is in private preview, so all the subscriptions will not have access to the APIs. We will notify, when it's public preview starts.

Is there any other way to find quota for  Purview, Synapse and SQL DB? I couldn't find it on portal.

It's August, still see the same error.

I even tried it with Network and failed
az quota list --scope "subscriptions//providers/Microsoft.Network/locations/eastus"
Command group 'quota' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
(InvalidResourceType) The resource type 'locations' could not be found in the namespace 'Microsoft.Network' for api version '2021-03-15-preview'. The supported api-versions are '2014-12-01-preview,2015-05-01-preview,2015-06-15,2016-03-30,2016-06-01,2016-07-01,2016-08-01,2016-09-01,2016-10-01,2016-11-01,2016-12-01,2017-03-01,2017-04-01,2017-06-01,2017-08-01,2017-09-01,2017-10-01,2017-11-01,2018-01-01,2018-02-01,2018-03-01,2018-04-01,2018-05-01,2018-06-01,2018-07-01,2018-08-01,2018-10-01,2018-11-01,2018-12-01,2019-02-01,2019-04-01,2019-06-01,2019-07-01,2019-08-01,2019-09-01,2019-11-01,2019-12-01,2020-01-01,2020-03-01,2020-04-01,2020-05-01,2020-06-01,2020-07-01,2020-08-01,2020-11-01,2021-01-01,2021-02-01,2021-03-01,2021-04-01,2021-05-01,2021-06-01,2021-08-01,2021-12-01,2022-01-01,2022-05-01'.
Code: InvalidResourceType
Message: The resource type 'locations' could not be found in the namespace 'Microsoft.Network' for api version '2021-03-15-preview'. The supported api-versions are '2014-12-01-preview,2015-05-01-preview,2015-06-15,2016-03-30,2016-06-01,2016-07-01,2016-08-01,2016-09-01,2016-10-01,2016-11-01,2016-12-01,2017-03-01,2017-04-01,2017-06-01,2017-08-01,2017-09-01,2017-10-01,2017-11-01,2018-01-01,2018-02-01,2018-03-01,2018-04-01,2018-05-01,2018-06-01,2018-07-01,2018-08-01,2018-10-01,2018-11-01,2018-12-01,2019-02-01,2019-04-01,2019-06-01,2019-07-01,2019-08-01,2019-09-01,2019-11-01,2019-12-01,2020-01-01,2020-03-01,2020-04-01,2020-05-01,2020-06-01,2020-07-01,2020-08-01,2020-11-01,2021-01-01,2021-02-01,2021-03-01,2021-04-01,2021-05-01,2021-06-01,2021-08-01,2021-12-01,2022-01-01,2022-05-01'.

@rahuls-microsoft @ZengTaoxu @yonzhan
I think people are coming to this github issue since the docs doesn't exactly state with resource providers are currently supported with az quota
the docs even use az quota with the compute resource provider even though it's not supported yet.
clarifying the docs with exactly which resource providers are supported along with working examples of supported ones i think would go a long way

That's correct, the doc for QuotaRP will include what RPs are onboarded and will be updated, when new RPs are onboarded.

Now Compute RP is available. It can only be used by the subscriptions registered with QuotaRP.

Hi, iam getting the same error
az quota list --scope "subscriptions/(sub-id)/providers/Microsoft.Network/location/eastus"                            Command group 'quota' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus                                             (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.Network' for api version '2021-03-15-preview'.

Now Compute RP is available. It can only be used by the subscriptions registered with QuotaRP.

has anyone got it working since @rahuls-microsoft commented about it being available for Compute 14 days ago?

It's end September, still see the same error.

Me too, it is not work still.

The planned date for public preview is 10/20/22. I will update the thread, as we go public preview.

The Quota APIs are now in public preview. You can access the APIs now.
Previously, it was behind AFEC (Feature flag) that's why you got the error.

Thanks for the update, it does appear to work now.
I have a question though, maybe I'm missing an arguement or overlooking something.
When running "az quota usage show --resource-name "cores" --scope "subscriptions/XXXXX-XXXXX-XXXXX-XXXXX/providers/Microsoft.Compute/locations/canadaeast"
I only get the number of cores used, and not total used and the current quota value.

also, it doesn't support output as a table properly
$ az quota show --resource-name "cores" --scope "subscriptions/XXXXX-XXXXX-XXXXX-XXXXX/providers/Microsoft.Compute/locations/canadaeast" -o table
Command group 'quota' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Name
cores

Thanks for the update, it does appear to work now.
I have a question though, maybe I'm missing an argument or overlooking something.
When running "az quota usage show --resource-name "cores" --scope "subscriptions/XXXXX-XXXXX-XXXXX-XXXXX/providers/Microsoft.Compute/locations/canadaeast"
I only get the number of cores used, and not total used and the current quota value.
Edit: I see the total amount with "az quota show --resource-name "cores" --scope "subscriptions/XXXXX-XXXXX-XXXXX-XXXXX/providers/Microsoft.Compute/locations/canadaeast"
but there is no simple way that I've seen just to show you're using 100/200 cores for example.

For usage, please call usage API-
https://learn.microsoft.com/en-us/cli/azure/quota/usage?view=azure-cli-latest

authors: ZengTaoxu coderplay dawlysd derekpurdy hengv jainr jamesongithub jsntcy jtvcodes mpowrie nharper285 omarkass rahuls-microsoft yonzhan


text:
az login command failure

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az login
Errors:
Paste here the error message you have received. Make sure to remove all sensitive information,
such as user name, password, credential, subscription ID, etc.

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 login

Expected Behavior
Environment Summary
Linux-5.19.0-32-generic-x86_64-with, Alpine Linux v3.17
Python 3.10.9
Installer: DOCKER

azure-cli 2.45.0

Additional Context

Nslookup is fine so not a dns issue
7e3eedd15a8f:/# nslookup login.microsoftonline.com
Server:		192.168.0.1
Address:	192.168.0.1:53
Non-authoritative answer:
login.microsoftonline.com	canonical name = login.mso.msidentity.com
login.mso.msidentity.com	canonical name = ak.privatelink.msidentity.com
ak.privatelink.msidentity.com	canonical name = www.tm.ak.prd.aadg.trafficmanager.net
Name:	www.tm.ak.prd.aadg.trafficmanager.net
Address: 40.126.35.87
Name:	www.tm.ak.prd.aadg.trafficmanager.net
Address: 40.126.35.64
Name:	www.tm.ak.prd.aadg.trafficmanager.net
Address: 20.190.163.21
Name:	www.tm.ak.prd.aadg.trafficmanager.net
Address: 40.126.35.144
Name:	www.tm.ak.prd.aadg.trafficmanager.net
Address: 40.126.35.151
Name:	www.tm.ak.prd.aadg.trafficmanager.net
Address: 20.190.163.19
Name:	www.tm.ak.prd.aadg.trafficmanager.net
Address: 40.126.35.80
Name:	www.tm.ak.prd.aadg.trafficmanager.net
Address: 20.190.163.18
Non-authoritative answer:
login.microsoftonline.com	canonical name = login.mso.msidentity.com
login.mso.msidentity.com	canonical name = ak.privatelink.msidentity.com
ak.privatelink.msidentity.com	canonical name = www.tm.ak.prd.aadg.trafficmanager.net

@bebound for awareness

I have the same issue

I also having this issue

I can't repro, it looks like a network issue.
What's the output of this?
cd "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\"
.\python.exe -c "import requests; print(requests.get('https://login.microsoftonline.com/').status_code)"

same issue here.
testing with curl giving error:
curl https://login.microsoftonline.com
curl: (35) Network file descriptor is not connected
(venv) [root@fci-tools autoscaler]# curl -vvv  https://login.microsoftonline.com
* About to connect() to login.microsoftonline.com port 443 (#0)
*   Trying 40.126.35.129...
* Connected to login.microsoftonline.com (40.126.35.129) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* NSS error -5978 (PR_NOT_CONNECTED_ERROR)
* Network file descriptor is not connected
* Closing connection 0
curl: (35) Network file descriptor is not connected

however try to force curl use tls1.1 then it is fine:
curl --tlsv1.1  -vvv  https://login.microsoftonline.com
* About to connect() to login.microsoftonline.com port 443 (#0)
*   Trying 40.126.16.165...
* Connected to login.microsoftonline.com (40.126.16.165) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
*       subject: CN=stamp2.login.microsoftonline.com,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US
*       start date: Nov 27 00:00:00 2022 GMT
*       expire date: Nov 27 23:59:59 2023 GMT
*       common name: stamp2.login.microsoftonline.com
*       issuer: CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: login.microsoftonline.com
> Accept: */*
>
< HTTP/1.1 302 Found

$ python3 -c "import requests; print(requests.get('https://login.microsoftonline.com/').status_code)"
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 453, in connect
cert = self.sock.getpeercert()
File "/usr/lib/python3.10/ssl.py", line 1154, in getpeercert
self._check_connected()
File "/usr/lib/python3.10/ssl.py", line 1119, in _check_connected
self.getpeername()
OSError: [Errno 107] Transport endpoint is not connected
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 453, in connect
cert = self.sock.getpeercert()
File "/usr/lib/python3.10/ssl.py", line 1154, in getpeercert
self._check_connected()
File "/usr/lib/python3.10/ssl.py", line 1119, in _check_connected
self.getpeername()
urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError(107, 'Transport endpoint is not connected'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3/dist-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', OSError(107, 'Transport endpoint is not connected'))

yes this is working now. Thanks.

authors: bebound cpuntha d-caviedes hiephm sanman08 yonzhan


text:
Certain interactive commands complete with 'NoneType' object has no attribute 'init_progress'

Install Method: apt-get
CLI Version:
azure-cli (2.0.24)

acr (2.0.18)
acs (2.0.23)
advisor (0.1.1)
appservice (0.1.23)
backup (1.0.4)
batch (3.1.8)
batchai (0.1.4)
billing (0.1.7)
cdn (0.0.11)
cloud (2.0.11)
cognitiveservices (0.1.10)
command-modules-nspkg (2.0.1)
configure (2.0.13)
consumption (0.2.1)
container (0.1.16)
core (2.0.24)
cosmosdb (0.1.16)
dla (0.0.16)
dls (0.0.19)
eventgrid (0.1.7)
extension (0.0.7)
feedback (2.0.7)
find (0.2.8)
interactive (0.3.12)
iot (0.1.16)
keyvault (2.0.16)
lab (0.0.14)
monitor (0.0.14)
network (2.0.20)
nspkg (3.0.1)
profile (2.0.17)
rdbms (0.0.10)
redis (0.2.11)
reservations (0.1.1)
resource (2.0.20)
role (2.0.16)
servicefabric (0.0.8)
sql (2.0.18)
storage (2.0.22)
vm (2.0.23)

Python location '/opt/az/bin/python3'
Extensions directory '/home/tda/.azure/cliextensions'

Python (Linux) 3.6.1 (default, Jan  5 2018, 21:18:08)
[GCC 4.8.4]

OS Version:
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

Shell: bash
Issue:

az interactive. Output:

az>> Command: provider list not in Command Table
Command: sql db op cancel not in Command Table
Command: storage account generate-sas not in Command Table

Hit enter and create a new group:

az>> group create -n test -l westeurope -o json

Try and delete the group:

az>> group delete -n test -y
'NoneType' object has no attribute 'init_progress'
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 193, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 319, in execute
    six.reraise(*sys.exc_info())
  File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
    raise value
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 303, in execute
    result = LongRunningOperation(self.cli_ctx, 'Starting {}'.format(cmd.name))(result)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 438, in __call__
    self.cli_ctx.get_progress_controller().begin()
  File "/opt/az/lib/python3.6/site-packages/azclishell/app.py", line 679, in progress_patch
    self.cli_ctx.progress_controller.init_progress(ShellProgressView())
AttributeError: 'NoneType' object has no attribute 'init_progress'
'int' object has no attribute 'result'
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/azclishell/app.py", line 660, in cli_execute
    if result and result.result is not None:
AttributeError: 'int' object has no attribute 'result'
az>>

Additional Information:
The group is deleted but the it exits immediately without waiting for the completion (without --no-wait)
The intellisence / autocompletion does not seem to work either

I have the same problem running some commands like creation of vm(ss):
azure-cli (2.0.27)

acr (2.0.21)
acs (2.0.26)
advisor (0.1.2)
appservice (0.1.26)
backup (1.0.6)
batch (3.1.10)
batchai (0.1.5)
billing (0.1.7)
cdn (0.0.13)
cloud (2.0.12)
cognitiveservices (0.1.10)
command-modules-nspkg (2.0.1)
configure (2.0.14)
consumption (0.2.1)
container (0.1.18)
core (2.0.27)
cosmosdb (0.1.19)
dla (0.0.18)
dls (0.0.19)
eventgrid (0.1.10)
extension (0.0.9)
feedback (2.1.0)
find (0.2.8)
interactive (0.3.16)
iot (0.1.17)
keyvault (2.0.18)
lab (0.0.17)
monitor (0.1.2)
network (2.0.23)
nspkg (3.0.1)
profile (2.0.19)
rdbms (0.0.12)
redis (0.2.11)
reservations (0.1.1)
resource (2.0.23)
role (2.0.19)
servicefabric (0.0.10)
sql (2.0.21)
storage (2.0.25)
vm (2.0.26)

Python location '/home/paraita/lib/azure-cli/bin/python'
Extensions directory '/home/paraita/.azure/cliextensions'

Python (Linux) 3.6.4 (default, Jan  5 2018, 02:35:40)
[GCC 7.2.1 20171224]

Legal docs and information: aka.ms/AzureCliLegal

I'm running Archlinux, the cli has been installed with:
curl -L https://aka.ms/InstallAzureCli | bash

The commands works but I kinda lose the progress character animation.

authors: jsacapdev paraita


text:
[AppService] Fix #12251 app settings racing condition during zip deploy

Resolves: https://github.com/Azure/azure-cli/issues/12251
History Notes:
[App Service - functionapp] (az functionapp deployment source config-zip) Fix an issue caused by app settings change racing condition during zip deploy, giving 5xx errors during deployment.

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.

Please review when you have time @ankitkumarr @gzuber

hi @qwordy could you pls help to review? thanks.

add to S166.

hi @qwordy could you pls help to review? thanks.

Yeah. it's a large PR.

hi @qwordy could you pls help to review? thanks.

yeah. it's a large PR.

Hi @qwordy,
Yea sorry for the confusion when you reviewing this PR, let me guide you through with the following steps.
In Azure Functions App, there are two sites: the main site for handling user requests, and the SCM site for performing the deployment build. When changing an app setting in Azure CLI, it takes a while to propagate to the SCM site. If a build is initiated during app settings propagation, the build will be interrupted.
This main logic change in this PR are as follows:

L422 L457 Add a polling blocker and wait for app settings to be completely propagated to the SCM site before initiating a build action.
L800 Create a utility for comparing if the app settings in SCM site match the ARM one, for ensuring the propagation is completed.
L820 Create a REST request with retry pattern for querying app settings from the SCM site api/settings endpoint.

If you have any further questions, feel free to let me know. Thanks in advance.

Hi @qwordy,
Yea sorry for the confusion when you reviewing this PR, let me guide you through with the following steps.
In Azure Functions App, there are two sites: the main site for handling user requests, and the SCM site for performing the deployment build. When changing an app setting in Azure CLI, it takes a while to propagate to the SCM site. If a build is initiated during app settings propagation, the build will be interrupted.
This main logic change in this PR are as follows:
1. [L422](https://github.com/Azure/azure-cli/pull/12262/files#diff-75a1767a60b87df72982d626136921dbR422) [L457](https://github.com/Azure/azure-cli/pull/12262/files#diff-75a1767a60b87df72982d626136921dbR457) Add a polling blocker and wait for app settings to be completely propagated to the SCM site before initiating a build action.

2. [L800](https://github.com/Azure/azure-cli/pull/12262/files#diff-75a1767a60b87df72982d626136921dbR800) Create a utility for comparing if the app settings in SCM site match the ARM one, for ensuring the propagation is completed.

3. [L820](https://github.com/Azure/azure-cli/pull/12262/files#diff-75a1767a60b87df72982d626136921dbR820) Create a REST request with retry pattern for querying app settings from the SCM site api/settings endpoint.

If you have any further questions, feel free to let me know. Thanks in advance.

Thanks for detailed explanation.

@Juliehzl hi, code owner, please take a look, thanks

Hi @Juliehzl, please take a look, this is scheduled to be to the S166 train.

source: gharchive/pull-request

authors: Hazhzeng qwordy yonzhan yungezz


text:
[acr] fix a bug when run check-health behind corporate proxy

Fix #17172

[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.

@fengzhou-msft @yungezz please go ahead to merge. Thanks


text:
{Consumption} az consumption: Remove sdk

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.

Consumption

authors: ZengTaoxu yonzhan


text:
[network] az network application-gateway http-listener create Update help message for --frontend-port argument

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
Summary
This Pull Request updates the help message for the --frontend-port option in the az network application-gateway http-listener create command. The previous message, "Name or ID of the frontend port.", led to some confusion as it could be interpreted as asking for the port number or a TCP name. There have been issues raised due to this misunderstanding.
ref. Command "az network application-gateway http-listener create" does not work. #16567
Changes
The help message for --frontend-port has been clarified to explicitly state that it is not asking for the port number. The new message is: "This is NOT for the port number. Please input the Resource Name or ID of the frontend port, which can be found using 'az network application-gateway frontend-port list'."
Impact
This change will help users understand what is expected for the --frontend-port option and prevent future misunderstandings. 😄

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.

network

Yes, but these files are generated. Means it cannot be modified directly, unless it'll be overwritten by the next generation.
You can leverage such codegen tool https://github.com/Azure/aaz-dev-tools to apply the above changes. :)

Thank you for your message! I appreciate your guidance. I’ll give it a try and apply the changes using the Azure/aaz-dev-tools codegen tool. 😊

authors: koudaiii necusjz yonzhan


text:
[VMSS] Fix subtle issue with VMSS diagnostics set

In PR #4579, @lmazuel is testing a change to msrest that rejects the default Python behavior of treating strings as iterables, which causes this test to fail. Instead of sending a string, we send the string wrapped in a list, which is what is intended. This causes no customer-facing changes.

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

[N/A] 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).

Command Guidelines

[X] Each command and parameter has a meaningful description.
[N/A] Each new command has a test.

(see Authoring Command Modules)

@lmazuel @tjprescott , is this the only place that is broken, or we are still in the process to dig out all of them?

@yugangw-msft Should be the only place, according to CI in https://github.com/Azure/azure-cli/pull/4579

@yugangw-msft @tjprescott I lost write access to this repo (i.e. I can't merge). If it's on purpose I get it (I'm not technically CLI team). If it's not on purpose, can you add me to the right team?

authors: lmazuel tjprescott yugangw-msft


text:
Update prompt-toolkit to 2.0.9

We ran into a problem when trying to install azure-cli on top of a conda environment.  The problem is that azure-cli specifies an old version of prompt-toolkit, and installing it forces a downgrade and that breaks the jupyter kernel.
This PR updates the version to the one that is current in conda.

As we talked about offline, I'm happy with the principle! Looks like you're still at the beginning of the journey here.

authors: elibarzilay marstr


text:
Note to unblock the downloaded file

The standard approach for file downloaded from the Internet in Edge or Internet Explorer is to mark them as blocked. If you extract files from such a downloaded archive, then those extracted files are similarly marked. PowerShell may then refuse to run those extracts, thereby making them fail.
Removing the block removes the failure, but is a security risk, so you must trust the source.
There may be other solutions, like dropping the security stance of PS, marking the source url as trusted, etc, but they're quite broad and this is specifically for this file. I also included the why, which is odd in brief instructions, so that it was searchable. I came across the solution here, but it took a while to find it and wanted to make it quicker for everyone else (who hasn't had this fairly generic problem before).

Hi @tinymoth, 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;

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

Hi @tinymoth
the files are now updated to be signed self extractables, which prevent the flagging issue you note.
thanks
david

#sign-off

@tysonn Please Merge

authors: Dumagar PRmerger azurecla tinymoth v-anpasi

repo: Azure/azure-content


text:
Update sql-database-performance-guidance.md

modifying the following quries
SELECT @@version;
GO
/*
Microsoft SQL Azure (RTM) - 12.0.2000.8
Apr 27 2016 19:29:47
Copyright (c) Microsoft Corporation
*/
SELECT
avg(avg_cpu_percent) AS 'Average CPU Utilization In Percent',
max(avg_cpu_percent) AS 'Maximum CPU Utilization In Percent',
avg(avg_data_io_percent) AS 'Average Physical Data IO Utilization In Percent',
max(avg_data_io_percent) AS 'Maximum Physical Data Read Utilization In Percent',
avg(avg_log_write_percent) AS 'Average Log Write Utilization In Percent',
max(avg_log_write_percent) AS 'Maximum Log Write Utilization In Percent',
avg(max_session_percent) AS 'Average % of Sessions',
max(max_session_percent) AS 'Maximum % of Sessions',
avg(max_worker_percent) AS 'Average % of Workers',
max(max_worker_percent) AS 'Maximum % of Workers'
FROM sys.resource_stats
WHERE database_name = 'userdb1' AND start_time > DATEADD(day, -7, GETDATE());
SELECT
(COUNT(database_name) - SUM(CASE WHEN avg_cpu_percent >= 40 THEN 1 ELSE 0 END) * 1.0) / COUNT(database_name) AS 'CPU Fit Percent'
,(COUNT(database_name) - SUM(CASE WHEN avg_log_write_percent >= 40 THEN 1 ELSE 0 END) * 1.0) / COUNT(database_name) AS 'Log Write Fit Percent'
,(COUNT(database_name) - SUM(CASE WHEN avg_data_io_percent >= 40 THEN 1 ELSE 0 END) * 1.0) / COUNT(database_name) AS 'Physical Data Read Fit Percent'
FROM sys.resource_stats
WHERE database_name = 'userdb1' AND start_time > DATEADD(day, -7, GETDATE());
SELECT
(COUNT(database_name) - SUM(CASE WHEN avg_cpu_percent >= 100 THEN 1 ELSE 0 END) * 1.0) / COUNT(database_name) AS 'CPU Fit Percent'
,(COUNT(database_name) - SUM(CASE WHEN avg_log_write_percent >= 100 THEN 1 ELSE 0 END) * 1.0) / COUNT(database_name) AS 'Log Write Fit Percent'
,(COUNT(database_name) - SUM(CASE WHEN avg_data_io_percent >= 100 THEN 1 ELSE 0 END) * 1.0) / COUNT(database_name) AS 'Physical Data Read Fit Percent'
FROM sys.resource_stats
WHERE database_name = 'userdb1' AND start_time > DATEADD(day, -7, GETDATE());

Hi @jiyongseong, 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;

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

@cjgronlund  OK to publish

@sign-off

@carlrabeler, as author you need to add the #sign-off

The ready-to-merge label could not be added to this pull request. Only the author of the article can use the sign off comment to add the ready-to-merge label.

#sign-off

@cjgronlund OK to publish

Only the author of the article can use the sign off comment to add the ready-to-merge label.

@JennieHubbard Cannot seem to get this to merge - I have signed off - but it says only the author can sign off - I am the author - what gives? please explain
@cjgronlund Cannot seem to get this to merge - I have signed off - but it says only the author can sign off - I am the author - what gives? please explain

Carl, this is happening because your article metadata doesn't match your account exactly:

article: authors="carlrabeler"
your account=CarlRabeler

I will merge.

authors: CarlRabeler JennieHubbard PRmerger azurecla jiyongseong tysonn


text:
Direct version: Adds version 3.13.2

Pull Request Template
Description
3.13.2 adds recent performance improvements from master.
Type of change
Please delete options that are not relevant.

[] Bug fix (non-breaking change which fixes an issue)
[] New feature (non-breaking change which adds functionality)
[] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[] This change requires a documentation update

Closing issues
To automatically close an issue: closes #IssueNumber

Worth adding to the changelog as perf improvements?

I'm planning to just update the changelog when we finally do a release so it has all the changes.


text:
.parameters.json would be nice to have back

A few of the investments we're thinking of making on the .NET side would lend themselves very-very well to having support for individual module parameter JSON files added back in. Take a complex app with 5 container apps in it, for example, but with only 2-3 variations per app in terms of their settings or environment variables. If customers could have the JSON approach to editing these settings and having single-project capabilities for editing variables, it could be a lot less daunting for developers who don't-yet-know Bicep but want to take advantage of it.
CC @jongio, with whom I met today on this, as he'll have more context for the team.

Was also chatting with @bradygaster today about some of these scenarios. @rajeshkamal5050 would be good to prioritize smoothing this out next iteration.

Thanks @savannahostrowski - @rajeshkamal5050 we essentially have some plans we're trying to shore up for November, and one of the things we want to invest in is a tighter integration option between .NET and AZD, and if it's possible that we could get these JSON files back in, or, be updated on how individual modules can be parameterized via JSON, it'd be super-helpful as we're creating click-throughs and mock-ups.

I do wonder how much of this you could build outside of azd today.  Bicep already has a loadJsonContent feature that allows you to load and use a JSON document as part of your template.  It seems like you could use that to get most of the way to what you want, without having to involve azd at all.
azd does allow you to do replacements, based on values in the environment, in our .parameters.json files (as well as some other intrinsics, like looking up a secret from KeyVault or generating a new one if it didn't exist), and you wouldn't be able to leverage that with the above approach, because this whole scheme would be transparent to azd.  I could imagine some hacks there (like using a pre-provisioning hook to modify the .prameters.json files) but that's definitely a place where doing some azd specific work could yield improvements.

I specifically tried using <modulename>.parameters.json to no avail. It seems as if the per-module parms files was recently deprecated or something. Apologies if I'm using it wrong [open to feedback/guidance].

I specifically tried using .parameters.json to no avail. It seems as if the per-module parms files was recently deprecated or something. Apologies if I'm using it wrong [open to feedback/guidance].

IIRC, We only ever supported using a .parameters.json for the top level template (i.e. main.parameters.json corresponding to main.bicep).
What I envisioned is doing something more in the template itself, as you could do with any bicep template.
https://github.com/Azure-Samples/todo-nodejs-mongo/compare/main...ellismg:todo-nodejs-mongo:ellismg/use-json-file-with-modules
Has a little sketch of what I was thinking you could do today, with the released version of azd by just using the loadJsonContent feature in bicep to read api.settings.json (you can name this file whatever you want, I used .settings.json instead of .parameters.json to make it clear it need not be an ARM Template Parameters file) and then use that value if it is set.
This file can only contain fixed strings, not replacements like ${AZURE_ENV_NAME}, but I wonder how far you can with that today.

Let's get @wbreza input as he implemented the module.parameters.json initially and then recently removed it.  He'll have more insight.

This file can only contain fixed strings, not replacements like ${AZURE_ENV_NAME},

That's unfortunate and would mitigate me wanting to try that route. I'd be giving up the ability to read environment variables generated by main.bicep and the provisioning process. That's one of the key features of AZD I'd want.

Let's get @wbreza input as he implemented the module.parameters.json initially and then recently removed it. He'll have more insight.

Ahh - this makes me better understand what the request was here.  This support was only for container apps and was tied to how we did Azure Container App deployments when we first added the feature.  In that world, deploy for an ACA app would end up doing a bicep deployment to deploy a module that represented just the service itself.
Since this was a top level deployment, we were able to use api.parameters.json to control the parameters that were passed to the the api.bicep module.  Changed to this api.parameters.json file were not used however for the initial azd provision, only on azd deploy.
Initially I thought this was about using a parameters file to control the parameters for any arbitrary module used from the root deployment.  I see now that this is perhaps specific to ACA.
We removed the api.parameters.json support because we shifted to a world where deploy for container apps meant "just go update the image ID on the existing resource" and once we did that there was no longer an ARM deployment to configure.
Somewhat related to this was the work we were thinking about with container apps to use a yaml based file to explain the deployment instead of doing all this stuff in bicep.  I had sketched out what that might mean here.  In this world, instead of authoring bicep for each container app you want to deploy, you'd instead write a yaml file that describes your app, similar to a k8s manifest and then azd would do replacements in that yaml template and push it to the container apps control plane to have the app created. It may be more palatable to edit this file vs a bicep template, and the fact that we had separate ones per container app could be helpful.  There are probably many properties of this yaml we could have azd default if the are not set before it is pushed to the control plane, so things could be even simpler.

@bradygaster closing this one. Given the integrations happening on the .NET side which is tracked here - https://github.com/Azure/azure-dev-pr/issues/1579

authors: bradygaster ellismg jongio rajeshkamal5050 savannahostrowski

repo: Azure/azure-dev


text:
Minimum version check should be 5.0 not 3.0

Line 73 Test-PowerShellVersion -Version 3.0
This check is for the PSWindowsUpdate module.
However, on line 76 there is this Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null
Line 76 requires Powershell 5 or higher. When I tried to add this artifact to an image with an older version of Windows (e.g. Server 2012 R2), the artifact fails.

RE: https://github.com/Azure/azure-devtestlab/blob/master/Artifacts/windows-install-windows-updates/artifact.ps1

repo: Azure/azure-devtestlab

license: mit

license_source: bigquery


text:
Using protected environment in container environment

I am trying to figure out how to use environment from protected in a container environment.
From README.md, I think it should be done like this:
    "cache" : {
        "image" : "memcached",
        "ports" : ["11211:11211"],
        "environment": [ "SECRET_ENV=${SECRET_ENV}" ]
    }

Looking at azure-docker-extension/integration-test/extensionconfig/public.json, makes me think this is the right approach:
    "cache" : {
        "image" : "memcached",
        "ports" : ["11211:11211"],
        "environment": [ "SECRET_ENV" ]
    }

How can the protected environment be used in the container environment?
Perhaps the readme can be updated to make this more clear?

@tmds the integration test actually gives a good idea, that's how public.json should be like. Then you need to specify the value of SECRET_ENV in protected.json: https://github.com/Azure/azure-docker-extension/blob/master/integration-test/extensionconfig/protected.json in ARM templates this JSON file goes under "protectedSettings" key. It is documented under 1.2. Protected Configuration Keys in the README:
https://github.com/Azure/azure-docker-extension#12-protected-configuration-keys

The documentation says:

compose: (optional, JSON object) the compose.yml file to be used, converted to JSON. If you are considering to embed secrets as environment variables in this section, please see the "environment" key described below.

environment: (optional, JSON object) Key value pairs to store environment variables to be passed to docker-compose securely. By using this, you can avoid embedding secrets in the unencrypted "compose" section.

The compose file reference says:

You can use environment variables in configuration values with a Bash-like ${VARIABLE} syntax

When I read this, my assumption is [ "SECRET_ENV=${SECRET_ENV}" ] will set the variable in the compose section, passed from protected as an environment variable to compose.
Is it possible to set variables directly in the compose container environment, without using protected environment variables?

@tmds ah maybe the SOME_NAME=${SOME_OTHER_NAME} syntax might be a way to rename environment keys. Like maybe in protected session you specify PASSWORD and in compose.yml, use it as MYSQL_PASSWORD and so forth.
If you don't want to rename the keys, in compose.yml you can just say environment: [ "SECRET_ENV"]  and it will use the SECRET_ENV var directly (you don't need the =${...}).
Basically what we do is, we read the environment variables and their values specified in protected sessions, pass that to docker-compose process. That's pretty much it. Depending on the .yml you specify, they'll get used or discarded.
So if you have a public configuration with "environment" key like:

and protected configuration with contents like:

your container will indeed get SECRET_ENV value. Based on your needs, you can rename these fields.

Indeed, both syntaxes should work. From the compose file reference:

Environment variables with only a key are resolved to their values on the machine Compose is running on, which can be helpful for secret or host-specific values.

@tmds does that resolve the issue for you?

I will try some of these things out tomorrow and if everything works fine (which I expect to be the case), I'll close the issue.

@ahmetalpbalkan Both syntaxes work fine. Thanks for your help.

@tmds great to hear, please let us know if you run into any more questions.

authors: ahmetalpbalkan tmds

repo: Azure/azure-docker-extension


text:
Update Get-MsolGroupMember.md

Adding valid values to documentation. Are there other valid values?
-MemberObjectTypes
Valid values are User, ServicePrincipal.

:x: Validation status: errors

File
Status
Preview URL
Details

:x:Error

Details

Line 108: [Error] Restore nuget package W:\hiaz-s.optemp\dependentPackages\Microsoft.OpenPublishing.CommonPlugins\packages.config in folder:W:\hiaz-s.optemp\packages failed, possibly due to transient errors from nuget servers. Please retry building your content. If the issue still happens, open a ticket in http://SiteHelp. Detailed error:  Errors in packages.config projects     Unable to find version '1.0.149-alpha' of package 'Microsoft.OpenPublishing.CommonPlugins'.       D:\Windows\system32\config\systemprofile.nuget\packages: Package 'Microsoft.OpenPublishing.CommonPlugins.1.0.149-alpha' is not found on source 'D:\Windows\system32\config\systemprofile.nuget\packages'.       https://www.myget.org/F/op-dev/api/v2: Package 'Microsoft.OpenPublishing.CommonPlugins.1.0.149-alpha' is not found on source 'https://www.myget.org/F/op-dev/api/v2'.
Line 290: [Error] Restore dependent packages failed

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

So... Not sure what more I need to do here. Was the suggestion received? :)

Hi @jonwbstr
Per the read me file:
Please be aware that if you have any updates to automatically generated reference content, you should create an issue and not a PR.  The issue will then be created into a bug and triaged accordingly.  We do this because the reference content must mirror the *dll-help.xml file and subsequent updates to the reference content may overwrite any changes made through the repo.  Capturing it in the source code ensures that this does not occur.  Any PR with changes to automatically generated reference content will be closed.
Automatically generated reference content is any of the content under this Reference node, such as Get-AzureADUser
This only applies to reference content and not conceptual content.  Pull requests for changes to conceptual content are accepted and encouraged.  An example of the conceptual content is the Overview or a scenario such as importing data.
Thank you!
Bill

authors: VSC-Service-Account billmath jonwbstr

repo: Azure/azure-docs-powershell-azuread


text:
Cosmos DB | Update for Az.CosmosDB 0.1.4 | Gremlin

Description
Update samples to reflect changes in Az.CosmosDB 0.1.4 release. This PR is for Gremlin-specific samples.
Checklist

[X] This pull request was tested on both of:

[X] PowerShell 5.1 (Windows)
[ ] PowerShell 6.x
[X] PowerShell 7.x (Latest PowerShell)

[X] Scripts do not contain static passwords or other secret tokens.
[X] All Azure resource identifiers which must be universally unique are guaranteed to be so.

Testing information
Windows 10.0.18363, Powershell 5.1, Az 3.8.0
Windows 10.0.18363, Powershell 7.0.0, Az 3.8.0

#sign-off

repo: Azure/azure-docs-powershell-samples


text:
Docs.MS Release Updates for Azure.Template

Update docs metadata and targeting for release of Azure.Template

Docs Build status updates of commit 8636048:
:warning: Validation status: warnings

File
Status
Preview URL
Details

api/overview/azure/template-readme-pre.md
:warning:Warning
View
Details

api/overview/azure/template-readme-pre.md

Line 24: [Warning-multiple-h1s] Multiple H1s({0}) are not allowed. You can only have one top-level heading.
Line 63: [Warning-InvalidBookmark] Invalid link: 'Introduction'. The file api/overview/azure/template-readme-pre.md doesn't contain a bookmark named 'introduction'.
Line 71: [Warning-InvalidBookmark] Invalid link: 'List the things'. The file api/overview/azure/template-readme-pre.md doesn't contain a bookmark named 'list-the-things'.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

authors: VSC-Service-Account azure-sdk

repo: Azure/azure-docs-sdk-dotnet


text:
Docs.MS CI Updates for Azure.AI.AnomalyDetector

CI Update for release of Azure.AI.AnomalyDetector

Docs Build status updates of commit 75052de:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

bundlepackages/azure-dotnet-preview.csv
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit ed7a7e9:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

bundlepackages/azure-dotnet-preview.csv
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


text:
[Azure Overview] Event Hubs

Summary
The focus of these changes is to update the Event Hubs overview to match the format of the guideline template.   This overview has also been reflected to the Azrue SDK repository.
Last Upstream Rebase
Friday, November 20, 10:24am (EST)

Docs Build status updates of commit a05d29d:
:warning: Validation status: warnings

File
Status
Preview URL
Details

api/overview/azure/event-hubs.md
:warning:Warning
View
Details

api/overview/azure/event-hubs.md

Line 1, Column 1: [Warning-title-missing] Missing required attribute: 'title'. Add a title string to show in search engine results.
Line 1, Column 1: [Warning-ms-prod-or-service-missing] One of the following attributes is required: 'ms.prod', 'ms.service'. Use ms.prod for on-premise products, or ms.service for cloud services.
Line 1, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.
Line 17, Column 1: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? If so, add &preserve-view=true to the URL: https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs?view=azure-dotnet
Line 18, Column 1: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? If so, add &preserve-view=true to the URL: https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs?view=azure-dotnet
Line 28, Column 1: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? If so, add &preserve-view=true to the URL: https://docs.microsoft.com/dotnet/api/overview/azure/eventhubs/v4?view=azure-dotnet
Line 29, Column 1: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? If so, add &preserve-view=true to the URL: https://docs.microsoft.com/dotnet/api/microsoft.azure.eventhubs.processor?view=azure-dotnet
Line 37, Column 1: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? If so, add &preserve-view=true to the URL: https://docs.microsoft.com/dotnet/api/overview/azure/eventhubs/management?view=azure-dotnet

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit ac8f5b4:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

api/overview/azure/event-hubs.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Links check out. Ref, github, and samples links present. LGTM!

authors: VSC-Service-Account jsquire scbedd


text:
Re-enable creation of function apps

The following  issues were closed with the reasoning that the functionality has been moved to azure-cli:

https://github.com/Azure/azure-functions-cli/issues/75
https://github.com/Azure/azure-functions-cli/issues/50

However, azure cli does not contain the expected functionality: https://github.com/Azure/azure-cli/issues/2352
Thus: There is currently no way to create azure function apps using the command line. This tool was the only way. Now there is none. You removed it. Please re-add it.

@lindydonna

@Zazcallabah Unfortunately you'll have to wait for the functionality in the Azure CLI, which is coming soon. We don't want to add it to the Azure Functions CLI now, since we'd remove it as soon as it was part of the Azure CLI.
For now, you can create a function app by using the az appservice web commands and manually setting up the storage account connection string. The required properties are listed here: https://github.com/Azure/azure-quickstart-templates/blob/master/101-function-app-create-dynamic/azuredeploy.json#L62

Closing in favor of https://github.com/Azure/azure-cli/issues/2352

authors: Zazcallabah ahmelsayed lindydonna

repo: Azure/azure-functions-cli


text:
CVE-2022-40674 in dotnet 4-slim

Hi
Is there work in progress to resolve this critical vulnerability in the dotnet 4-slim image?
https://nvd.nist.gov/vuln/detail/CVE-2022-40674
I believe a fix is available in the underlying package.
Thanks
Bryan

Hi Bryan,
Thank you for filing this ticket. I know its been a while, but I just want to confirm that this vulnerability no longer exists in our 4-slim images. We are actively working on our release tooling to provide more continuous updates to the available images. We strive to get patches out as quickly as possible.
Cooper

authors: CooperLink asos-bryanharveysmith

repo: Azure/azure-functions-docker


text:
Request for dotnet alpine based image support

Issue Description
I am writing to submit a feature request regarding the vulnerability issues present in the current image. As outlined in the following references, there have been concerns raised about vulnerability risks associated with the existing Debian based image.

Stack Overflow thread: Azure Function App Docker Image Vulnerability Issue
Blog post: Running Azure Functions in Kubernetes is Evil

Building the Custom Alpine based Image
As the previous comment, I believe that publishing alpine based would be a good solution.

https://github.com/Azure/azure-functions-docker/issues/431#issuecomment-897218822

To demonstrate the feasibility of this solution, I have successfully built a custom image using the following Dockerfile according to this tutorial.
some highlights:

use alpine base image
use apk command
change runtime flag in dotnet publish command

# Build the runtime from source
ARG HOST_VERSION=4.21.0
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine3.17 AS runtime-image
ARG HOST_VERSION

ENV PublishWithAspNetCoreTargetManifest=false

# install alpine-pkg-glibc to solve dependency issue
# https://github.com/grpc/grpc/issues/18428#issuecomment-535041155
RUN apk add --no-cache curl
RUN curl -s -qL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub
RUN curl -s -qL https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk -o glibc-2.32-r0.apk
RUN apk add --no-cache --force-overwrite glibc-2.32-r0.apk

RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \
    git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \
    cd /src/azure-functions-host && \
    # dotnet restore src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj /p:IsDockerBuild=true && \
    # dotnet publish src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release -o /azure-functions-host && \
    dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime alpine-x64 --self-contained -p:PublishReadyToRun=false && \
    mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \
    rm -rf /root/.local /root/.nuget /src

RUN apk update && \
    apk add gnupg wget unzip && \
    EXTENSION_BUNDLE_VERSION_V2=2.24.0 && \
    EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \
    wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \
    mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \
    unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \
    rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\
    EXTENSION_BUNDLE_VERSION_V3=3.22.0 && \
    EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \
    wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \
    mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \
    unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \
    rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\
    EXTENSION_BUNDLE_VERSION_V4=4.5.0 && \
    EXTENSION_BUNDLE_FILENAME_V4=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V4}_linux-x64.zip && \
    wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V4/$EXTENSION_BUNDLE_FILENAME_V4 && \
    mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V4 && \
    unzip /$EXTENSION_BUNDLE_FILENAME_V4 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V4 && \
    rm -f /$EXTENSION_BUNDLE_FILENAME_V4 &&\
    find /FuncExtensionBundles/ -type f -exec chmod 644 {} \;

FROM mcr.microsoft.com/dotnet/runtime-deps:6.0-alpine3.17
ARG HOST_VERSION

ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
    HOME=/home \
    FUNCTIONS_WORKER_RUNTIME=dotnet \
    DOTNET_USE_POLLING_FILE_WATCHER=true \
    HOST_VERSION=${HOST_VERSION} \
    ASPNETCORE_CONTENTROOT=/azure-functions-host

# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157
RUN apk update && \
    apk add libc-dev && \
    apk upgrade libssl3 libcrypto3

COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ]
COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ]

CMD [ "/azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost" ]

Feature Request
I kindly request the Azure Functions Docker team to consider integrating support for an alpine based image in the official release. By providing an official alpine based image, developers can benefit from enhanced security and reduced vulnerability risks when deploying Azure Functions in containerized environments.
Regards,
Jerry

Hi @jlee58tw will update you

Alpine Linux is  for its focus on security and minimal attack surface. Its small size and  approach  to reduce the risk of vulnerabilities and make it easier to maintain a secure environment.
By leveraging the Alpine base image, developers can benefit from the optimized and hardened packages provided by Alpine Linux. This helps mitigate potential vulnerabilities and ensures a more secure execution environment for Azure Functions

I second with you. alpine is an excellent choice. I'm happy to assist you in supporting it with the dotnet image.

No christmas miracle? Perhaps as easter miracle 😁

Yes please.

@jlee58tw
Been trying to use your docker file as basis for one running .net 8 and Azure Durable Function isolated. However when I run the container I get the error:
System.IO.IOException: Error loading native library "/home/site/wwwroot/.azurefunctions/libgrpc_csharp_ext.x64.so". Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /home/site/wwwroot/.azurefunctions/libgrpc_csharp_ext.x64.so)

Any change you have tried the same and found a solution?
My dockerfile looks like this:

# Build the runtime from source
ARG HOST_VERSION=4.30.0
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.19 AS runtime-image
ARG HOST_VERSION

ENV PublishWithAspNetCoreTargetManifest=false

# install alpine-pkg-glibc to solve dependency issue
# https://github.com/grpc/grpc/issues/18428#issuecomment-535041155
RUN apk add --no-cache curl
RUN curl -s -qL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub
RUN curl -s -qL https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk -o glibc-2.32-r0.apk
RUN apk add --no-cache --force-overwrite glibc-2.32-r0.apk

RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \
    git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \
    cd /src/azure-functions-host && \
    # dotnet restore src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj /p:IsDockerBuild=true && \
    # dotnet publish src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release -o /azure-functions-host && \
    dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime alpine-x64 --self-contained -p:PublishReadyToRun=false && \
    mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \
    rm -rf /root/.local /root/.nuget /src

RUN apk update && \
    apk add gnupg wget unzip && \
    EXTENSION_BUNDLE_VERSION_V2=2.24.0 && \
    EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \
    wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \
    mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \
    unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \
    rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\
    EXTENSION_BUNDLE_VERSION_V3=3.22.0 && \
    EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \
    wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \
    mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \
    unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \
    rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\
    EXTENSION_BUNDLE_VERSION_V4=4.12.0 && \
    EXTENSION_BUNDLE_FILENAME_V4=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V4}_linux-x64.zip && \
    wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V4/$EXTENSION_BUNDLE_FILENAME_V4 && \
    mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V4 && \
    unzip /$EXTENSION_BUNDLE_FILENAME_V4 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V4 && \
    rm -f /$EXTENSION_BUNDLE_FILENAME_V4 &&\
    find /FuncExtensionBundles/ -type f -exec chmod 644 {} \;

FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine3.19
ARG HOST_VERSION

ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
    HOME=/home \
    FUNCTIONS_WORKER_RUNTIME=dotnet \
    DOTNET_USE_POLLING_FILE_WATCHER=true \
    HOST_VERSION=${HOST_VERSION} \
    ASPNETCORE_CONTENTROOT=/azure-functions-host

# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157
RUN apk update && \
    apk add libc-dev && \
    apk upgrade libssl3 libcrypto3

COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ]
COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ]

CMD [ "/azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost" ]

Struggling with the same problem, staying up do date with MS images and still having critical vulnerabilities.
On top of that, I just noticed that there it has the NuGet package marain that uses AGPL license. We're using the NodeJS image, so I'm guessing this package is part of the functions runtime or an extension bundle.

Came across this PR... will try to see if I can make it work with .net 8 tomorrow...
https://github.com/Azure/azure-functions-docker/pull/949/files

Think I managed to make it work with the above Docker file, and a couple of small changes....
# Build the runtime from source
ARG HOST_VERSION=4.30.0
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.19 AS runtime-image
ARG HOST_VERSION

ENV PublishWithAspNetCoreTargetManifest=false

RUN apk update && apk upgrade && \
    apk --no-cache add git gnupg wget unzip grpc grpc-plugins protobuf protobuf-dev protoc

ENV GRPC_PROTOC_PLUGIN=/usr/bin/grpc_csharp_plugin
ENV PROTOBUF_PROTOC=/usr/bin/protoc

RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \
    git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \
    cd /src/azure-functions-host && \
    HOST_COMMIT=$(git rev-list -1 HEAD) && \
    dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-musl-x64 && \
    mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \
    rm -rf /root/.local /root/.nuget /src

RUN EXTENSION_BUNDLE_VERSION_V2=2.27.0 && \
    EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \
    wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \
    mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \
    unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \
    rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\
    EXTENSION_BUNDLE_VERSION_V3=3.26.0 && \
    EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \
    wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \
    mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \
    unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \
    rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\
    EXTENSION_BUNDLE_VERSION_V4=4.12.0 && \
    EXTENSION_BUNDLE_FILENAME_V4=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V4}_linux-x64.zip && \
    wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V4/$EXTENSION_BUNDLE_FILENAME_V4 && \
    mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V4 && \
    unzip /$EXTENSION_BUNDLE_FILENAME_V4 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V4 && \
    rm -f /$EXTENSION_BUNDLE_FILENAME_V4 &&\
    find /FuncExtensionBundles/ -type f -exec chmod 644 {} \;

FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine3.19
ARG HOST_VERSION

ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
    HOME=/home \
    FUNCTIONS_WORKER_RUNTIME=dotnet \
    DOTNET_USE_POLLING_FILE_WATCHER=true \
    HOST_VERSION=${HOST_VERSION} \
    ASPNETCORE_CONTENTROOT=/azure-functions-host

RUN apk update && \
    apk add libc-dev && \
    apk add libc6-compat && \
    apk upgrade libssl3 libcrypto3
COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ]
COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ]

CMD [ "/azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost" ]

Struggling with the same problem, staying up do date with MS images and still having critical vulnerabilities. On top of that, I just noticed that there it has the NuGet package marain that uses AGPL license. We're using the NodeJS image, so I'm guessing this package is part of the functions runtime or an extension bundle.

I looked at the AGPL 3.0 package and this comes from Marain.Net (github.com) which we don’t take a dependency on as far as I can tell.
I scanned the latest Node 4 Slim image and the 4.28.4 image for this and I don’t see this as a license issue to be addressed. Do you have steps to reproduce this?
trivy image mcr.microsoft.com/azure-functions/node:4.28.4-node18-slim --scanners license --license-full --license-confidence-level 0.8
If there are other steps I should follow then let me know. I tested also with a JFrog Xray scan using the Docker Desktop extension.
trivy image mcr.microsoft.com/azure-functions/node:4.28.4-node18-slim --scanners license --license-full --license-confidence-level 0.8
If there are other steps I should follow then let me know. I tested also with a JFrog Xray scan using the Docker Desktop extension.

Any news on this? Funcapp docker images have a lot if critical/high known vulnerabilities at anytime. I would appreciate some love from MS :) Still having issues understanding why funcapp docker images are not within the "dotnet/dotnet-docker" repo like the others... Kinda look like they're not as important.

I tried using smolesen's approach above.  Seems like it technically works, but the resulting image is huge (a few gbs), and that's before I add in any of the application code.
Had to move on to other priority projects, hope to circle back to this eventually.


text:
Azure functions do not show on Azure portal for Timer triggers. - .Net 8 isolated, ~4

Description
My timer trigger functions run okay locally but when deployed, the functions do not show and I get this on the logs;
No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
I run it on .Net 8, the functions_worker_runtime is dotnet-isolated and the extention version is ~4.
Steps to reproduce
Created a timer trigger functions;
local.settings.json
{
    "IsEncrypted": false,
    "Values": {
        "AzureWebJobsStorage": "UseDevelopmentStorage=true",
        "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated"
    }
}

host.json
{
    "version": "2.0",
    "logging": {
        "applicationInsights": {
            "samplingSettings": {
                "isEnabled": true,
                "excludedTypes": "Request"
            },
            "enableLiveMetricsFilters": true
        }
    }
}

@kshyju I deployed through Azure DevOps, I have come to the realization that they do appear if I publish directly from Visual Studio but not through pipelines like the other projects I have, I am still not certain why.
FUNCTIONS_WORKER_RUNTIME is indeed okay and set to "dotnet-isolated".
Below is a list of the packages I am currently using;
<ItemGroup>
  <PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.0" />
  <PackageReference Include="Azure.Identity" Version="1.10.4" />
  <PackageReference Include="Azure.Messaging.EventHubs" Version="5.10.0" />
  <PackageReference Include="Azure.Messaging.EventHubs.Processor" Version="5.10.0" />
  <PackageReference Include="Mapster" Version="7.4.0" />
  <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.20.0" />
  <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.EventHubs" Version="6.1.0" />
  <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.OpenApi" Version="1.5.1" />
  <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.1.0" />
  <PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.16.2" />
  <PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.21.0" />
  <PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.0.0" />
  <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

@franklineomollo  Can you share if you every found out what caused your pipeline to break your timer trigger?  I'm using a common pipeline that sets FUNCTIONS_WORKER_RUNTIME appropriately, and has worked fine on HttpTriggers and DurableOrchestrationContext triggers for other projects as we upgraded to .NET 8/isolated, but no luck so far with TimerTrigger on this project.

authors: DannyMeister franklineomollo

repo: Azure/azure-functions-dotnet-worker


text:
Facing Socket timeout issue while sending data using module_client.send_message_to_output

I am getting below socket timeout error while sending data  to IoT Edge Runtime--->IoT Hub using module_client.send_message_to_output.
transport.connect raised error
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/azure/iot/device/common/mqtt_transport.py", line 340, in connect
host=self._hostname, port=8883, keepalive=DEFAULT_KEEPALIVE
File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 937, in connect
return self.reconnect()
File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 1100, in reconnect
sock.do_handshake()
File "/usr/local/lib/python3.7/ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
socket.timeout: _ssl.c:1059: The handshake operation timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/azure/iot/device/common/pipeline/pipeline_stages_mqtt.py", line 115, in _run_op
self.transport.connect(password=self.sas_token)
File "/usr/local/lib/python3.7/site-packages/azure/iot/device/common/mqtt_transport.py", line 345, in connect
raise exceptions.ConnectionFailedError(cause=e)
azure.iot.device.common.transport_exceptions.ConnectionFailedError: None caused by _ssl.c:1059: The handshake operation timed out
ConnectOperation: completing with error None caused by _ssl.c:1059: The handshake operation timed out
RetryStage(ConnectOperation): Op needs retry with interval 20 because of None caused by _ssl.c:1059: The handshake operation timed out.  Setting timer**.**
Could anyone please help how to resolve this?

++ @BertKleewein

@kaleankush93, I am currently looking at several related failures.  Can I ask if this is causing the send_message_to_output call to raise an exception?  This particular failure should cause the Azure IoT library to retry the connection (assuming the library has successfully connected at least once in the past).

@BertKleewein Thanks for replying!
Yes you are correct. This is causing send_message_to_output call to raise an exception. Till Friday it was working fine. I was getting the messages to IoTHub through this module deployed on the linux device. This issue has appeared today itself. I saw several threads going on.
What could possibly be wrong here?

This may be fixed in 2.1.1 which has several fixes for connection failure issues.  I'm going to investigate a few things in this specific report further to see if I can improve the fix.  Please let me know if this is resolved.

Hi @BertKleewein , Thank you! My issue got resolved after restarting the edge device.

@kaleankush93, @BertKleewein, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey

repo: Azure/azure-iot-sdk-python