Skip to content

Commit

Permalink
Merge branch 'v1.12' into otel_override_service_name
Browse files Browse the repository at this point in the history
  • Loading branch information
msfussell authored Feb 1, 2024
2 parents 68c5b3a + 1173033 commit 2901877
Show file tree
Hide file tree
Showing 13 changed files with 221 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Now that you've learned about the [actor building block]({{< ref "actors-overvie

Dapr actors are virtual, meaning that their lifetime is not tied to their in-memory representation. As a result, they do not need to be explicitly created or destroyed. The Dapr actor runtime automatically activates an actor the first time it receives a request for that actor ID. If an actor is not used for a period of time, the Dapr actor runtime garbage-collects the in-memory object. It will also maintain knowledge of the actor's existence should it need to be reactivated later.

Invocation of actor methods and reminders reset the idle time, e.g. reminder firing will keep the actor active. Actor reminders fire whether an actor is active or inactive, if fired for inactive actor, it will activate the actor first. Actor timers do not reset the idle time, so timer firing will not keep the actor active. Timers only fire while the actor is active.
Invocation of actor methods, timers, and reminders reset the actor idle time. For example, a reminder firing keeps the actor active.
- Actor reminders fire whether an actor is active or inactive. If fired for an inactive actor, it activates the actor first.
- Actor timers firing reset the idle time; however, timers only fire while the actor is active.

The idle timeout and scan interval Dapr runtime uses to see if an actor can be garbage-collected is configurable. This information can be passed when Dapr runtime calls into the actor service to get supported actor types.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,8 @@ public class MonitorWorkflow extends Workflow {
}

