Error when using Dapr State Store local-dev recipe
willvelida opened this issue · comments
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:
- Take the provided Bicep code and save it into a
dapr.bicep
file. - Deploy the Bicep template by running the
rad deploy
command. Using that file name, the full command would berad 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
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"