
# Dapr 1.2.0

We're happy to announce the release of Dapr 1.2.0!

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

**Highlights**

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

 - Support for **Pub/Sub event without CloudEvent wrapping**, enabling communication between Dapr and non-Dapr applications [2308](https://github.com/dapr/dapr/issues/2308). This enables Dapr to send and receive events to integrate with applications that cannot use CloudEvents. See [Pub/Sub without CloudEvents](https://v1-2.docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-raw/) documentation for details.
 - **Ability to scope the APIs that are available on Dapr sidecar** through ACLs [3054](https://github.com/dapr/dapr/issues/3054). For example, if you want to restrict access to only the secrets API from the applications, you can set ACLs on its access.  See [How-To: Selectively enable Dapr APIs on the Dapr sidecar](https://v1-2.docs.dapr.io/operations/configuration/api-allowlist/) documentation for details.
 - Ability to **"opt-in" to preview features** that are included in  releases. This provides a way to introduce new features that still need feedback before being made GA in quality. Equally expect that preview features from previous releases (currently none) can be removed without a deprecation notice. [3048](https://github.com/dapr/dapr/issues/3048). See [How-To: Enable preview features](https://v1-2.docs.dapr.io/operations/configuration/preview-features/) documentation for details.
 -  In this release **Actor Re-entrancy** [21](https://github.com/dapr/dapr/issues/21) is included as a *opt-in preview feature* for Actors. Reentrancy enables actor A to call actor B which can then call actor A again without the call blocking. See [How-to: Enable and use actor reentrancy in Dapr](https://v1-2.docs.dapr.io/developing-applications/building-blocks/actors/actor-reentrancy/) documentation for details.
 -  **Consul as a DNS name resolution component** [749](https://github.com/dapr/components-contrib/issues/749) enables Dapr to preform service discovery and use the service invocation API in VM scenarios that can be joined in the same network. This means that Dapr now supports Kubernetes,VMs and physical machines as production hosting environments with DNS resolution enabled in each. See [HashiCorp Consul component spec](https://v1-2.docs.dapr.io/reference/components-reference/supported-name-resolution/setup-nr-consul/) documentation for details.
 -  As a result of the Consul integration **Name resolution components are now first class component types** that can be "swapped" in the same manner as any other component type through Dapr configuration settings. See [Name resolution component specs](https://v1-2.docs.dapr.io/reference/components-reference/supported-name-resolution/) documentation for details.   
 - Many **new components**:
     - Alibaba Cloud DingTalk Webhook as Binding [811](https://github.com/dapr/components-contrib/issues/811)
     - Zeebe Workflow Engine as Binding [805](https://github.com/dapr/components-contrib/issues/805)
     - Alibaba Sentinel as Middleware [828](https://github.com/dapr/components-contrib/issues/828)
     - Consul name resolution component [749](https://github.com/components-contrib/issues/749)
 - The 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://v1-2.docs.dapr.io/concepts/) and the [Developing applications](https://v1-2.docs.dapr.io/developing-applications/) or follow the links above. Updates to documentation are [listed below](#Documentation).

For more information on the features listed above watch the [Dapr Community Call #38](https://www.youtube.com/watch?v=LSYyTL0nS8Y) and the upcoming Community call #39

See [this](#Upgrading-to-Dapr-120) section on upgrading Dapr to version 1.2.0. 

## Deprecation Notice

The ```GET /v1.0/shutdown``` HTTP API is deprecated and scheduled for removal in 1.4. All users who have directly integrated with this API should use the ```POST /v1.0/shutdown``` API instead. If you are using one of the supported Dapr SDKs you do not need to take any action.

See https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-job/ for an example usage of this API.

## Acknowledgements

Thanks to everyone who made this release possible!

@0to1, @1046102779, @AaronCrawfis, @DarqueWarrior, @EdwinVW, @Hugome, @JoeMayo, @Junnplus, @Taction, @TomorJM, @a-elsheikh, @abogdanov37, @akkie, @apuzyrevsky, @artursouza, @beiwei30, @berndverst, @cinience, @fjvela, @halspang, @jigargandhi, @jjcollinge, @jony4, @luckyxiaoqiang, @marviniter, @msfussell, @mukundansundar, @newbe36524, @pkedy, @readefries, @wcs1only, @withinboredom, @xiazuojie, @yanjianlong, @yaron2, @zhongfox

## New in this release

### Dapr Runtime
- **RESOLVED** Allow Reentrancy for Actors [21](https://github.com/dapr/dapr/issues/21)
- **RESOLVED** Propagate context to PubSub handler call [1721](https://github.com/dapr/dapr/issues/1721)
- **RESOLVED** Add context to PubSub handler  [1749](https://github.com/dapr/dapr/pull/1749)
- **RESOLVED** Enhance pub/sub cloud event handling to support existing messaging infrastructure [2308](https://github.com/dapr/dapr/issues/2308)
- **RESOLVED** Create a dapr/kit repo to contain common packages [2820](https://github.com/dapr/dapr/issues/2820)
- **RESOLVED** Dapr Serialization Error with Dapr CLI Publish [2925](https://github.com/dapr/dapr/issues/2925)
- **RESOLVED** Refactoring codes of getting app configuration from user application [2927](https://github.com/dapr/dapr/pull/2927)
- **RESOLVED** Running a local gRPC with TLS service fails [2963](https://github.com/dapr/dapr/issues/2963)
- **RESOLVED** Default components of Self-hosted mode miss the required version field [2964](https://github.com/dapr/dapr/issues/2964)
- **RESOLVED** Allow concurrent reconciliation of Kubernetes resources [2993](https://github.com/dapr/dapr/issues/2993)
- **RESOLVED** Increase verbosity for actor errors. [3001](https://github.com/dapr/dapr/pull/3001)
- **ADDED** audit log to sidecar injector [3009](https://github.com/dapr/dapr/issues/3009)
- **ADDED** Opt-in for preview features [3048](https://github.com/dapr/dapr/issues/3048)
- **RESOLVED** optimize: directly use default metrics register [3053](https://github.com/dapr/dapr/pull/3053)
- **RESOLVED** Allow choosing which APIs are available on a sidecar [3054](https://github.com/dapr/dapr/issues/3054)
- **RESOLVED** Dapr sidecar failed to start: certificate has expired or is not yet valid [3058](https://github.com/dapr/dapr/issues/3058)
- **FIXED** Bug in runtime. [3063](https://github.com/dapr/dapr/issues/3063)
- **ADDED** Reentrancy bypass for actor locks [3078](https://github.com/dapr/dapr/issues/3078)
- **RESOLVED** operator exited with status 1 but no error log output [3082](https://github.com/dapr/dapr/issues/3082)
- **RESOLVED** Enable Dapr sidecars to pick up newly added components without restart [3085](https://github.com/dapr/dapr/issues/3085)
- **RESOLVED** Automatically merges and updates PRs. [3105](https://github.com/dapr/dapr/pull/3105)
- **ADDED**  nodeselector option in helm chart [3113](https://github.com/dapr/dapr/issues/3113)
- **RESOLVED** issue: use normalizeOperation necessity [3142](https://github.com/dapr/dapr/issues/3142)
- **RESOLVED** gracefully stop runtime when exited with log.Fatalf [3159](https://github.com/dapr/dapr/issues/3159)
- **RESOLVED** service that owner referencing with a deployment will be removed [3181](https://github.com/dapr/dapr/issues/3181)
### Dapr CLI
- **UPDATED** CLI logging output to remove extra newlines when application output contains a newline [616](https://github.com/dapr/cli/issues/616)
- **RESOLVED** Permission Denied When Installing on MacBook M1 [634](https://github.com/dapr/cli/issues/634)
- **RESOLVED** Default components of Self-hosted mode miss the required version field [644](https://github.com/dapr/cli/issues/644)
- **RESOLVED** Stop the running `daprd` process on error when `dapr run` is called [645](https://github.com/dapr/cli/issues/645)
- **ADDED** Support to provide GITHUB_TOKEN to address GitHub rate limiting [700](https://github.com/dapr/cli/pull/700)
- **ADDED** Support to  get api response and replace base download URL [647](https://github.com/dapr/cli/issues/647)
- **RESOLVED** CLI `run` detects shutdown API call and exits as expected [654](https://github.com/dapr/cli/issues/654)
- **RESOLVED** MTLS automatically enabled on running `dapr upgrade` on a cluster with MTLS disabled [664](https://github.com/dapr/cli/issues/664)
- **UPDATED** Switch CLI to use Go 1.16 version [666](https://github.com/dapr/cli/issues/666)
- **ADDED** Read invoke and publish payloads from file [668](https://github.com/dapr/cli/issues/668)
- **RESOLVED** MTLS command on error exits with success [671](https://github.com/dapr/cli/issues/671)
- **RESOLVED** Update helm client. [679](https://github.com/dapr/cli/pull/679)
- **RESOLVED** Added `--dapr-http-max-request-size` parameter to CLI  [699](https://github.com/dapr/cli/issues/699)
### Components
- **RESOLVED** Support of Azure Blob Metadata (for Blob state storage) [462](https://github.com/dapr/components-contrib/issues/462)
- **RESOLVED** Add DNS name resolver. Add unit tests. [743](https://github.com/dapr/components-contrib/pull/743)
- **ADDED** NameResolution: Consul [749](https://github.com/dapr/components-contrib/issues/749)
- **FIXED** Password configuration for Redis Sentinel state store. [756](https://github.com/dapr/components-contrib/issues/756)
- **UPDATED** Optimize SMTP binding performance [781](https://github.com/dapr/components-contrib/issues/781)
- **RESOLVED** Update Readme.md [789](https://github.com/dapr/components-contrib/pull/789)
- **RESOLVED** Fixed bug where default vaultaddr is never used. [791](https://github.com/dapr/components-contrib/pull/791)
- **RESOLVED** customize cluster domain of k8s nameresolution [792](https://github.com/dapr/components-contrib/issues/792)
- **RESOLVED** Hashicorp Vault - accept root token as string instead of file [794](https://github.com/dapr/components-contrib/issues/794)
- **RESOLVED** Use `go mod tidy` before make [799](https://github.com/dapr/components-contrib/pull/799)
- **RESOLVED** Upgrade redis client to v8 and use context in redis pubsub component to cancel request [804](https://github.com/dapr/components-contrib/pull/804)
- **RESOLVED** Implement bindings for the Zeebe workflow engine [805](https://github.com/dapr/components-contrib/issues/805)
- **RESOLVED** Error amqp:link:detach-forced [809](https://github.com/dapr/components-contrib/issues/809)
- **RESOLVED** Alibaba Cloud DingTalk Webhook Binding [811](https://github.com/dapr/components-contrib/issues/811)
- **RESOLVED** Add redis cluter mode for pubsub [823](https://github.com/dapr/components-contrib/pull/823)
- **RESOLVED** optimize(state/redis): output detail redis error [825](https://github.com/dapr/components-contrib/pull/825)
- **RESOLVED** Sentinel as Dapr's middleware [828](https://github.com/dapr/components-contrib/issues/828)
- **RESOLVED** Add timeout to cancel request for it would be redelivered [832](https://github.com/dapr/components-contrib/pull/832)
- **RESOLVED** Add optional metadata param maxLen for redis stream PubSub component [835](https://github.com/dapr/components-contrib/pull/835)
- **RESOLVED** add BulkGetResponse comments [845](https://github.com/dapr/components-contrib/pull/845)
- **FIXED** Redis subscriber should not block infinitely on XReadGroup [852](https://github.com/dapr/components-contrib/issues/852)
- **RESOLVED** Make the retry package available to use across all components [853](https://github.com/dapr/components-contrib/issues/853)
- **RESOLVED** Dapr CLI commands take ~5 seconds to execute [865](https://github.com/dapr/components-contrib/issues/865)
- **RESOLVED** Update Aerospike to v4.5.0 [866](https://github.com/dapr/components-contrib/pull/866)
- **FIXED** Race in pulsar pubsub component. [867](https://github.com/dapr/components-contrib/issues/867)
### .NET SDK
- **RESOLVED** Add method for health check in dapr client [640](https://github.com/dapr/dotnet-sdk/issues/640)
### Java SDK
- **RESOLVED** Add auto validation for Tracing Example [469](https://github.com/dapr/java-sdk/issues/469)
- **REMOVED** protoc-jar-maven-plugin as a dependency for dapr-sdk-autogen [501](https://github.com/dapr/java-sdk/issues/501)
- **FIXED** HTTP save state transaction [514](https://github.com/dapr/java-sdk/issues/514)
- **RESOLVED** Return empty metadata for key not found. [528](https://github.com/dapr/java-sdk/pull/528)
- **ADDED** Shutdown API  [529](https://github.com/dapr/java-sdk/issues/529)
- **UPDATED** PubSub example to include tracing [537](https://github.com/dapr/java-sdk/issues/537)
### Documentation
- **RESOLVED** Add docs on how to use daprd and command line options [378](https://github.com/dapr/docs/issues/378)
- **RESOLVED** Add to Actor Conceptual docs [804](https://github.com/dapr/docs/issues/804)
- **RESOLVED** Create FAQ/Troubleshooting on local mDNS [1173](https://github.com/dapr/docs/issues/1173)
- **RESOLVED** Actor concepts missing types and ids [1298](https://github.com/dapr/docs/issues/1298)
- **RESOLVED** Article needed to link to Azure APIM [1303](https://github.com/dapr/docs/issues/1303)
- **RESOLVED** Outdated instructions for running Kafka on Kubernetes [1327](https://github.com/dapr/docs/issues/1327)
- **RESOLVED** chore: add documentation on the binding mqtt based on the pubsub mqtt… [1328](https://github.com/dapr/docs/pull/1328)
- **RESOLVED** [CONTENT] PubSub add more redis client settings [1339](https://github.com/dapr/docs/issues/1339)
- **RESOLVED** Update HashiCorp Vault secret docs [1354](https://github.com/dapr/docs/issues/1354)
- **RESOLVED** Update hashicorp-vault.md [1355](https://github.com/dapr/docs/pull/1355)
- **RESOLVED** Add documentation for PowerShell and Command Prompt [1373](https://github.com/dapr/docs/issues/1373)
- **RESOLVED** Remove workaround for mTLS bug [1387](https://github.com/dapr/docs/issues/1387)
- **RESOLVED** [CONTENT] Add CLI reference docs for `--data-file` flags for invoke and publish [1391](https://github.com/dapr/docs/issues/1391)
- **RESOLVED** Add Alibaba Cloud DingTalk Webhook binding doc [1407](https://github.com/dapr/docs/pull/1407)
- **RESOLVED** [CONTENT] Consul nameresolution component [1408](https://github.com/dapr/docs/issues/1408)
- **RESOLVED** sentinel middleware doc  [1439](https://github.com/dapr/docs/pull/1439)
- **RESOLVED** Add documentation for the Zeebe bindings [1441](https://github.com/dapr/docs/pull/1441)
- **RESOLVED** Allow choosing which APIs are available on a sidecar  [1460](https://github.com/dapr/docs/issues/1460)
- **RESOLVED** v1.2 Release [1461](https://github.com/dapr/docs/issues/1461)
- **RESOLVED** Documentation for Preview Features [1463](https://github.com/dapr/docs/issues/1463)
- **RESOLVED** Document how to set the default values for actors [1470](https://github.com/dapr/docs/issues/1470)
- **RESOLVED** [CONTENT] Document pubsub without CE for 1.2 [1474](https://github.com/dapr/docs/issues/1474)
- **RESOLVED** Create a shareable Dapr PowerPoint deck [1477](https://github.com/dapr/docs/issues/1477)
- **RESOLVED** [CONTENT] Add CLI reference docs for `--dapr-http-max-request-size` flags for run [1481](https://github.com/dapr/docs/issues/1481)
- **RESOLVED** Add Docs for Actor Reentrancy [1482](https://github.com/dapr/docs/issues/1482)
### Kit
- **MOVED** logger package from `dapr/dapr` to `dapr/kit` [1](https://github.com/dapr/kit/pull/1)
### Homebrew-tap
- **REPLACED** deprecated formula style with current alternative [20](https://github.com/dapr/homebrew-tap/pull/20)

## Upgrading to Dapr 1.2.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 docker command needs sudo:

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

For stable releases like this, 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 --runtime-version=1.2.0
```

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

```bash
$ dapr --version

CLI version: 1.2.0
Runtime version: 1.2.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 stable release from [here](https://github.com/dapr/cli/releases) and put the `dapr` binary in your PATH.

To upgrade Dapr, run:

```
dapr upgrade --runtime-version 1.2.0 -k
```

To upgrade with high availability mode:

```
dapr upgrade --runtime-version 1.2.0 --enable-ha=true -k
```

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

All done!

*Note: 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.2.0 --namespace=dapr-system --wait
```

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

All done!

*Note: Make sure your deployments are restarted to pick the latest version of the Dapr sidecar*

#### Starting a fresh install on a cluster

Please see [Deploying Dapr on a Kubernetes cluster](https://v1-2.docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/) 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.2.0 --namespace dapr-system --wait
```

Alternatively, you can use the latest version of CLI:

```
dapr init --runtime-version=1.2.0 -k
```

##### 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.6.0    15s  2021-05-20 13:07.39
  dapr-sidecar-injector  dapr-system  True     Running  1         1.2.0   15s  2021-05-20 13:07.39
  dapr-sentry            dapr-system  True     Running  1         1.2.0   15s  2021-05-20 13:07.39
  dapr-operator          dapr-system  True     Running  1         1.2.0   15s  2021-05-20 13:07.39
  dapr-placement         dapr-system  True     Running  1         1.2.0   15s  2021-05-20 13:07.39
```

After Dapr 1.2.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

None.

