RSS

Dapr v1.7 is now available

We’re happy to announce the release of Dapr v1.7.0! 🚀 🎉 🎈

This is the seventh minor version update since the announcement of Dapr v1.0.

Acknowledgements

The Dapr 1.7.0 release had the largest amount of contributors. We would like to extend our thanks to all 83 of the new and existing contributors who helped make this release happen.

@1046102779, @AaronCrawfis, @abelperezok, @akkie, @alberthuang24, @amimimor, @amulyavarote, @artursouza, @beiwei30, @berndverst, @bjorkstromm, @callmexiaolu88, @chinzhiweiblank, @chiru1221, @Cowlord711, @CrazyHZM, @cuishuang, @daixiang0, @davidgladstone, @DeepanshuA, @derrickburns, @dmitsh, @duglin, @Gehhilfe, @Giovds, @greenie-msft, @halspang, @hhunter-ms, @hmz777, @ItalyPaleAle, @jigargandhi, @jjcollinge, @Joshswooft, @l0ll098, @LaurenceLiZhixin, @lechnerc77, @li1234yun, @light-pan, @ls-2018, @lucasjellema, @lupino3, @marcinjahn, @marviniter, @msfussell, @mukundansundar, @mumumi, @naveen1100, @newbe36524, @nwiizo, @paulyuk, @pkedy, @pravinpushkar, @psychomelet, @qt-luigi, @r-c-correa, @RichardLaos, @rlfcunha, @rodrigoscna, @SergioVelmay, @shizn, @shivamkm07, @Shoothzj, @shubham1172, @si618, @siredmar, @skyao, @sourikghosh, @surenderssm, @Syuparn, @Taction, @tanvigour, @theonefx, @thielepaul, @uptutu, @uy-andrew, @vfarcic, @willvelida, @wimvdc, @XavierGeerinck, @yaron2, @yauri-io, @yordan-pavlov, @zdianjiang

Highlights

Configure retries, timeouts, and circuit breakers across Dapr APIs

Distributed applications are commonly comprised of many services, with dozens - even hundreds - of instances for any given application. These applications do not live in isolation, but are many times dependent on databases, caches, pub/subs, secret stores and other infrastructure services. With more dependencies, the likelihood of a system failure increases. For example, an instance can fail or be unresponsive due to hardware failure, database slowness, an overwhelming number of requests, application restarts/scale outs, or several other reasons. Designing and implementing your application with fault tolerance (the ability to detect, mitigate, and respond to failures) allows your application to recover to a functioning state and become self healing, and also helps prevent cascading failures all the way to your infrastructure services.

Dapr provides a capability for defining and applying fault tolerance resiliency policies via a resiliency spec. Resiliency specs are saved in the same location as components specs and are applied when the Dapr sidecar starts. The sidecar determines how to apply resiliency policies to your Dapr API calls. Within the resiliency spec, you can define policies for popular resiliency patterns, such as:

Policies can then be applied consistently to targets, which include:

Observability

Additional component metrics

In order to provide increased visibility into operations, new metrics have been added to components, including pub/sub, bindings, state stores, etc. For example:

  • Latencies when using a component.
  • The number of times a given component has been called.

Dapr API call logging

The Dapr runtime logs events to standard output for ease of diagnostics; for example, listing components loaded at startup other runtime information. With this release, you can now:

Components

New stable components

The following components with stable release candidates in the previous Dapr release have graduated to stable designation:

New state store components

There are now a total of 22 state stores, with three new ones added in this release.

The preview Query API support has been added to the following state stores, in addition to the existing state stores:

Updates to existing components

The influxdb binding now has support for query.

See the components section below for the list of numerous other fixes to components in this release.

With this release, there are now a total of 97 components, including 41 bindings, 1 configuration, 8 HTTP middleware, 3 name resolution, 13 pub/sub, 8 secret stores, and 23 state stores.

Features moved from preview to stable

Several features were moved from preview status to stable status, after being available for at least two releases and soliciting feedback and fixes. The following features are now stable in this release:

CLI Updates

Kubernetes namespace support
The components, configurations, and list CLI commands now support Kubernetes namespaces when returning output.

Easier certificate renewal
To ease the rollover and regeneration of new root and application certificates:

  • A dapr mtls renew-certificate command has been introduced, making it easier to address root certificate expiry and renewal in clusters.
  • Any CLI command that uses the Kubernetes -k option now raises a warning message if the root certificate expiry is less than 30 days away.

