Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az containerapp env certificate list fails with "ERROR: unrecognized arguments: --managed-certificates-only" #6879

Closed
m42jbz opened this issue Oct 19, 2023 · 5 comments
Labels
Auto-Assign Auto assign by bot ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.

Comments

@m42jbz
Copy link

m42jbz commented Oct 19, 2023

Describe the bug

The following powershell script is run right after updating a containerapp and fails on a Microsoft hosted agent, but runs fine locally, both on Linux and Windows:

$containerapp = az containerapp list --query "[?name=='<CONTAINERAPP_NAME>']" `
  | ConvertFrom-Json `
  | Select-Object -First 1

$containerappenv = az containerapp env show --id $containerapp.properties.environmentId | ConvertFrom-Json

$customdomaincert = az containerapp env certificate list --managed-certificates-only --name $containerappenv.name --resource-group $containerappenv.resourceGroup `
  | ConvertFrom-Json `
  | Select-Object -First 1

az containerapp hostname bind `
  --hostname $customdomaincert.properties.subjectName `
  -g $customdomaincert.resourceGroup `
  -n $containerapp.name `
  --environment $containerappenv.name `
  --validation-method CNAME

The script is a workaround related to microsoft/azure-container-apps#607

Related command

az containerapp

Errors

ERROR: unrecognized arguments: --managed-certificates-only

Issue script & Debug output

omitted

Expected behavior

The commands run successfully.

Environment Summary

azure-cli 2.53.0

core 2.53.0
telemetry 1.1.0

Extensions:
azure-devops 0.26.0

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

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

Python (Linux) 3.10.10 (main, Sep 20 2023, 06:07:38) [GCC 11.4.0]

Additional context

The script began failing sporadically around Oct 5th, and now is failing consistently since Oct 18th.
It is executed on a Microsoft hosted Azure DevOps build agent, running Ubuntu:

Current agent version: '3.227.2'
Operating System
Ubuntu
22.04.3
LTS
Runner Image
Image: ubuntu-22.04
Version: 20231016.1.0
Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20231016.1/images/linux/Ubuntu2204-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20231016.1
Runner Image Provisioner
2.0.312.1
Current image version: '20231016.1.0'

@m42jbz m42jbz added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Oct 19, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot ContainerApp Service Attention This issue is responsible by Azure service team. labels Oct 19, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Oct 19, 2023

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

@microsoft-github-policy-service
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @calvinsID.

@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Oct 19, 2023
@Greedygre
Copy link
Contributor

Hi @m42jbz

Argument --managed-certificates-only only support in containerapp extension.
You can use az extension add -n containerapp to install the extension.

@m42jbz
Copy link
Author

m42jbz commented Nov 8, 2023

@Greedygre Thank you very much! That solved it for me. I still wonder why it worked before without installing the extension explicitly. It looks like the extension was auto-installed previously, which is not happening anymore for some reason?

Our logs show that this was happening up until Oct 18th (as mentioned above):

2023-10-18T07:01:42.1304405Z WARNING: The command requires the extension containerapp. It will be installed first.
2023-10-18T07:01:51.9468839Z WARNING: The installed extension 'containerapp' is in preview.
2023-10-18T07:02:01.5397231Z WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

@m42jbz m42jbz closed this as completed Nov 8, 2023
@Greedygre
Copy link
Contributor

@Greedygre Thank you very much! That solved it for me. I still wonder why it worked before without installing the extension explicitly. It looks like the extension was auto-installed previously, which is not happening anymore for some reason?

Our logs show that this was happening up until Oct 18th (as mentioned above):

2023-10-18T07:01:42.1304405Z WARNING: The command requires the extension containerapp. It will be installed first.
2023-10-18T07:01:51.9468839Z WARNING: The installed extension 'containerapp' is in preview.
2023-10-18T07:02:01.5397231Z WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Hi, starting from the 2.53.0 the Container App command has been added as a part of Azure-cli.
In the lower version, when cannot find command containerapp env certificate list in azure-cli, it will auto install the containerapp extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants