Skip to content

Commit

Permalink
Merge branch 'v1.13' into issue_4193
Browse files Browse the repository at this point in the history
  • Loading branch information
hhunter-ms authored Aug 6, 2024
2 parents 6d7e6ab + dd2e064 commit c66d2d3
Show file tree
Hide file tree
Showing 46 changed files with 248 additions and 103 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dapr documentation

[![GitHub License](https://img.shields.io/github/license/dapr/docs?style=flat&label=License&logo=github)](https://github.com/dapr/docs/blob/v1.13/LICENSE) [![GitHub issue custom search in repo](https://img.shields.io/github/issues-search/dapr/docs?query=type%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22&label=Good%20first%20issues&style=flat&logo=github)](https://github.com/dapr/docs/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) [![Discord](https://img.shields.io/discord/778680217417809931?label=Discord&style=flat&logo=discord)](http://bit.ly/dapr-discord) [![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCtpSQ9BLB_3EXdWAUQYwnRA?style=flat&label=YouTube%20views&logo=youtube)](https://youtube.com/@daprdev) [![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/daprdev?logo=x&style=flat)](https://twitter.com/daprdev)
[![GitHub License](https://img.shields.io/github/license/dapr/docs?style=flat&label=License&logo=github)](https://github.com/dapr/docs/blob/v1.13/LICENSE) [![GitHub issue custom search in repo](https://img.shields.io/github/issues-search/dapr/docs?query=type%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22&label=Good%20first%20issues&style=flat&logo=github)](https://github.com/dapr/docs/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) [![Discord](https://img.shields.io/discord/778680217417809931?label=Discord&style=flat&logo=discord)](https://bit.ly/dapr-discord) [![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCtpSQ9BLB_3EXdWAUQYwnRA?style=flat&label=YouTube%20views&logo=youtube)](https://youtube.com/@daprdev) [![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/daprdev?logo=x&style=flat)](https://twitter.com/daprdev)

If you are looking to explore the Dapr documentation, please go to the documentation website:

Expand All @@ -23,7 +23,7 @@ For more information visit the [Dapr branch structure](https://docs.dapr.io/cont

## Contribution guidelines

Before making your first contribution, make sure to review the [contributing section](http://docs.dapr.io/contributing/) in the docs.
Before making your first contribution, make sure to review the [contributing section](https://docs.dapr.io/contributing/) in the docs.

## Overview

Expand Down
2 changes: 1 addition & 1 deletion daprdocs/content/en/concepts/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Dapr can be used from any developer framework. Here are some that have been inte
| [.NET]({{< ref dotnet >}}) | [ASP.NET Core](https://github.com/dapr/dotnet-sdk/tree/master/examples/AspNetCore) | Brings stateful routing controllers that respond to pub/sub events from other services. Can also take advantage of [ASP.NET Core gRPC Services](https://docs.microsoft.com/aspnet/core/grpc/).
| [Java]({{< ref java >}}) | [Spring Boot](https://spring.io/) | Build Spring boot applications with Dapr APIs
| [Python]({{< ref python >}}) | [Flask]({{< ref python-flask.md >}}) | Build Flask applications with Dapr APIs
| [Javascript](https://github.com/dapr/js-sdk) | [Express](http://expressjs.com/) | Build Express applications with Dapr APIs
| [JavaScript](https://github.com/dapr/js-sdk) | [Express](https://expressjs.com/) | Build Express applications with Dapr APIs
| [PHP]({{< ref php >}}) | | You can serve with Apache, Nginx, or Caddyserver.

#### Integrations and extensions
Expand Down
2 changes: 1 addition & 1 deletion daprdocs/content/en/concepts/service-mesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
How Dapr compares to and works with service meshes
---

Dapr uses a sidecar architecture, running as a separate process alongside the application and includes features such as service invocation, network security, and distributed tracing. This often raises the question: how does Dapr compare to service mesh solutions such as [Linkerd](https://linkerd.io/), [Istio](https://istio.io/) and [Open Service Mesh](https://openservicemesh.io/) among others?
Dapr uses a sidecar architecture, running as a separate process alongside the application and includes features such as service invocation, network security, and [distributed tracing](https://middleware.io/blog/what-is-distributed-tracing/). This often raises the question: how does Dapr compare to service mesh solutions such as [Linkerd](https://linkerd.io/), [Istio](https://istio.io/) and [Open Service Mesh](https://openservicemesh.io/) among others?

## How Dapr and service meshes compare
While Dapr and service meshes do offer some overlapping capabilities, **Dapr is not a service mesh**, where a service mesh is defined as a *networking* service mesh. Unlike a service mesh which is focused on networking concerns, Dapr is focused on providing building blocks that make it easier for developers to build applications as microservices. Dapr is developer-centric, versus service meshes which are infrastructure-centric.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ spec:

The code examples below leverage Dapr SDKs to invoke the output bindings endpoint on a running Dapr instance.

{{< tabs Dotnet Java Python Go JavaScript>}}
{{< tabs ".NET" Java Python Go JavaScript>}}

{{% codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Configure your application to receive incoming events. If you're using HTTP, you

Below are code examples that leverage Dapr SDKs to demonstrate an output binding.

{{< tabs Dotnet Java Python Go JavaScript>}}
{{< tabs ".NET" Java Python Go JavaScript>}}

{{% codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
The following example shows how to get a saved configuration item using the Dapr Configuration API.
{{< tabs ".NET" Java Python Go Javascript "HTTP API (BASH)" "HTTP API (Powershell)">}}
{{< tabs ".NET" Java Python Go JavaScript "HTTP API (BASH)" "HTTP API (Powershell)">}}
{{% codetab %}}
Expand Down Expand Up @@ -252,7 +252,7 @@ Invoke-RestMethod -Uri 'http://localhost:3601/v1.0/configuration/configstore?key
Below are code examples that leverage SDKs to subscribe to keys `[orderId1, orderId2]` using `configstore` store component.
{{< tabs ".NET" "ASP.NET Core" Java Python Go Javascript>}}
{{< tabs ".NET" "ASP.NET Core" Java Python Go JavaScript>}}
{{% codetab %}}
Expand Down Expand Up @@ -521,7 +521,7 @@ After you've subscribed to watch configuration items, you will receive updates f
Following are the code examples showing how you can unsubscribe to configuration updates using unsubscribe API.
{{< tabs ".NET" Java Python Go Javascript "HTTP API (BASH)" "HTTP API (Powershell)">}}
{{< tabs ".NET" Java Python Go JavaScript "HTTP API (BASH)" "HTTP API (Powershell)">}}
{{% codetab %}}
```csharp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
### Acquire lock
{{< tabs HTTP Dotnet Go >}}
{{< tabs HTTP ".NET" Go >}}
{{% codetab %}}
Expand Down Expand Up @@ -122,7 +122,7 @@ func main() {

### Unlock existing lock

{{< tabs HTTP Dotnet Go >}}
{{< tabs HTTP ".NET" Go >}}

{{% codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ scopes:
You can override this file with another [pubsub component]({{< ref setup-pubsub >}}) by creating a components directory (in this example, `myComponents`) containing the file and using the flag `--resources-path` with the `dapr run` CLI command.

{{< tabs Dotnet Java Python Go Javascript >}}
{{< tabs ".NET" Java Python Go JavaScript >}}

{{% codetab %}}

Expand Down Expand Up @@ -186,7 +186,7 @@ Place `subscription.yaml` in the same directory as your `pubsub.yaml` component.

Below are code examples that leverage Dapr SDKs to subscribe to the topic you defined in `subscription.yaml`.

{{< tabs Dotnet Java Python Go JavaScript>}}
{{< tabs ".NET" Java Python Go JavaScript>}}

{{% codetab %}}

Expand Down Expand Up @@ -422,7 +422,7 @@ Invoke-RestMethod -Method Post -ContentType 'application/json' -Body '{"orderId"

Below are code examples that leverage Dapr SDKs to publish a topic.

{{< tabs Dotnet Java Python Go Javascript>}}
{{< tabs ".NET" Java Python Go JavaScript>}}

{{% codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The bulk publish operation also does not guarantee any ordering of messages.

### Example

{{< tabs Java Javascript Dotnet Python Go "HTTP API (Bash)" "HTTP API (PowerShell)" >}}
{{< tabs Java JavaScript ".NET" Python Go "HTTP API (Bash)" "HTTP API (PowerShell)" >}}

{{% codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ See a [full API reference]({{< ref secrets_api.md >}}).

Now that you've set up the local secret store, call Dapr to get the secrets from your application code. Below are code examples that leverage Dapr SDKs for retrieving a secret.

{{< tabs Dotnet Java Python Go Javascript>}}
{{< tabs ".NET" Java Python Go JavaScript>}}

{{% codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
allowedSecrets: ["secret1", "secret2"]
```

The default access to the `vault` secret store is `deny`, while some secrets are accessible by the application, based on the `allowedSecrets` list. [Learn how to apply configuration to the sidecar]]({{< ref configuration-concept.md >}}).
The default access to the `vault` secret store is `deny`, while some secrets are accessible by the application, based on the `allowedSecrets` list. [Learn how to apply configuration to the sidecar]({{< ref configuration-concept.md >}}).

## Scenario 3: Deny access to certain sensitive secrets in a secret store

Expand All @@ -88,7 +88,7 @@ spec:
deniedSecrets: ["secret1", "secret2"]
```

This example configuration explicitly denies access to `secret1` and `secret2` from the secret store named `vault` while allowing access to all other secrets. [Learn how to apply configuration to the sidecar]]({{< ref configuration-concept.md >}}).
This example configuration explicitly denies access to `secret1` and `secret2` from the secret store named `vault` while allowing access to all other secrets. [Learn how to apply configuration to the sidecar]({{< ref configuration-concept.md >}}).

## Permission priority

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ namespace EventService
var content = new StringContent(orderJson, Encoding.UTF8, "application/json");

var httpClient = DaprClient.CreateInvokeHttpClient();
await httpClient.PostAsJsonAsync("http://order-processor/orders", content);
var response = await httpClient.PostAsJsonAsync("http://order-processor/orders", content);
var result = await response.Content.ReadAsStringAsync();

Console.WriteLine("Order requested: " + orderId);
Console.WriteLine("Result: " + result);
}
Expand Down Expand Up @@ -408,6 +410,14 @@ Using CLI:
dapr invoke --app-id checkout --method checkout/100
```

#### Including a query string in the URL

You can also append a query string or a fragment to the end of the URL and Dapr will pass it through unchanged. This means that if you need to pass some additional arguments in your service invocation that aren't part of a payload or the path, you can do so by appending a `?` to the end of the URL, followed by the key/value pairs separated by `=` signs and delimited by `&`. For example:

```bash
curl 'http://dapr-app-id:checkout@localhost:3602/checkout/100?basket=1234&key=abc` -X POST
```
### Namespaces
When running on [namespace supported platforms]({{< ref "service_invocation_api.md#namespace-supported-platforms" >}}), you include the namespace of the target app in the app ID. For example, following the `<app>.<namespace>` format, use `checkout.production`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ ctx = metadata.AppendToOutgoingContext(ctx, "dapr-app-id", "server")

All languages supported by gRPC allow for adding metadata. Here are a few examples:

{{< tabs Java Dotnet Python JavaScript Ruby "C++">}}
{{< tabs Java ".NET" Python JavaScript Ruby "C++">}}

{{% codetab %}}
```java
Expand Down Expand Up @@ -249,7 +249,7 @@ When using Dapr to proxy streaming RPC calls using gRPC, you must set an additio

For example:

{{< tabs Go Java Dotnet Python JavaScript Ruby "C++">}}
{{< tabs Go Java ".NET" Python JavaScript Ruby "C++">}}

{{% codetab %}}
```go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Set an `app-id`, as the state keys are prefixed with this value. If you don't se

The following example shows how to save and retrieve a single key/value pair using the Dapr state management API.

{{< tabs Dotnet Java Python Go Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}}
{{< tabs ".NET" Java Python Go JavaScript "HTTP API (Bash)" "HTTP API (PowerShell)">}}

{{% codetab %}}

Expand Down Expand Up @@ -356,7 +356,7 @@ Restart your sidecar and try retrieving state again to observe that state persis

Below are code examples that leverage Dapr SDKs for deleting the state.

{{< tabs Dotnet Java Python Go Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}}
{{< tabs ".NET" Java Python Go JavaScript "HTTP API (Bash)" "HTTP API (PowerShell)">}}

{{% codetab %}}

Expand Down Expand Up @@ -537,7 +537,7 @@ Try getting state again. Note that no value is returned.

Below are code examples that leverage Dapr SDKs for saving and retrieving multiple states.

{{< tabs Dotnet Java Python Go Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}}
{{< tabs ".NET" Java Python Go JavaScript "HTTP API (Bash)" "HTTP API (PowerShell)">}}

{{% codetab %}}

Expand Down Expand Up @@ -788,7 +788,7 @@ State transactions require a state store that supports multi-item transactions.

Below are code examples that leverage Dapr SDKs for performing state transactions.

{{< tabs Dotnet Java Python Go Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}}
{{< tabs ".NET" Java Python Go JavaScript "HTTP API (Bash)" "HTTP API (PowerShell)">}}

{{% codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This "replay" behavior continues until the workflow function completes or fails
Using this replay technique, a workflow is able to resume execution from any "await" point as if it had never been unloaded from memory. Even the values of local variables from previous runs can be restored without the workflow engine knowing anything about what data they stored. This ability to restore state makes Dapr Workflows _durable_ and _fault tolerant_.

{{% alert title="Note" color="primary" %}}
The workflow replay behavior described here requires that workflow function code be _deterministic_. Deterministic workflow functions take the exact same actions when provided the exact same inputs. [Learn more about the limitations around deterministic workflow code.]({{< ref "workflow-features-concepts.md#workflow-determinism-and-code-constraints" >}})
The workflow replay behavior described here requires that workflow function code be _deterministic_. Deterministic workflow functions take the exact same actions when provided the exact same inputs. [Learn more about the limitations around deterministic workflow code.]({{< ref "workflow-features-concepts.md#workflow-determinism-and-code-restraints" >}})
{{% /alert %}}


Expand All @@ -75,9 +75,9 @@ You can use the following two techniques to write workflows that may need to sch

### Updating workflow code

Because workflows are long-running and durable, updating workflow code must be done with extreme care. As discussed in the [workflow determinism]({{< ref "#workflow-determinism-and-code-constraints" >}}) limitation section, workflow code must be deterministic. Updates to workflow code must preserve this determinism if there are any non-completed workflow instances in the system. Otherwise, updates to workflow code can result in runtime failures the next time those workflows execute.
Because workflows are long-running and durable, updating workflow code must be done with extreme care. As discussed in the [workflow determinism]({{< ref "#workflow-determinism-and-code-restraints" >}}) limitation section, workflow code must be deterministic. Updates to workflow code must preserve this determinism if there are any non-completed workflow instances in the system. Otherwise, updates to workflow code can result in runtime failures the next time those workflows execute.

[See known limitations]({{< ref "workflow-features-concepts.md#workflow-determinism-and-code-constraints" >}})
[See known limitations]({{< ref "#limitations" >}})

## Workflow activities

Expand Down Expand Up @@ -123,7 +123,7 @@ Retries are internally implemented using durable timers. This means that workflo
The actions performed by a retry policy are saved into a workflow's history. Care must be taken not to change the behavior of a retry policy after a workflow has already been executed. Otherwise, the workflow may behave unexpectedly when replayed. See the notes on [updating workflow code]({{< ref "#updating-workflow-code" >}}) for more information.
{{% /alert %}}

It's possible to use both workflow retry policies and Dapr Resiliency policies together. For example, if a workflow activity uses a Dapr client to invoke a service, the Dapr client uses the configured resiliency policy. See [Quickstart: Service-to-service resiliency]({{< ref "#resiliency-serviceinvo-quickstart" >}}) for more information with an example. However, if the activity itself fails for any reason, including exhausting the retries on the resiliency policy, then the workflow's resiliency policy kicks in.
It's possible to use both workflow retry policies and Dapr Resiliency policies together. For example, if a workflow activity uses a Dapr client to invoke a service, the Dapr client uses the configured resiliency policy. See [Quickstart: Service-to-service resiliency]({{< ref "resiliency-serviceinvo-quickstart.md" >}}) for more information with an example. However, if the activity itself fails for any reason, including exhausting the retries on the resiliency policy, then the workflow's resiliency policy kicks in.

{{% alert title="Note" color="primary" %}}
Using workflow retry policies and resiliency policies together can result in unexpected behavior. For example, if a workflow activity exhausts its configured retry policy, the workflow engine will still retry the activity according to the workflow retry policy. This can result in the activity being retried more times than expected.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ description: "Use the Dapr Kubernetes Operator to manage the Dapr control plane"

You can use the Dapr Kubernetes Operator to manage the Dapr control plane. Use the operator to automate the tasks required to manage the lifecycle of Dapr control plane in Kubernetes mode.

{{< button text="Install and use the Dapr Kubernetes Operator" link="https://github.com/dapr/dapr-kubernetes-operator" >}}
{{< button text="Install and use the Dapr Kubernetes Operator" link="https://github.com/dapr/kubernetes-operator" >}}
2 changes: 1 addition & 1 deletion daprdocs/content/en/developing-applications/sdks/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Select your [preferred language below]({{< ref "#sdk-languages" >}}) to learn mo
| [Java]({{< ref java >}}) | Stable || Spring Boot <br /> Quarkus|||
| [Go]({{< ref go >}}) | Stable |||||
| [PHP]({{< ref php >}}) | Stable |||| |
| [Javascript]({{< ref js >}}) | Stable|| |||
| [JavaScript]({{< ref js >}}) | Stable|| |||
| [C++](https://github.com/dapr/cpp-sdk) | In development || | |
| [Rust](https://github.com/dapr/rust-sdk) | In development || || |

Expand Down
2 changes: 1 addition & 1 deletion daprdocs/content/en/getting-started/install-dapr-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You'll use the Dapr CLI as the main tool for various Dapr-related tasks. You can
The Dapr CLI works with both [self-hosted]({{< ref self-hosted >}}) and [Kubernetes]({{< ref Kubernetes >}}) environments.

{{% alert title="Before you begin" color="primary" %}}
In Docker Desktop's advanced options, verify you've allowed the default Docker socket to be used.
In Docker Desktop's advanced options, verify you've allowed the default Docker socket to be used. This option is not available if you are using WSL integration on Windows.
<img src="/images/docker-desktop-setting.png" width=800 style="padding-bottom:15px;">
{{% /alert %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ In the YAML file:
For this example, you will need:
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
- Java JDK 11 (or greater):
- Java JDK 17 (or greater):
- [Oracle JDK](https://www.oracle.com/java/technologies/downloads), or
- OpenJDK
- [Apache Maven](https://maven.apache.org/install.html), version 3.x.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ try
For this example, you will need:
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
- Java JDK 11 (or greater):
- Java JDK 17 (or greater):
- [Oracle JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11), or
- OpenJDK
- [Apache Maven](https://maven.apache.org/install.html), version 3.x.
Expand Down
Loading

0 comments on commit c66d2d3

Please sign in to comment.