New ways to install Dapr in self-hosted mode

Private and alternative image registries (Preview)
In self-hosted mode, the CLI init command can now:

  • Specify any private registry to pull the container images required to install Dapr.
  • Give the ability to choose either public Dockerhub or Github repositories. This enables you to:
    • Place images in trusted repositories of your choice.
    • Pull from different public sources in case of image throttling.

Offline or airgap installation (Preview)
By default, Dapr downloads binaries and pulls images from the network to setup the development environment. With this release, Dapr now supports offline or airgap installation using pre-downloaded artifacts, either with a Docker or slim environment. The artifacts for each Dapr release are now built into a Dapr Installer Bundle, which can be downloaded from the repo. By using this installer bundle with the Dapr CLI init command, you can install Dapr into environments that do not have any network access.

Performance

Unix Domain Sockets now available on Kubernetes

You can now use Unix Domain Sockets with Kubernetes (as well as self-hosted) for increased throughput and lower latency when invoking the Dapr sidecar by using the dapr.io/unix-domain-socket-path annotation.

This feature is not available on Windows, only on Linux.

Try it!

If you’re new to Dapr, visit the getting started page and familiarize yourself with Dapr.

Docs have been updated with all the new features and changes of this release. Get started with new capabilities introduced in this release via the Concepts and the Developing applications docs.

For upgrading Dapr to version 1.7.0, jump to this section.

This release contains a few breaking changes.

New in this release

