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

Error when using Dapr State Store local-dev recipe #40

Closed
willvelida opened this issue Oct 19, 2023 · 1 comment
Closed

Error when using Dapr State Store local-dev recipe #40

willvelida opened this issue Oct 19, 2023 · 1 comment

Comments

@willvelida
Copy link
Contributor

Bug information

I'm going through this this tutorial and the deployment fails when attempting to deploy Dapr state store recipe. Error output is as follows:

Building .\dapr.bicep...
Deploying template '.\dapr.bicep' into environment 'default' from workspace 'default'...

Deployment In Progress...

Completed            dapr            Applications.Core/applications
.                    statestore      Applications.Dapr/stateStores
Error: {
  "code": "DeploymentFailed",
  "message": "At least one resource deployment operation failed. Please see the details for the specific operation that failed.",
  "target": "/planes/radius/local/resourceGroups/default/providers/Microsoft.Resources/deployments/rad-deploy-03677027-f7dc-4a51-a16a-7aa33c580695",
  "details": [
    {
      "code": "OK",
      "message": "",
      "target": "/planes/radius/local/resourceGroups/default/providers/Applications.Core/applications/dapr"
    },
    {
      "code": "ResourceDeploymentFailure",
      "message": "Failed",
      "target": "/planes/radius/local/resourceGroups/default/providers/Applications.Dapr/stateStores/statestore",
      "details": [
        {
          "code": "RecipeDownloadFailed",
          "message": "code BadRequest: err invalid path Error parsing reference: \"ghcr.io/radius-project/recipes/local-dev/stateStores:0.26\" is not a valid repository/tag"
        }
      ]
    }
  ]
}

TraceId:  d99eca04d5ba196ea5c2c81c84d8aa9f

From this output, I think that the Dapr State repository tag is invalid.

I'm defining my Dapr state store block as follows:

import radius as radius

@description('Specifies the environment for resources.')
param environment string

resource app 'Applications.Core/applications@2023-10-01-preview' = {
  name: 'dapr'
  properties: {
    environment: environment
  }
}

// The backend container that is connected to the Dapr state store
resource backend 'Applications.Core/containers@2023-10-01-preview' = {
  name: 'backend'
  properties: {
    application: app.id
    container: {
      // This image is where the app's backend code lives
      image: 'radius.azurecr.io/samples/dapr-backend:latest'
      ports: {
        orders: {
          containerPort: 3000
        }
      }
    }
    connections: {
      orders: {
        source: stateStore.id
      }
    }
    extensions: [
      {
        kind: 'daprSidecar'
        appId: 'backend'
        appPort: 3000
      }
    ]
  }
}

// The Dapr state store that is connected to the backend container
resource stateStore 'Applications.Dapr/stateStores@2023-10-01-preview' = {
  name: 'statestore'
  properties: {
    // Provision Redis Dapr state store automatically via the default Radius Recipe
    environment: environment
    application: app.id
  }
}

Steps to reproduce (required)

To reproduce:

  1. Take the provided Bicep code and save it into a dapr.bicep file.
  2. Deploy the Bicep template by running the rad deploy command. Using that file name, the full command would be rad deploy dapr.bicep.

Observed behavior (required)

Observed behavior is the output as stated above.

Desired behavior (required)

The following output as specified in the tutorial:

Deployment Complete

Resources:
 dapr            Applications.Core/applications
 backend         Applications.Core/containers
 statestore      Applications.Dapr/stateStores

System information

rad Version (required)

RELEASE   VERSION   BICEP     COMMIT
0.26.6    v0.26.6   0.11.90   5e02b8a1706e7697d031db84a176f7c3f2053ee2

Operating system (required)

Windows 11 Pro x64

Additional context

I'm attempting to deploy this Radius application on a Kubernetes cluster (v1.27.2) on Docker

@AaronCrawfis
Copy link
Contributor

Thanks for the report @willvelida! We issued a patch release for 0.26 yesterday afternoon. Please reinstall the CLI, run kubectl delete ns radius-system and re-run rad init.

Fixed by: radius-project/radius#6578

As a workaround you can also re-register the Recipe on your current installation with:

rad recipe register default --template-kind bicep --template-path "ghcr.io/radius-project/recipes/local-dev/statestores:0.26" --resource-type "Applications.Dapr/stateStores"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants