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 dapr-component set returns a "DaprComponentInvalidRequest...must contain properties.ComponentType" Error #472

Closed
digitalkingsley opened this issue Oct 31, 2022 · 8 comments
Labels
CLI Related to CLI Dapr Related to Dapr in ACA Needs: triage 🔍 Pending a first pass to read, tag, and assign

Comments

@digitalkingsley
Copy link

digitalkingsley commented Oct 31, 2022

Issue description

I'm attempting to add a Dapr Component to the Container Apps Environment for my project, via the Azure CLI.
However, each time I issue the instruction to add the component, I end up with the error shown in the images below:

Here's the instruction I issued to add the component:

az containerapp env dapr-component set --name %env% --resource-group %rg% --dapr-component-name azurekeyvault --yaml azurekeyvault.yaml (Command Prompt)

or

az containerapp env dapr-component set --name $env --resource-group $rg --dapr-component-name azurekeyvault --yaml azurekeyvault.yaml (Powershell)


Note: env and rg are environment-variables I defined for the Container Apps Environment and the Resource Group respectively, within the terminal-sessions.

Command Issued Via The Command Prompt (With Error Message)

via-command


Same Command Issued Via Power Shell (With Error Message)

via-powershell



And Here's My Dapr Component Config File

yaml

Steps to reproduce

  1. Install the Azure CLI

  2. Add the containerapp extension with the following command:

    az extension add --name containerapp --upgrade

  3. Register the Microsoft.App and Microsoft.OperationalInsights namespaces with the following commands:

    az provider register --namespace Microsoft.App

    az provider register --namespace Microsoft.OperationalInsights

  4. Create a secretstore config-file as shown above

  5. Register variables as shown above

  6. Navigate to the directory where the config-file was created and issue the command (s) shown above.

Expected behavior

I expected the Dapr Component to be added to the Container Apps Environment

Actual behavior

An error (as shown in the images above) occured.

@ghost ghost added the Needs: triage 🔍 Pending a first pass to read, tag, and assign label Oct 31, 2022
@digitalkingsley digitalkingsley changed the title az containerapp env dapr-component set returns a "DaprComponentInvalidRequest...must contain properties.ComponentType az containerapp env dapr-component set returns a "DaprComponentInvalidRequest...must contain properties.ComponentType" Error Oct 31, 2022
@digitalkingsley
Copy link
Author

Anyone looking into this, please?

@kendallroden
Copy link
Contributor

Yes will investigate. Can you also confirm you ran the commands without environment variables to ensure the same behavior?

@kendallroden kendallroden added investigating currently looking into the issue and removed Needs: triage 🔍 Pending a first pass to read, tag, and assign labels Nov 3, 2022
@kendallroden
Copy link
Contributor

kendallroden commented Nov 3, 2022

I'm sorry, I could not reproduce your issue in Powershell or on my mac using bash. I have a feeling your yaml file has some type of spacing issue.

@kendallroden kendallroden added invalid This doesn't seem right Needs: Author Feedback and removed investigating currently looking into the issue labels Nov 3, 2022
@digitalkingsley
Copy link
Author

I'm sorry, I could not reproduce your issue in Powershell or on my mac using bash. I have a feeling your yaml file has some type of spacing issue.

I had the same feeling about improperly formed yaml file, too. But, after re-writing my yaml file (for Azure Container Apps) so many times, with the same result, I gave up.

You should know, I run Dapr locally, with yaml files written for all components (secretstore and pubsub), and everything works perfectly. I only encounter this issue when I attempt to add Dapr Components (to a Container App Environment) via the CLI.

Anyways, In the interim, I have resorted to creating Container Apps Environments (and adding components) via the Azure Portal, and then using the CLI only when provisioning the Container Apps themselves.

Thanks for your help.

@SophCarp SophCarp added CLI Related to CLI Dapr Related to Dapr in ACA Needs: Discussion Needs: triage 🔍 Pending a first pass to read, tag, and assign and removed invalid This doesn't seem right Needs: Attention 👋 Needs: Discussion labels Dec 21, 2022
@SophCarp
Copy link

SophCarp commented Apr 7, 2023

I am going to close this issue since you seem to have a solid workaround. Let me know if there's anything else we can help you with!

@SophCarp SophCarp closed this as completed Apr 7, 2023
@vmateiaiv
Copy link

Yeah, it's still not solved though!

@marcelmedina
Copy link

marcelmedina commented Jun 9, 2023

+1
still getting the same error, after following the documentation: https://learn.microsoft.com/en-us/azure/container-apps/microservices-dapr?tabs=bash%2Cazure-cli @SophCarp

@JasonRodman
Copy link

Any news on this yet? I am running into the same problem. I would like to script my entire deployment and this is the only part that simply does not work. I have resort to the azure powershell commands for this part to work around this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Related to CLI Dapr Related to Dapr in ACA Needs: triage 🔍 Pending a first pass to read, tag, and assign
Projects
None yet
Development

No branches or pull requests

7 participants