// Put the workflow to sleep until the determined time
// Note: ctx.createTimer() method is not supported in the Java SDK yet
try {
TimeUnit.SECONDS.sleep(nextSleepInterval.getSeconds());
ctx.createTimer(nextSleepInterval);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -745,4 +744,4 @@ External events don't have to be directly triggered by humans. They can also be
- Try out the following examples:
- [Python](https://github.com/dapr/python-sdk/tree/master/examples/demo_workflow)
- [.NET](https://github.com/dapr/dotnet-sdk/tree/master/examples/Workflow)
- [Java](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/workflows)
- [Java](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/workflows)
27 changes: 25 additions & 2 deletions daprdocs/content/en/getting-started/install-dapr-selfhost.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Dapr initialization includes:
1. Running a **Dapr placement service container instance** for local actor support.

{{% alert title="Docker" color="primary" %}}
The recommended development environment requires [Docker](https://docs.docker.com/install/). While you can [initialize Dapr without a dependency on Docker]({{<ref self-hosted-no-docker.md>}})), the next steps in this guide assume the recommended Docker development environment.
The recommended development environment requires [Docker](https://docs.docker.com/install/). While you can [initialize Dapr without a dependency on Docker]({{< ref self-hosted-no-docker.md >}})), the next steps in this guide assume the recommended Docker development environment.

You can also install [Podman](https://podman.io/) in place of Docker. Read more about [initializing Dapr using Podman]({{<ref dapr-init.md>}}).
You can also install [Podman](https://podman.io/) in place of Docker. Read more about [initializing Dapr using Podman]({{< ref dapr-init.md >}}).
{{% /alert %}}

### Step 1: Open an elevated terminal
Expand Down Expand Up @@ -54,12 +54,35 @@ Run Windows Terminal or command prompt as administrator.

### Step 2: Run the init CLI command

{{< tabs "Linux/MacOS" "Windows">}}

{{% codetab %}}

Install the latest Dapr runtime binaries:

```bash
dapr init
```

**If you are installing on Mac OS Silicon with Docker,** you may need to perform the following workaround to enable `dapr init` to talk to Docker without using Kubernetes.
1. Navigate to **Docker Desktop** > **Settings** > **Advanced**.
1. Select the **Enable default Docker socket** checkbox.

{{% /codetab %}}

{{% codetab %}}

Install the latest Dapr runtime binaries:

```bash
dapr init
```

{{% /codetab %}}

{{< /tabs >}}


### Step 3: Verify Dapr version

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/python/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./checkout
pip3 install -r requirements.txt
cd ..
cd ./order-processor
pip3 install -r requirements.txt
cd ..
cd ./order-processor-fastapi
pip3 install -r requirements.txt
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -215,6 +229,17 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/javascript/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
npm install
cd ..
cd ./checkout
npm install
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -352,6 +377,18 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/csharp/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
dotnet restore
dotnet build
cd ../checkout
dotnet restore
dotnet build
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -497,6 +534,17 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/java/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
mvn clean install
cd ..
cd ./checkout
mvn clean install
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -647,6 +695,16 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/go/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
go build .
cd ../checkout
go build .
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -878,7 +936,7 @@ with DaprClient() as client:

### Step 5: View the Pub/sub outputs

Notice, as specified in the code above, the publisher pushes a random number to the Dapr sidecar while the subscriber receives it.
The publisher sends orders to the Dapr sidecar while the subscriber receives them.

Publisher output:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/python/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
pip3 install -r requirements.txt
cd ../checkout
pip3 install -r requirements.txt
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -184,6 +194,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/javascript/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
npm install
cd ../checkout
npm install
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -314,6 +334,18 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/csharp/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
dotnet restore
dotnet build
cd ../checkout
dotnet restore
dotnet build
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -448,6 +480,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/java/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
mvn clean install
cd ../checkout
mvn clean install
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -577,6 +619,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/go/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
go build .
cd ../checkout
go build .
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ In a terminal window, navigate to the `order-processor` directory.
cd state_management/python/sdk/order-processor
```

Install the dependencies:

```bash
pip3 install -r requirements.txt
```

Run the `order-processor` service alongside a Dapr sidecar using [Multi-App Run]({{< ref multi-app-dapr-run >}}).

```bash
Expand Down Expand Up @@ -163,6 +169,14 @@ Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quic
git clone https://github.com/dapr/quickstarts.git
```

Install the dependencies for the `order-processor` app:

```bash
cd ./order-processor
npm install
cd ..
```

### Step 2: Manipulate service state

In a terminal window, navigate to the `order-processor` directory.
Expand All @@ -171,6 +185,12 @@ In a terminal window, navigate to the `order-processor` directory.
cd state_management/javascript/sdk/order-processor
```

Install the dependencies:

```bash
npm install
```

Run the `order-processor` service alongside a Dapr sidecar.

```bash
Expand Down Expand Up @@ -297,6 +317,13 @@ In a terminal window, navigate to the `order-processor` directory.
cd state_management/csharp/sdk/order-processor
```

Install the dependencies:

```bash
dotnet restore
dotnet build
```

Run the `order-processor` service alongside a Dapr sidecar.

```bash
Expand Down Expand Up @@ -557,6 +584,12 @@ In a terminal window, navigate to the `order-processor` directory.
cd state_management/go/sdk/order-processor
```

Install the dependencies:

```bash
go build .
```

Run the `order-processor` service alongside a Dapr sidecar.

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,43 @@ If you are using Docker Desktop, verify that you have [the recommended settings]

1. Navigate to `http://localhost:9999` to validate a successful setup.

## Install metrics-server on the Kind Kubernetes Cluster

1. Get metrics-server manifests

```bash
wget https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
```

1. Add insecure TLS parameter to the components.yaml file

```yaml
metadata:
labels:
k8s-app: metrics-server
spec:
containers:
- args:
- --cert-dir=/tmp
- --secure-port=4443
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --kubelet-use-node-status-port
- --kubelet-insecure-tls <==== Add this
- --metric-resolution=15s
image: k8s.gcr.io/metrics-server/metrics-server:v0.6.2
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /livez
```

1. Apply modified manifest

```bash
kubectl apply -f components.yaml
```

## Related links
- [Try out a Dapr quickstart]({{< ref quickstarts.md >}})
- Learn how to [deploy Dapr on your cluster]({{< ref kubernetes-deploy.md >}})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ To use the S3 component, you need to use an existing bucket. Follow the [AWS doc

This component supports **output binding** with the following operations:

- `create` : [Create file](#create-file)
- `get` : [Get file](#get-file)
- `delete` : [Delete file](#delete-file)
- `list`: [List file](#list-files)
- `create` : [Create object](#create-object)
- `get` : [Get object](#get-object)
- `delete` : [Delete object](#delete-object)
- `list`: [List objects](#list-objects)

### Create file
### Create object

To perform a create operation, invoke the AWS S3 binding with a `POST` method and the following JSON body:

Expand Down
2 changes: 1 addition & 1 deletion sdkdocs/dotnet
Submodule dotnet updated 80 files
+6 −0 .github/holopin.yml
+12 −8 .github/workflows/itests.yml
+11 −5 .github/workflows/sdk_build.yml
+2 −2 daprdocs/content/en/dotnet-sdk-docs/dotnet-actors/dotnet-actors-howto.md
+317 −0 daprdocs/content/en/dotnet-sdk-docs/dotnet-actors/dotnet-actors-serialization.md
+1 −1 daprdocs/content/en/dotnet-sdk-docs/dotnet-client/_index.md
+3 −3 daprdocs/content/en/dotnet-sdk-docs/dotnet-workflow/dotnet-workflow-howto.md
+4 −5 examples/Actor/ActorClient/Program.cs
+16 −7 examples/Actor/DemoActor/DemoActor.cs
+18 −3 examples/Actor/IDemoActor/IDemoActor.cs
+16 −8 examples/Workflow/README.md
+25 −21 examples/Workflow/WorkflowConsoleApp/Program.cs
+0 −1 examples/Workflow/WorkflowConsoleApp/WorkflowConsoleApp.csproj
+4 −4 examples/Workflow/WorkflowConsoleApp/demo.http
+0 −1 examples/Workflow/WorkflowUnitTest/WorkflowUnitTest.csproj
+1 −1 properties/dapr_managed_netcore.props
+6 −6 src/Dapr.Actors.AspNetCore/ActorsEndpointRouteBuilderExtensions.cs
+0 −3 src/Dapr.Actors.AspNetCore/Dapr.Actors.AspNetCore.csproj
+50 −0 src/Dapr.Actors/Communication/ActorStateResponse.cs
+2 −1 src/Dapr.Actors/Constants.cs
+0 −4 src/Dapr.Actors/Dapr.Actors.csproj
+13 −2 src/Dapr.Actors/DaprHttpInteractor.cs
+2 −2 src/Dapr.Actors/IDaprInteractor.cs
+4 −4 src/Dapr.Actors/Runtime/ActorManager.cs
+15 −2 src/Dapr.Actors/Runtime/ActorStateChange.cs
+180 −13 src/Dapr.Actors/Runtime/ActorStateManager.cs
+2 −2 src/Dapr.Actors/Runtime/ConditionalValue.cs
+20 −10 src/Dapr.Actors/Runtime/DaprStateProvider.cs
+113 −1 src/Dapr.Actors/Runtime/IActorStateManager.cs
+1 −1 src/Dapr.Actors/Runtime/IActorStateSerializer.cs
+0 −4 src/Dapr.AspNetCore/Dapr.AspNetCore.csproj
+9 −0 src/Dapr.AspNetCore/DaprAuthenticationHandler.cs
+0 −4 src/Dapr.Client/Dapr.Client.csproj
+6 −0 src/Dapr.Client/DaprApiException.cs
+16 −16 src/Dapr.Client/DaprClient.cs
+3 −0 src/Dapr.Client/DaprException.cs
+1 −1 src/Dapr.Client/Protos/dapr/proto/common/v1/common.proto
+69 −23 src/Dapr.Client/Protos/dapr/proto/dapr/v1/dapr.proto
+0 −1 src/Dapr.Extensions.Configuration/Dapr.Extensions.Configuration.csproj
+2 −2 src/Dapr.Workflow/Dapr.Workflow.csproj
+75 −0 src/Dapr.Workflow/WorkflowLoggingService.cs
+4 −0 src/Dapr.Workflow/WorkflowRuntimeOptions.cs
+1 −1 src/Dapr.Workflow/WorkflowServiceCollectionExtensions.cs
+1 −0 src/Directory.Build.props
+0 −4 test/Dapr.Actors.AspNetCore.IntegrationTest.App/Dapr.Actors.AspNetCore.IntegrationTest.App.csproj
+0 −4 test/Dapr.Actors.AspNetCore.IntegrationTest/Dapr.Actors.AspNetCore.IntegrationTest.csproj
+0 −1 test/Dapr.Actors.AspNetCore.Test/Dapr.Actors.AspNetCore.Test.csproj
+1 −1 test/Dapr.Actors.Test/ActorCodeBuilderTests.cs
+199 −0 test/Dapr.Actors.Test/ActorStateManagerTest.cs
+0 −1 test/Dapr.Actors.Test/Dapr.Actors.Test.csproj
+56 −1 test/Dapr.Actors.Test/DaprHttpInteractorTest.cs
+137 −0 test/Dapr.Actors.Test/DaprStateProviderTest.cs
+106 −0 test/Dapr.Actors.Test/Runtime/ActorRuntimeTests.cs
+1 −1 test/Dapr.Actors.Test/Runtime/ActorTests.cs
+4 −4 test/Dapr.Actors.Test/TestDaprInteractor.cs
+0 −4 test/Dapr.AspNetCore.IntegrationTest.App/Dapr.AspNetCore.IntegrationTest.App.csproj
+0 −3 test/Dapr.AspNetCore.IntegrationTest/Dapr.AspNetCore.IntegrationTest.csproj
+0 −3 test/Dapr.AspNetCore.Test/Dapr.AspNetCore.Test.csproj
+0 −3 test/Dapr.Client.Test/Dapr.Client.Test.csproj
+57 −0 test/Dapr.Client.Test/PublishEventApiTest.cs
+1 −1 test/Dapr.Client.Test/StateApiTest.cs
+0 −4 test/Dapr.E2E.Test.Actors/Dapr.E2E.Test.Actors.csproj
+1 −1 test/Dapr.E2E.Test.Actors/Reminders/IReminderActor.cs
+26 −0 test/Dapr.E2E.Test.Actors/State/IStateActor.cs
+0 −3 test/Dapr.E2E.Test.App.Grpc/Dapr.E2E.Test.App.Grpc.csproj
+2 −2 test/Dapr.E2E.Test.App.ReentrantActor/Actors/ReentrantActor.cs
+0 −4 test/Dapr.E2E.Test.App.ReentrantActor/Dapr.E2E.Test.App.ReentrantActors.csproj
+1 −1 test/Dapr.E2E.Test.App/Actors/ReminderActor.cs
+47 −0 test/Dapr.E2E.Test.App/Actors/StateActor.cs
+1 −1 test/Dapr.E2E.Test.App/Actors/TimerActor.cs
+7 −4 test/Dapr.E2E.Test.App/Dapr.E2E.Test.App.csproj
+15 −13 test/Dapr.E2E.Test.App/Program.cs
+21 −0 test/Dapr.E2E.Test.App/Startup.cs
+123 −0 test/Dapr.E2E.Test/Actors/E2ETests.StateTests.cs
+0 −3 test/Dapr.E2E.Test/Dapr.E2E.Test.csproj
+7 −9 test/Dapr.E2E.Test/DaprTestApp.cs
+71 −7 test/Dapr.E2E.Test/Workflows/WorkflowTest.cs
+2 −0 test/Dapr.E2E.Test/configuration/featureconfig.yaml
+0 −3 test/Dapr.Extensions.Configuration.Test/Dapr.Extensions.Configuration.Test.csproj
+2 −0 test/Directory.Build.props
Loading

0 comments on commit 2901877

Please sign in to comment.