
# Dapr 0.11.0

We're happy to announce the release of Dapr v0.11.0!

Our Dapr releases are increasingly focused on addressing operational concerns like: security, stability, and reliability. Additionally, given the growing number of Dapr deployments, we have further refined out the upgrade process to enable durable production environments.

Direct user feedback is the primary input into our release planning process. As with every release, we look forward to hearing from you on any friction you may have experienced using Dapr.

We would like to extend our thanks to all the new and existing contributors who helped make this release happen.

**Highlights**

* [Declarative pub/sub topic subscription](https://docs.dapr.io/developing-applications/building-blocks/pubsub/howto-publish-subscribe/#declarative-subscriptions) support
* [Access control policies and SPIFFE based identities for Service Invocation](https://docs.dapr.io/developing-applications/building-blocks/service-invocation/service-invocation-overview/#service-access-security)
* [Scoping for secrets](https://docs.dapr.io/developing-applications/building-blocks/secrets/secrets-scopes/) used in applications
* Support for [environment variables as secret store](https://docs.dapr.io/operations/components/setup-secret-store/supported-secret-stores/envvar-secret-store/) for development and updated [Secrets store](https://github.com/dapr/quickstarts/tree/master/secretstore#run-locally) quickstart to use local secret store
* [Cross namespace support for service invocation](https://docs.dapr.io/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services/#namespaces)
* New components: [RethinkDB binding](https://docs.dapr.io/operations/components/setup-state-store/supported-state-stores/setup-rethinkdb/), [Open Policy Agent middleware](https://docs.dapr.io/developing-applications/middleware/middleware-opa-policies/), [Bi-directional PostgreSQL binding](https://docs.dapr.io/operations/components/setup-bindings/supported-bindings/postgres/)
* Starting with this release, Dapr Helm chart repo has moved to [dapr.github.io/helm-charts](https://dapr.github.io/helm-charts/). In case of in-place cluster upgrade, the steps for adding the new repository to Helm are [outlined below](#2-upgrade-existing-cluster).

If you're new to Dapr, visit the [getting started](https://docs.dapr.io/getting-started/) page and familiarize yourself with Dapr.

Docs have been updated with all the new features and changes of this release. To get started with new capabilities introduced in this release, go to the [Concepts](https://docs.dapr.io/concepts/) and the [Developing applications](https://docs.dapr.io/developing-applications/).

> **Note: This release contains a few [breaking changes](#breaking-changes).**

See [this](#upgrading-to-dapr-0.11.0) section on upgrading Dapr to version 0.11.0.

## New in this release

### Dapr Runtime

- **Refactored** code style, remove unnecessary code, use defer for unlock operation (Thanks @skyao)

- **Refactored** to use github.com/pkg/errors instead of fmt.errorf (Thanks @jigargandhi and @ShaileshSurya)

- **Added** code to increase Dapr logging verbosity from app -> sidecar

- **Added** optional metadata field to the State APIs

- **Removed** non transactional state APIs from actors

- **Added** error field to Bulk Get API

- **Fixed** empty fields in Bulk Get API JSON response

- **Changed** perf test payload size

- **Added** service invocation REST API Swagger docs (Thanks @dancadana)

- **Fixed** actor returns 200 on GET if key is not present

- **Added** requests authentication from api-server in sidecar injector

- **Fixed** 'host removed' log prints multiple times per second

- **Fixed** response handling from pub/sub message delivery on gRPC

- **Added** E2E tests for actor state scenario

- **Updated** E2E test components to fetch values from secrets (Thanks @yittg)

- **Added** support for cross namespace service discovery in service invocation

- **Added** decision record for parity between GetState and SaveState API

- **Fixed** return 400 on actor not found

- **Updated** speed of Windows CI E2E tests

- **Refactored** component processing during runtime init (Thanks @yittg)

- **Fixed** actor E2E tests intermittent failure

- **Added** log for a loaded component in runtime

- **Changed** NATS server to NATS streaming for pub/sub (Thanks @abserari)

- **Added** declarative mechanism to create topic subscription

- **Fixed** sidecar injector logging admission response (in previous release, under certain condition when running in Kubernetes, this could have included potentially private information).

- **Fixed** opaque error message on missing "dapr.io/id"

- **Added** label to control plane pods in Helm chart

- **Fixed** dapr-operator has cluster-admin permissions in Kubernetes (Thanks @gunniwho)

- **Fixed** intermittent E2E test failures for pub/sub

- **Fixed** serialization issues with transaction upsert gRPC API

- **Fixed** Dapr dashboard does not have a Windows image. Force it to Linux in Helm chart.

- **Added** strong SPIFFE based IDs to sentry workload certificates

- **Added** load test for actors

- **Added** code coverage GitHub action

- **Added** decision record regarding adding content type to state

- **Added** scoping for secrets

- **Fixed** dapr-placement seems to fail randomly

- **Fixed** publishing to component w/o topic returns 200

- **Fixed** multi pub/sub 'PubSubName' abstraction broken

- **Added** access control lists for Service Invocation

- **Fixed** config file to disable mTLS in e2e tests (Thanks @skyao)

- **Fixed** Dapr does not install on ARM64 cluster

### Dapr CLI

- **Updated** to go lang version 1.15

- **Fixed** logs make it sound like everything is fully running when not

- **Fixed** Dapr status command does not show control plane correctly in HA mode

- **Fixed** publish command when dashboard is running

- **Updated** CLI waits for dapr sidecar before running apps without port

- **Added** code coverage GitHub action

- **Fixed** dapr dashboard -p flag is not working

- **Changed** Helm chart repo from ACR to GitHub repo

- **Added** ARM64 binary support

### Dashboard

- **Added** support for ARM architecture

- **Fixed** passing port configuration from command line

### Components

- **Refactored** local secret store based on file

- **Added** support for environment variables as secret store

- **Updated** MQTT publish for multi pub/sub (Thanks @kumaya)

- **Fixed** CosmosDB component metadata support in ExecuteStateTransactionRequest

- **Added** pub/sub response type

- **Added** Qos to rabbitMQ binding (Thanks @abserari)

- **Added** OPA HTTP middleware (Thanks @RichiCoder1)

- **Added** Redis failover feature to Redis state store Components (Thanks @abserari)

- **Added** code coverage GitHub action

- **Added** option for base64 decoding in Azure Blob Storage output binding component (Thanks @mtaghavi2005)

- **Added** get operation for Azure Blob Storage output binding

- **Fixed** broken consistency values for CosmosDB state component

- **Fixed** NATS streaming has a NATS logger but not a Dapr logger (Thanks @abserari)

- **Fixed** Multi() transaction operations API for redis to use HSET and HDEL

- **Added** bi-directional output binding for PostgreSQL

- **Fixed** return effective URL of Azure Blob Storage document created when using an output binding

- **Added** RethinkDB state component for time-series data use-cases

### Java SDK

- **Added** support for W3C tracing

- **Added** support for DAPR_API_TOKEN injection into calls

- **Added** content type metadata support in gRPC invoke service calls

- **Added** metadata support for State APIs

- **Added** support for Bulk Get State API

- **Added** support for State Transaction API

- **Added** code coverage GitHub action

- **Updated** state store and secrets store examples

### .NET SDK

- **Added** metadata support for State APIs

- **Added** support for State Transaction API

- **Added** ability to specify default DaprClient options to AddDapr (Thanks @EdwinVW)

- **Added** support to send headers as metadata to sidecar (Thanks @amolenk)

- **Fixed** MarkerService pattern for preventing multiple registrations of a service for DI does not work (Thanks @EdwinVW)

### Go SDK

- **Added** sample application for pub/sub (Thanks @abserari)

- **Fixed** README documentation (Thanks @li1234yun)

- **Added** support for pub/sub event handling code, retry logic

- **Added** consistent support for parent trace ID in client requests

- **Added** explicit Dapr API authentication token support

- **Added** metadata support for State APIs

- **Added** code coverage GitHub action

### Python SDK

- **Added** support for Bulk Get State API

- **Added** example for scoping of secrets

- **Added** support for State Transaction API

- **Added** metadata support for State APIs

- **Added** support to save multiple states

### Rust SDK

- **Added** metadata support for State APIs (Thanks @gdhuper)

### JavaScript SDK

- **Added** metadata support for State APIs

### Docs

- **Fixed** kubectl command to apply correct yaml file (Thanks @awolf)

- **Fixed** broken links to binding docs (Thanks @awolf)

- **Added** docs for changes to local secret store

- **Updated** actors API reference doc

- **Updated** pub/sub API reference doc

- **Updated** state API reference doc

- **Fixed** broken links (Thanks @sau-lanvy)

- **Added** cross namespace information for service invocation

- **Added** declarative pub/sub documentation

- **Updated** documentation for Prometheus and Grafana setup

- **Added** disclaimer about plain text secrets

- **Added** Redis failover guidelines (Thanks @abserari)

- **Added** secrets scoping information

- **Fixed** missing line continuation in commands

- **Added** configuration options doc for decodeBase64 (Thanks @mtaghavi2005)

- **Updated** Helm chart links

- **Updated** NATS streaming setup and deleted NATS setup (Thanks @abserari)

- **Added** case-sensitivity of input parameters (state keys, pubsub topics)

- **Added** clarification on use of CloudEvents during publish

- **Updated** Azure Blob Storage binding documentation

- **Refactored** service invocation and state management concepts doc

- **Updated** Queue depth autoscaling docs for KEDA v2.0-beta

- **Fixed** incorrect spelling in docs (Thanks @harrykimpel)

- **Fixed** incorrect spelling in docs (Thanks @pkedy)

## Upgrading to Dapr 0.11.0

To upgrade to this release of Dapr, follow the steps here to ensure a smooth upgrade. You know, the one where you don't get red errors on the terminal.. we all hate that, right?

### Local Machine / Self-hosted

Uninstall Dapr using the CLI you currently have installed. Note that this will remove the default $HOME/.dapr directory, binaries and all containers dapr_redis, dapr_placement and dapr_zipkin. Linux users need to run sudo if they have installed binary in default path /usr/local/bin/ or have docker command needing sudo:

```bash
dapr uninstall --all
```

Next, follow [these](https://github.com/dapr/cli#installing-dapr-cli) instructions to install the latest CLI version, or alternatively download the latest and greatest release from [here](https://github.com/dapr/cli/releases) and put the `dapr` binary in your PATH.

Once you have installed the CLI, run:

```bash
dapr init
```

Wait for the update to finish,  ensure you are using the latest version of Dapr(0.11.0) with:

```bash
$ dapr --version

CLI version: 0.11.0
Runtime version: 0.11.0
```

### Kubernetes

#### Upgrading from 0.10.0

If you previously installed Dapr using Helm, starting with this releases you can now upgrade Dapr to a new version.
If you installed Dapr using the CLI, go [here](#starting-fresh-install-on-a-cluster).

##### 1. Get the latest CLI

Get the latest version of the Dapr CLI as outlined above, and put it in your path.
You can also use the helper scripts outlined [here](https://github.com/dapr/cli#installing-dapr-cli) to get the latest version.

##### 2. Upgrade existing cluster

First, add new Dapr helm repository(see [breaking changes](#breaking-changes)) and update your Helm repos:

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

Run the following commands to upgrade the Dapr control plane system services and data plane services:

* Remove ClusterRole Binding (**Needed** for upgrading to v0.11.0. This is for this release only.)
  ```
  kubectl delete clusterrolebinding dapr-operator
  ```

* Export certificates

  ```
  dapr mtls export -o ./certs
  ```

* Updating Dapr control plane pods
  * Using the certs exported above, run the following command:
    ```
    helm upgrade dapr dapr/dapr --version 0.11.0 --namespace dapr-system --reset-values --set-file dapr_sentry.tls.root.certPEM=./certs/ca.crt --set-file dapr_sentry.tls.issuer.certPEM=./certs/issuer.crt --set-file dapr_sentry.tls.issuer.keyPEM=./certs/issuer.key
    ```

  * Wait until all the pods are in Running state:

    ```
    kubectl get pods -w -n dapr-system
    ```

  * Verify the control plane is updated and healthy:

    ```
    $ dapr status -k

    NAME                   NAMESPACE    HEALTHY  STATUS   REPLICAS  VERSION  AGE  CREATED
    dapr-dashboard         dapr-system  True     Running  1         0.3.0    15s  2020-09-28 13:07.39
    dapr-sidecar-injector  dapr-system  True     Running  1         0.11.0   15s  2020-09-28 13:07.39
    dapr-sentry            dapr-system  True     Running  1         0.11.0   15s  2020-09-28 13:07.39
    dapr-operator          dapr-system  True     Running  1         0.11.0   15s  2020-09-28 13:07.39
    dapr-placement         dapr-system  True     Running  1         0.11.0   15s  2020-09-28 13:07.39
    ```

* Updating the data plane (sidecars)
  * Next, issue a rolling update to your Dapr enabled deployments. When the pods restart, the new Dapr sidecar version will be picked up.

    ```
    kubectl rollout restart deploy/<DEPLOYMENT-NAME>
    ```

All done!

#### Starting fresh install on a cluster

If you previously installed Dapr on your Kubernetes cluster using the Dapr CLI, run:

*Note: Make sure you're uninstalling with your existing CLI version*

```bash
dapr uninstall --kubernetes
```

It's fine to ignore any errors that might show up.

If you previously installed Dapr using __Helm 2.X__:

```bash
helm del --purge dapr
```

If you previously installed Dapr using __Helm 3.X__:

```bash
helm uninstall dapr -n dapr-system
```

Update the Dapr repo:

```bash
helm repo update
```

If you installed Dapr with Helm to a namespace other than `dapr-system`, modify the uninstall command above to account for that.

You can now follow [these](https://docs.dapr.io/getting-started/install-dapr/#install-with-helm-advanced) instructions on how to install Dapr using __Helm 3__.

Alternatively, you can use the newer version of CLI:

```
dapr init --kubernetes
```

##### Post installation

Verify the control plane pods are running and are healthy:

```
$ dapr status -k

  NAME                   NAMESPACE    HEALTHY  STATUS   REPLICAS  VERSION  AGE  CREATED
  dapr-dashboard         dapr-system  True     Running  1         0.3.0    15s  2020-09-28 13:07.39
  dapr-sidecar-injector  dapr-system  True     Running  1         0.11.0   15s  2020-09-28 13:07.39
  dapr-sentry            dapr-system  True     Running  1         0.11.0   15s  2020-09-28 13:07.39
  dapr-operator          dapr-system  True     Running  1         0.11.0   15s  2020-09-28 13:07.39
  dapr-placement         dapr-system  True     Running  1         0.11.0   15s  2020-09-28 13:07.39
```

After Dapr 0.11.0 has been installed, perform a rolling restart for your deployments to pick up the new version of the sidecar.
This can be done with:

```
kubectl rollout restart deploy/<deployment-name>
```

## Breaking Changes

### Helm chart repository change

Dapr Helm chart repository has been migrated from `https://daprio.azurecr.io/helm/v1/repo` to `https://dapr.github.io/helm-charts/`.

Run the below commands to use add new repository:

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

### Dapr Runtime

#### Serialization changes for gRPC State Transaction APIs

A double serialization issue when gRPC State Transaction API was used, has been fixed in this release. As a result, states previously saved via the gRPC State Transaction API, will not be properly deserialized with the latest v0.11.0 version of the code.

For example previously, a string saved using the gRPC State Transaction API was saved as:

```
\"saved state\"
```

When deserialized, it would be read as `"saved state"` instead of `saved state`. Similarly for JSON serialized values, it was marshaled once again and then saved.

This has been fixed in v0.11.0 and the double serialization removed. Any code that expects the value in the previous incorrectly serialized format will need some changes to work with v0.11.0.

Read more [here](https://github.com/dapr/dapr/issues/2016).

### Components Contrib

#### Implementation of NATS pub/sub component changed

The implementation of NATS pub/sub component changed from NATS serving to NATS streaming. Read more about it [here](https://docs.dapr.io/operations/components/setup-pubsub/supported-pubsub/setup-nats-streaming/) for NATS streaming setup and usage.

### Rename of the local secret store to secretstores.local.file
The  local secret store component type has been renamed from `secretstores.local.localsecretstore` to `secretstores.local.file`. If you have used this component, you will need to change the type name in your configuration file.

### Java SDK

#### W3C Tracing support

The Java SDK supports sending and receiving trace context with the API calls. All APIs have a complex Request object with builders,
with the method

```java
withContext(io.grpc.Context context)
```

to pass trace context to Dapr.

Similarly the responses from Dapr APIs are now wrapped in a [Response](https://github.com/dapr/java-sdk/blob/master/sdk/src/main/java/io/dapr/client/domain/Response.java) object which contains the actual response and the context associated with it.

Old method signature:

```java
Mono<Void> publishEvent(PublishEventRequest request);
```

New method signature:

```java
Mono<Response<Void>> publishEvent(PublishEventRequest request);
```