Dapr Runtime

  • FIXED Dapr setting a default content type of text/plain 4472
  • ADDED Circuit Breaking 777
  • ADDED Content-Type for state operations 2892
  • ADDED Resiliency policies across all building blocks 3586
  • ADDED Actor Reentrancy as general available 3811
  • CHANGED gRPC Proxying to stable feature 3814
  • FIXED Service invocation to return original status code on service invocation. Add the possibility to configure retries base on error type 3826
  • FIXED Serialization of 64bit values. 3837
  • ADDED Unsubscribe method for the configuration API. 3906
  • FIXED Bug in runtime matching wildcard routes for pubsub. 3920
  • ENABLES actor options to be configured per actor type 3934
  • RESOLVED Logging for mTLS cert expiration 3940
  • RESOLVED Log sidecar pod name in Dapr Operator 3947
  • RESOLVED Method invocation / Dapr automatically decodes %2f in URL 4008
  • RESOLVED Add TLS connectivity to gRPC proxy functionality when –app-ssl is enabled 4048
  • RESOLVED important metrics are missing 4068
  • RESOLVED feature/e2e: add env DAPR_E2E_TEST to pick many tests 4102
  • RESOLVED bugfix/e2e: allowlist failed when mtls is in closed state 4104
  • ADDED logging for Dapr API calls 4119
  • RESOLVED Nightly builds for Dapr 4124
  • RESOLVED helm charts: increase failure threshold for liveness and readiness probes 4132
  • RESOLVED Is it possible to make injector healthz port configurable ? 4141
  • RESOLVED dapr reconnect logic with rabbitmq results in “channel not initialized” 4143
  • ADDED sidecar-injector health check port setting in helm chart 4174
  • RESOLVED Remove preview feature for gRPC proxying 4176
  • FIXED Configuration API, listen to all keys 4178
  • RESOLVED Added healthzPort option to injector helm chart - defaults to 8080 4179
  • RESOLVED Automatically update Helm chart based on release tag 4180
  • RESOLVED Dapr retries forever when app is erroring on subscriptions 4185
  • FIXED gRPC proxy connection closes after mTLS TTL passed 4197
  • RESOLVED Change GitHub Workflow to publish to GitHub Registry in addition to Docker Hub 4199
  • RESOLVED Clean up unused dependencies that are non-compliant 4200
  • FIXED multiple access control policies for a single app not working 4202
  • ADDED New options available for the default secret-reader deployed by the dapr_rbac subchart. 4203
  • RESOLVED daprd loads components instead of skipping if exists when operator stream reconnects 4212
  • FIXED Update of components in Kubernetes mode was accidentally available and not working properly, now blocked. 4218
  • ADDED Introduce state store component backed by Oracle Database or OCI Autonomous Database [4221](https://github.com/dapr/dapr/issues/4221
  • FIXED Condition in ReminderRename that would leave Reminder deleted. 4229
  • ADDED Automatic State Store Encryption as a GA feature 4260
  • ADDED prometheus.io/probe annotation 4272
  • ADDED Jetstream state store 4276
  • FIXED When the deployment selector is updated, dapr will get a “connection refused” error 4287
  • ADDED Support for CockroachDB StateStore 4335
  • FIXED Parity between HTTP and gRPC APIs when saving JSON state 4349
  • FIXED Concurrent map write error in placement 4353
  • FIXED Reduce placement blocking client 4361
  • ADDED Mirror of 3rd party container images to Dapr’s GHCR 4365
  • ADDED Explicit support for other AES key sizes 4373
  • FIXED In Docker containers, use the CA cert bundle that’s part of the base distroless images 4380
  • ADDED Resiliency: Debug logging when a circuit breaker changes state 4381
  • ADDED Rejson image to Dapr’s GHCR 4411
  • FIXED Issue when actor reminders are used on single actor instance but is assigned on two pods on Kubernetes 4419
  • ADDED Support to UDS on Kubernetes 4309
  • FIXED Allow not to override content-type for service invocation over HTTP(https://github.com/dapr/dapr/issues/4469)

Dapr CLI

  • ADDED Simplify development and debugging setup using a dev container. 202
  • FIXED On error, run exits with an error code 684
  • ADDED dapr init has support for Dapr GitHub container registry via Environment variable 726
  • ADDED Added support for standalone installer 731
  • ADDED Add support for querying based on namespace in the dapr list, configurations and components command 786
  • FIXED dapr init -s installs old runtime version 853
  • ADDED “dapr init” ADD “–image-registry” 869
  • ADDED Renew or Replace auto-generated TLS certificates using the CLI 892
  • ADDED Dapr CLI should warn about upcoming TLS certificate expiration 893
  • FIXED –log-as-json through cli is not working 897
  • FIXED CLI should throw an error when invalid method is invoked. 909
  • ADDED FOSSA workflow for identifying dependencies with non-OSS-compliant licenses 918

Components

  • ADDED FOSSA workflow for identifying dependencies with non-OSS-compliant licenses 1568
  • ADDED content-type support for pub/sub, binding and state store components 1299
  • ADDED configuration unsubscribe API 1440
  • ADDED new CockroachDB state store component 1556
  • ADDED new NATS JetStream state store component 1422
  • ADDED new Oracle Database state store component 1444
  • ADDED Apache pulsar pub/sub: upgrade client to 0.8.0 1514
  • ADDED AWS DynamoDB state store: support for time to live 1489
  • ADDED AWS S3 binding: Add option to disable SSL for S3 1554
  • ADDED Azure CosmosDB state store & binding: now retries throttled requests from database 1611
  • ADDED Azure EventHubs binding: Adds Azure Active Directory support 1572
  • ADDED Azure ServiceBus pub/sub: Retry attempts for various possible causes of ‘Connection reset by peer’ 1495
  • ADDED Consul name resolution: Updates Consul API to v1.11.0 (necessary for Zeebe upgrade) 1575
  • ADDED GCP pub/sub: Add reconnect loop for subscriptions 1293
  • ADDED Hashicorp Vault secret store: Support version and engine path. Add parseAsMap option. 841
  • ADDED influxdb binding: Add support for query 1452
  • ADDED Kafka binding: Version configuration 1277
  • ADDED NATS JetStream pub/sub: Adds support for wildcard subscriptions 1464
  • ADDED NATS Jetstream pub/sub: NKey based authentication 1437
  • ADDED OCI ObjectStorage state store: Support configuration through OCI configuration and PEM key file 1428
  • ADDED PostgreSQL state store: Add Query state store API implementation 1456
  • ADDED Pulsar pub/sub: add producer option disableBatching 1419
  • ADDED Pulsar pub/sub: Token authentication & support for hosts over http 1427
  • ADDED rabbitmq pub/sub: Support for setting exchangekind 1502
  • ADDED Redis state store: Add Query state store API implementation 1211
  • ADDED zeebe binding: upgrades zeebe library to 1.3.4 1519
  • FIXED Addresses macOS security warnings due to deprecated system headers by upgrading 99design/keyring library 1535
  • FIXED Fixes a pub/sub cloudevent serialization issue with 64 bit data type 1597
  • FIXED Fixes an issue with unsubscribing from configurations by id 1483
  • FIXED statestore query API preview: Removes redundant value prefix from the key names in JSON query syntax 1490
  • FIXED AWS S3 binding: allow disabling SSL cert validation (to accept self-signed certs) 1592
  • FIXED AWS SNS/SQS pub/sub: bugfixes - visibility timeout reset; honors disable entity management setting in DLQ 1445
  • FIXED Azure CosmosDB state store: Fixes an issue with stored procedure creation when Azure AD credentials are used 1603
  • FIXED Azure CosmosDB state store: transaction API to respect order of operations 1209
  • FIXED Azure EventHubs pub/sub: Support Azure AD credentials for checkpointing storage 1566
  • FIXED Google Cloud pub/sub: Returns No Ack (nack) when there is an error 1561
  • FIXED mDNS name resolution: sync first browse 1591
  • FIXED MongoDB state store: Actor reminders broken since 1.5.0 due to data serialization problem (see also hotfix release 1.5.2 and 1.6.1) 1355
  • FIXED MongoDB state store: Fixes an issue preventing MongoDB from querying non-string values 1583
  • FIXED MongoDB state store: Removes MongoDB bson artifacts from JSON value output 1582
  • FIXED MySQL binding: add TEXT column type special case handling 1466
  • FIXED MySQL binding: adds special handling for JSON_EXTRACT and LONGTEXT column types 1486
  • FIXED MySQL state store: transaction API to respect order of operations. 1521
  • FIXED PostgreSQL state store: transaction API to respect order of operations. 1522
  • FIXED rabbitmq pub/sub: Fixes a reconnect issue 1471
  • FIXED Redis state store: Fixes an issue preventing querying of numeric values 1594
  • FIXED Setting a value using ETag for the Postgres state store 1497
  • FIXED SQL Server state store: Ensures transaction API executes all transactions sequentially. 1537
  • FIXED SQL Server state store: transaction API to respect order of operations. 1505

Dashboard

  • RESOLVED Several Dashboard improvements 190
  • ADDED FOSSA workflow for identifying dependencies with non-OSS-compliant licenses 194

.NET SDK

  • ADDED Support for providing Actor TypeName during runtime at startup. 677
  • FIXED AddDaprSecretStore Extension always throws unhandled exception at container start 779
  • ADDED Build/test with .NET 6 to CI matrix 794
  • FIXED ActorHost.JsonSerializerOptions is always null 814

Go SDK

  • RESOLVED fix: config api 200
  • RESOLVED Fix misspelt activateActor name 253
  • RESOLVED chore: fix some spelling mistakes in the readme 255
  • RESOLVED Receiving sub events with rawPayload does not work 256
  • RESOLVED [WIP] Implement graceful shutdown 260

Java SDK

  • REMOVED Remove deprecated builder classes 601
  • ADDED Added support for statestore query API 653
  • ADDED Added java docs to io.dapr.client.domain 671
  • FIXED Long values are not sent correctly with PubSub 686
  • FIXED Topic annotation handles class-level @RequestMapping 694
  • ADDED FOSSA workflow for identifying dependencies with non-OSS-compliant licenses 695
  • FIXED Fixed service invocation path segments to avoid automatic encoding of / to %2f 702
  • ADDED Add IntelliJ integration tests setup docs 705
  • FIXED Dapr Invoke Method has very low throughput compared to calling API directly 709
  • FIXED Update tutorial link for observability 711
  • FIXED Actor DurationUtils parsing of duration throws an exception 712

Python SDK

  • ADDED adds DaprClient configuration option max_grpc_message_length for max gRPC message length in service invocation 371
  • ADDED adds support for asynchronous service invocation with new method invoke_method_async in DaprClient (HTTP only) 300
  • ADDED adds support for configuration subscriptions as part of the configuration API preview) 334
  • ADDED adds support for TTL in actor reminders 315
  • ADDED adds pubsub topic event response support to GRPC ext client. This allows a subscriber to indicate whether a pub/sub message was handled successfully, should be dropped, or should be retried. 341
  • FIXED now reuses any existing asyncio event loop everywhere (including in DaprInvocationHttpClient), allowing for use in environments like Jupyter Notebooks 295
  • FIXED fixes an issue where actor timers used the wrong context 330
  • FIXED removes a superfluous metadata deprecation warning 354
  • ADDED updates examples for new state store query syntax 355
  • ADDED adds Fossa License Scan to ensure OSS license compliance for dependencies 362
  • FIXED updates devcontainer to use correct linters (flake8, mypy) 373

JavaScript SDK

  • ADDED Doc: Configuration API in JS-SDK 160
  • RESOLVED Fix tests and build process for catching errors 177
  • ADDED JS-SDK client uses environment variables to initialize 178
  • ADDED Setup Dapr Bot 179
  • RESOLVED Upgrade to latest Node LTS 16.14.0 185
  • RESOLVED Resolve linting issues 188

Upgrading to Dapr 1.7.0

We all hate getting red errors on the terminal, right? For a smooth upgrade to the 1.7.0 release of Dapr, use the following steps.

Local Machine / Self-hosted

Uninstall Dapr using the CLI you currently have installed. This will remove:

  • The default $HOME/.dapr directory.
  • Binaries.
  • All containers: dapr_redis, dapr_placement, and dapr_zipkin.

Linux users: run sudo if docker command needs sudo.

dapr uninstall --all

For RC releases like this, download the latest and greatest release and put the dapr binary in your PATH.

Once you have installed the CLI, run:

dapr init --runtime-version=1.7.0

Wait for the update to finish. Ensure you are using the latest version of Dapr (1.7.0):

$ dapr --version

CLI version: 1.7.0
Runtime version: 1.7.0

Kubernetes

Upgrading from previous version

You can perform zero-downtime upgrades using both Helm 3 and the Dapr CLI.

Upgrade using the CLI

Download the latest RC release and put the dapr binary in your PATH.

To upgrade Dapr, run:

dapr upgrade --runtime-version 1.7.0 -k

To upgrade with high availability mode:

dapr upgrade --runtime-version 1.7.0 --enable-ha=true -k

Wait until the operation is finished and check your status with dapr status -k.

All done!

Make sure your deployments are restarted to pick the latest version of the Dapr sidecar.

Upgrade using Helm

To upgrade Dapr using Helm, run:

helm repo add dapr https://dapr.github.io/helm-charts/
helm repo update

helm upgrade dapr dapr/dapr --version 1.7.0 --namespace=dapr-system --wait

Wait until the operation is finished and check your status with dapr status -k.

All done!

Make sure your deployments are restarted to pick the latest version of the Dapr sidecar.

Starting a fresh install on a cluster

See how to deploy Dapr on a Kubernetes cluster for a complete guide to installing Dapr on Kubernetes.

You can use Helm 3 to install Dapr:

helm repo add dapr https://dapr.github.io/helm-charts/
helm repo update

kubectl create namespace dapr-system

helm install dapr dapr/dapr --version 1.7.0 --namespace dapr-system --wait

Alternatively, you can use the latest version of CLI:

dapr init --runtime-version=1.7.0 -k
Post installation

Verify the control plane pods are running and healthy:

$ dapr status -k
  NAME                   NAMESPACE    HEALTHY  STATUS   REPLICAS  VERSION  AGE  CREATED
  dapr-dashboard         dapr-system  True     Running  1         0.10.0    15s  2022-03-29 13:07.39
  dapr-sidecar-injector  dapr-system  True     Running  1         1.7.0   15s  2022-03-29 13:07.39
  dapr-sentry            dapr-system  True     Running  1         1.7.0   15s  2022-03-29 13:07.39
  dapr-operator          dapr-system  True     Running  1         1.7.0   15s  2022-03-29 13:07.39
  dapr-placement         dapr-system  True     Running  1         1.7.0   15s  2022-03-29 13:07.39

After Dapr 1.7.0 has been installed, perform a rolling restart for your deployments to pick up the new version of the sidecar:

kubectl rollout restart deploy/<deployment-name>

Breaking changes

Components

  • In this release the value field has been removed from the key name in the state management Query API as part of the ongoing feedback on this preview feature.
    • FIXED statestore preview Query API: Remove ‘value’ prefix from the key names in query JSON 1490
  • This release include the breaking changes to the MongoDB store as described in v1.6.1 release notes to address a data serialization problem.
    • FIXED marshal mongodb bson into relaxed json 1581
    • FIXED return relaxed form of JSON instead of canonical representation of JSON. 1582

Java SDK

  • REMOVED Remove deprecated builder classes 601