Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upmerge 10/17 #4392

Merged
merged 110 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
c490da5
initial freshness, start with overview
hhunter-ms Aug 7, 2024
bbdf25a
continue freshness pass
hhunter-ms Aug 7, 2024
4e7de48
Merge branch 'v1.14' into issue_4141
hhunter-ms Aug 7, 2024
db964dc
continue freshness
hhunter-ms Aug 8, 2024
d41dd57
merge conflicts
hhunter-ms Aug 8, 2024
31830bf
finish freshness pass
hhunter-ms Aug 8, 2024
e42b521
typo
hhunter-ms Aug 8, 2024
d05d081
add note about default app-max-concurrency
hhunter-ms Aug 8, 2024
271ab96
add to args and annotations doc
hhunter-ms Aug 8, 2024
bbfd996
Update config.toml
hhunter-ms Aug 14, 2024
55ed5e2
Merge pull request #4315 from dapr/hhunter-ms-patch-3
hhunter-ms Aug 14, 2024
a4021ec
fix 1.15 link
hhunter-ms Aug 14, 2024
f1cb59f
fix release
hhunter-ms Aug 14, 2024
35925ce
other versions
hhunter-ms Aug 14, 2024
0edadef
Merge pull request #4317 from hhunter-ms/v1.14
hhunter-ms Aug 14, 2024
034f726
Add AWS IAM authentication fields in PostgreSQL components (#4311)
antontroshin Aug 15, 2024
b3c510d
Adds clientCert and clientKey fields to spec Redis metadata fields (#…
elena-kolevska Aug 15, 2024
ecf9637
Fix: Scheduler Actor Reminders Wording (#4320)
cicoyle Aug 15, 2024
3b38ae3
add storageClass example for s3 metadata (#4308)
cicoyle Aug 16, 2024
72869fb
Add Prometheus auto service discovery instructions to
Aug 17, 2024
bcfa462
Add Prometheus auto service discovery instructions to
Aug 17, 2024
65e159d
Merge remote-tracking branch 'origin/prometheus-auto-service-discover…
Aug 17, 2024
efd5d0f
Merge branch 'v1.14' into issue_4141
hhunter-ms Aug 19, 2024
a4f97b3
clarify/correct quickstarts
hhunter-ms Aug 19, 2024
9f1ece0
clarify docs (#4324)
hhunter-ms Aug 19, 2024
76b9019
Merge branch 'v1.14' into issue_4144
msfussell Aug 19, 2024
e3f29b0
Format service discovery instructions
Aug 20, 2024
03b8250
Merge branch 'v1.14' into prometheus-auto-service-discovery
Aug 20, 2024
9809057
Merge pull request #4323 from hhunter-ms/issue_4144
hhunter-ms Aug 20, 2024
5aedc3a
Merge branch 'v1.14' into prometheus-auto-service-discovery
hhunter-ms Aug 20, 2024
28b3b71
add note about implicit retries (#4325)
hhunter-ms Aug 22, 2024
5945b1d
Add Jobs API to Dapr slidedeck
marcduiker Aug 22, 2024
967c17f
Merge pull request #4326 from marcduiker/add-jobs-to-slidedeck
hhunter-ms Aug 23, 2024
431adb6
Merge branch 'v1.14' into prometheus-auto-service-discovery
msfussell Aug 23, 2024
62bd96c
Merge pull request #4321 from maulindesai/prometheus-auto-service-dis…
hhunter-ms Aug 23, 2024
196a3f3
Update daprdocs/content/en/operations/configuration/configuration-ove…
hhunter-ms Aug 23, 2024
892020a
Update daprdocs/content/en/operations/configuration/configuration-ove…
hhunter-ms Aug 23, 2024
dfaf3a8
Update daprdocs/content/en/operations/configuration/configuration-ove…
hhunter-ms Aug 23, 2024
9fb3cbf
Update daprdocs/content/en/operations/configuration/configuration-ove…
hhunter-ms Aug 23, 2024
04fad46
Update daprdocs/content/en/operations/configuration/configuration-ove…
hhunter-ms Aug 23, 2024
aaa7fb7
Merge branch 'v1.14' into issue_4141
hhunter-ms Aug 23, 2024
6b732ba
Merge branch 'v1.14' into issue_4141
hhunter-ms Aug 26, 2024
3816604
last update per mark review
hhunter-ms Aug 26, 2024
c3d5f10
Merge branch 'issue_4141' of https://github.com/hhunter-ms/docs into …
hhunter-ms Aug 26, 2024
da08767
docs: init scheduler in the docker compose example
mikeee Aug 28, 2024
1495304
update per mark, pt 2
hhunter-ms Aug 30, 2024
01dd872
fixed yaml syntax for v2alpha1 example (#4335)
adrianhr91 Sep 2, 2024
108404d
Merge branch 'v1.14' into scheduler-docker-compose
mikeee Sep 3, 2024
35ae635
Merge branch 'v1.14' into issue_4141
hhunter-ms Sep 3, 2024
c0cd271
Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows
dependabot[bot] Sep 3, 2024
7a0bc14
Merge pull request #4338 from dapr/dependabot/github_actions/dot-gith…
hhunter-ms Sep 4, 2024
4680900
Merge branch 'v1.14' into issue_4141
hhunter-ms Sep 4, 2024
730a996
Merge pull request #4300 from hhunter-ms/issue_4141
hhunter-ms Sep 4, 2024
be68ccc
Merge branch 'v1.14' into scheduler-docker-compose
hhunter-ms Sep 4, 2024
27a392e
add notes about namespacing
hhunter-ms Sep 4, 2024
581fabb
update latest version (#4341)
hhunter-ms Sep 5, 2024
0e22a69
Add Kafka escapeHeaders documentation (#4332)
antontroshin Sep 6, 2024
02a9bf7
Update roadmap.md (#4340)
yaron2 Sep 6, 2024
ef0a5b5
conductor update (#4344)
msfussell Sep 7, 2024
ca61d77
fix job api http reference (#4343)
yaron2 Sep 7, 2024
1ca8fd8
update alias (#4347)
msfussell Sep 7, 2024
a391452
Merge branch 'v1.14' into issue_4117
msfussell Sep 7, 2024
24761e5
Merge branch 'v1.14' into scheduler-docker-compose
msfussell Sep 7, 2024
442b720
Updated workflow to reflect deprecation of Workflow methods on client…
WhitWaldo Sep 7, 2024
2a595ee
Merge branch 'v1.14' into scheduler-docker-compose
mikeee Sep 9, 2024
6ee5968
rm escape (#4348)
cicoyle Sep 10, 2024
8d2f64d
clarify per josh comment
hhunter-ms Sep 11, 2024
54730f7
Merge branch 'issue_4117' of https://github.com/hhunter-ms/docs into …
hhunter-ms Sep 11, 2024
c8c99e3
Merge branch 'v1.14' into issue_4117
hhunter-ms Sep 11, 2024
d4f29cb
Merge pull request #4339 from hhunter-ms/issue_4117
hhunter-ms Sep 12, 2024
300e4ad
Merge branch 'v1.14' into scheduler-docker-compose
hhunter-ms Sep 12, 2024
81ff18b
Merge pull request #4331 from dapr/scheduler-docker-compose
hhunter-ms Sep 12, 2024
9a3482c
Fixed cron schedule table
WhitWaldo Sep 13, 2024
69a685a
Tweaked the endpoint description and example to reflect that the prot…
WhitWaldo Sep 13, 2024
f9a40ba
Updated to reflect the need for the protocol on the zipkin endpoint t…
WhitWaldo Sep 13, 2024
ec54d15
Merge pull request #4350 from WhitWaldo/schedule-docs
hhunter-ms Sep 13, 2024
80b811b
Merge branch 'v1.14' into tweak-otel-tracing-endpoint
hhunter-ms Sep 13, 2024
b7dc4a3
Merge pull request #4351 from WhitWaldo/tweak-otel-tracing-endpoint
hhunter-ms Sep 13, 2024
9128eeb
update latest version to 1.14.2 (#4352)
hhunter-ms Sep 13, 2024
634d355
Update Job HTTP request API (#4349)
JoshVanL Sep 14, 2024
90c0906
Helm: Revert Scheduler storage quota size to `1Gi` (#4354)
JoshVanL Sep 16, 2024
770f153
Reflecting valid value of 0-6, not 0-7 in jobs schedule
WhitWaldo Sep 16, 2024
5b0c57d
Merge pull request #4357 from WhitWaldo/tweak-day-of-week-jobs
hhunter-ms Sep 17, 2024
2133954
Clarifiied need for the actorStateStore property in docs, regardless …
WhitWaldo Sep 19, 2024
8686de1
Reworded slightly
WhitWaldo Sep 19, 2024
24f2ff9
Merge branch 'v1.14' into actor-state-clarification
WhitWaldo Sep 19, 2024
18dc1cb
Update workflow-patterns.md
bacek Sep 23, 2024
d4aa75f
Merge branch 'v1.14' into patch-1
hhunter-ms Sep 25, 2024
f390f74
update latest and recalled versions (#4360)
hhunter-ms Sep 26, 2024
4cb0f9c
Merge branch 'v1.14' into actor-state-clarification
yaron2 Oct 2, 2024
dd1fe6a
Update setup-azure-servicebus-topics.md
ariddlestone Oct 2, 2024
f3b1fc4
Merge branch 'v1.14' into patch-1
hhunter-ms Oct 3, 2024
4e52974
Update howto-invoke-non-dapr-endpoints.md (#4369)
inirudebwoy Oct 3, 2024
d53db35
Merge branch 'v1.14' into patch-1
msfussell Oct 3, 2024
5259124
Update daprdocs/content/en/reference/components-reference/supported-p…
msfussell Oct 3, 2024
7e20d6e
Merge pull request #4364 from bacek/patch-1
hhunter-ms Oct 3, 2024
a615470
Merge branch 'v1.14' into fix-azure-service-bus-docs
hhunter-ms Oct 3, 2024
2f23f60
Merge branch 'v1.14' into actor-state-clarification
msfussell Oct 3, 2024
3548a9b
Merge pull request #4368 from ariddlestone/fix-azure-service-bus-docs
hhunter-ms Oct 3, 2024
3d10ea6
Merge branch 'v1.14' into actor-state-clarification
hhunter-ms Oct 3, 2024
09ffa77
Merge pull request #4362 from WhitWaldo/actor-state-clarification
hhunter-ms Oct 3, 2024
ed7aee8
Workflow limitations change (#4367)
yaron2 Oct 3, 2024
3dc932d
rm decoding (#4373)
cicoyle Oct 7, 2024
ae6d065
fix misleading wording (#4379)
yaron2 Oct 10, 2024
e3068a9
[Jobs API] Describe Triggered Job Handling Assumptions (#4376)
cicoyle Oct 10, 2024
0163c0b
add roadmap to main page (#4386)
yaron2 Oct 11, 2024
f98ac60
Update support (#4387)
msfussell Oct 11, 2024
fe17926
Fixed typo (#4389)
msfussell Oct 11, 2024
835a43d
merge conflicts
hhunter-ms Oct 17, 2024
11f0a17
Update daprdocs/config.toml
hhunter-ms Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions daprdocs/content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ you tackle the challenges that come with building microservices and keeps your c
<a href="{{< ref contributing >}}" class="stretched-link"></a>
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-title"><b>Roadmap</b></h5>
<p class="card-text">Learn about Dapr's roadmap and change process.</p>
<a href="{{< ref roadmap.md >}}" class="stretched-link"></a>
</div>
</div>
</div>


Expand Down
26 changes: 19 additions & 7 deletions daprdocs/content/en/concepts/configuration-concept.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ weight: 400
description: "Change the behavior of Dapr application sidecars or globally on Dapr control plane system services"
---

Dapr configurations are settings and policies that enable you to change both the behavior of individual Dapr applications, or the global behavior of the Dapr control plane system services. For example, you can set an ACL policy on the application sidecar configuration which indicates which methods can be called from another application, or on the Dapr control plane configuration you can change the certificate renewal period for all certificates that are deployed to application sidecar instances.
With Dapr configurations, you use settings and policies to change:
- The behavior of individual Dapr applications
- The global behavior of the Dapr control plane system services

Configurations are defined and deployed as a YAML file. An application configuration example is shown below, which demonstrates an example of setting a tracing endpoint for where to send the metrics information, capturing all the sample traces.
For example, set a sampling rate policy on the application sidecar configuration to indicate which methods can be called from another application. If you set a policy on the Dapr control plane configuration, you can change the certificate renewal period for all certificates that are deployed to application sidecar instances.

Configurations are defined and deployed as a YAML file. In the following application configuration example, a tracing endpoint is set for where to send the metrics information, capturing all the sample traces.

```yaml
apiVersion: dapr.io/v1alpha1
Expand All @@ -23,9 +27,11 @@ spec:
endpointAddress: "http://localhost:9411/api/v2/spans"
```

This configuration configures tracing for metrics recording. It can be loaded in local self-hosted mode by editing the default configuration file called `config.yaml` file in your `.dapr` directory, or by applying it to your Kubernetes cluster with kubectl/helm.
The above YAML configures tracing for metrics recording. You can load it in local self-hosted mode by either:
- Editing the default configuration file called `config.yaml` file in your `.dapr` directory, or
- Applying it to your Kubernetes cluster with `kubectl/helm`.

Here is an example of the Dapr control plane configuration called `daprsystem` in the `dapr-system` namespace.
The following example shows the Dapr control plane configuration called `daprsystem` in the `dapr-system` namespace.

```yaml
apiVersion: dapr.io/v1alpha1
Expand All @@ -40,8 +46,14 @@ spec:
allowedClockSkew: "15m"
```

Visit [overview of Dapr configuration options]({{<ref "configuration-overview.md">}}) for a list of the configuration options.
By default, there is a single configuration file called `daprsystem` installed with the Dapr control plane system services. This configuration file applies global control plane settings and is set up when Dapr is deployed to Kubernetes.

[Learn more about configuration options.]({{< ref "configuration-overview.md" >}})

{{% alert title="Note" color="primary" %}}
Dapr application and control plane configurations should not be confused with the configuration building block API that enables applications to retrieve key/value data from configuration store components. Read the [Configuration building block]({{< ref configuration-api-overview >}}) for more information.
{{% alert title="Important" color="warning" %}}
Dapr application and control plane configurations should not be confused with the [configuration building block API]({{< ref configuration-api-overview >}}), which enables applications to retrieve key/value data from configuration store components.
{{% /alert %}}

## Next steps

{{< button text="Learn more about configuration" page="configuration-overview" >}}
2 changes: 1 addition & 1 deletion daprdocs/content/en/concepts/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Deploying and running a Dapr-enabled application into your Kubernetes cluster is

### Clusters of physical or virtual machines

The Dapr control plane services can be deployed in high availability (HA) mode to clusters of physical or virtual machines in production. In the diagram below, the Actor `Placement` and security `Sentry` services are started on three different VMs to provide HA control plane. In order to provide name resolution using DNS for the applications running in the cluster, Dapr uses [Hashicorp Consul service]({{< ref setup-nr-consul >}}), also running in HA mode.
The Dapr control plane services can be deployed in high availability (HA) mode to clusters of physical or virtual machines in production. In the diagram below, the Actor `Placement` and security `Sentry` services are started on three different VMs to provide HA control plane. In order to provide name resolution using DNS for the applications running in the cluster, Dapr uses multicast DNS by default, but can also optionally support [Hashicorp Consul service]({{< ref setup-nr-consul >}}).

<img src="/images/overview-vms-hosting.png" width=1200 alt="Architecture diagram of Dapr control plane and Consul deployed to VMs in high availability mode">

Expand Down
42 changes: 2 additions & 40 deletions daprdocs/content/en/contributing/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,9 @@
type: docs
title: "Dapr Roadmap"
linkTitle: "Roadmap"
description: "The Dapr Roadmap is a tool to help with visibility into investments across the Dapr project"
description: "The Dapr Roadmap gives the community visibility into the different priorities of the projecs"
weight: 30
no_list: true
---


Dapr encourages the community to help with prioritization. A GitHub project board is available to view and provide feedback on proposed issues and track them across development.

[<img src="/images/roadmap.png" alt="Screenshot of the Dapr Roadmap board" width=500 >](https://aka.ms/dapr/roadmap)

{{< button text="View the backlog" link="https://aka.ms/dapr/roadmap" color="primary" >}}
<br />

Please vote by adding a 👍 on the GitHub issues for the feature capabilities you would most like to see Dapr support. This will help the Dapr maintainers understand which features will provide the most value.

Contributions from the community is also welcomed. If there are features on the roadmap that you are interested in contributing to, please comment on the GitHub issue and include your solution proposal.

{{% alert title="Note" color="primary" %}}
The Dapr roadmap includes issues only from the v1.2 release and onwards. Issues closed and released prior to v1.2 are not included.
{{% /alert %}}

## Stages

The Dapr Roadmap progresses through the following stages:

{{< cardpane >}}
{{< card title="**[📄 Backlog](https://github.com/orgs/dapr/projects/52#column-14691591)**" >}}
Issues (features) that need 👍 votes from the community to prioritize. Updated by Dapr maintainers.
{{< /card >}}
{{< card title="**[⏳ Planned (Committed)](https://github.com/orgs/dapr/projects/52#column-14561691)**" >}}
Issues with a proposal and/or targeted release milestone. This is where design proposals are discussed and designed.
{{< /card >}}
{{< card title="**[👩‍💻 In Progress (Development)](https://github.com/orgs/dapr/projects/52#column-14561696)**" >}}
Implementation specifics have been agreed upon and the feature is under active development.
{{< /card >}}
{{< /cardpane >}}
{{< cardpane >}}
{{< card title="**[☑ Done](https://github.com/orgs/dapr/projects/52#column-14561700)**" >}}
The feature capability has been completed and is scheduled for an upcoming release.
{{< /card >}}
{{< card title="**[✅ Released](https://github.com/orgs/dapr/projects/52#column-14659973)**" >}}
The feature is released and available for use.
{{< /card >}}
{{< /cardpane >}}
See [this document](https://github.com/dapr/community/blob/master/roadmap.md) to view the Dapr project's roadmap.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The Dapr actor runtime provides a simple turn-based access model for accessing a

### State

Transactional state stores can be used to store actor state. To specify which state store to use for actors, specify value of property `actorStateStore` as `true` in the state store component's metadata section. Actors state is stored with a specific scheme in transactional state stores, allowing for consistent querying. Only a single state store component can be used as the state store for all actors. Read the [state API reference]({{< ref state_api.md >}}) and the [actors API reference]({{< ref actors_api.md >}}) to learn more about state stores for actors.
Transactional state stores can be used to store actor state. Regardless of whether you intend to store any state in your actor, you must specify a value for property `actorStateStore` as `true` in the state store component's metadata section. Actors state is stored with a specific scheme in transactional state stores, allowing for consistent querying. Only a single state store component can be used as the state store for all actors. Read the [state API reference]({{< ref state_api.md >}}) and the [actors API reference]({{< ref actors_api.md >}}) to learn more about state stores for actors.

### Actor timers and reminders

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,75 @@ In this example, at trigger time, which is `@every 1s` according to the `Schedul

At the trigger time, the `prodDBBackupHandler` function is called, executing the desired business logic for this job at trigger time. For example:

#### HTTP

When you create a job using Dapr's Jobs API, Dapr will automatically assume there is an endpoint available at
`/job/<job-name>`. For instance, if you schedule a job named `test`, Dapr expects your application to listen for job
events at `/job/test`. Ensure your application has a handler set up for this endpoint to process the job when it is
triggered. For example:

*Note: The following example is in Go but applies to any programming language.*

```go

func main() {
...
http.HandleFunc("/job/", handleJob)
http.HandleFunc("/job/<job-name>", specificJob)
...
}

func specificJob(w http.ResponseWriter, r *http.Request) {
// Handle specific triggered job
}

func handleJob(w http.ResponseWriter, r *http.Request) {
// Handle the triggered jobs
}
```

#### gRPC

When a job reaches its scheduled trigger time, the triggered job is sent back to the application via the following
callback function:

*Note: The following example is in Go but applies to any programming language with gRPC support.*

```go
import rtv1 "github.com/dapr/dapr/pkg/proto/runtime/v1"
...
func (s *JobService) OnJobEventAlpha1(ctx context.Context, in *rtv1.JobEventRequest) (*rtv1.JobEventResponse, error) {
// Handle the triggered job
}
```

This function processes the triggered jobs within the context of your gRPC server. When you set up the server, ensure that
you register the callback server, which will invoke this function when a job is triggered:

```go
...
js := &JobService{}
rtv1.RegisterAppCallbackAlphaServer(server, js)
```

In this setup, you have full control over how triggered jobs are received and processed, as they are routed directly
through this gRPC method.

#### SDKs

For SDK users, handling triggered jobs is simpler. When a job is triggered, Dapr will automatically route the job to the
event handler you set up during the server initialization. For example, in Go, you'd register the event handler like this:

```go
...
if err = server.AddJobEventHandler("prod-db-backup", prodDBBackupHandler); err != nil {
log.Fatalf("failed to register job event handler: %v", err)
}
```

Dapr takes care of the underlying routing. When the job is triggered, your `prodDBBackupHandler` function is called with
the triggered job data. Here’s an example of handling the triggered job:

```go
// ...

Expand All @@ -103,11 +172,9 @@ func prodDBBackupHandler(ctx context.Context, job *common.JobEvent) error {
if err := json.Unmarshal(job.Data, &jobData); err != nil {
// ...
}
decodedPayload, err := base64.StdEncoding.DecodeString(jobData.Value)
// ...

var jobPayload api.DBBackup
if err := json.Unmarshal(decodedPayload, &jobPayload); err != nil {
if err := json.Unmarshal(job.Data, &jobPayload); err != nil {
// ...
}
fmt.Printf("job %d received:\n type: %v \n typeurl: %v\n value: %v\n extracted payload: %v\n", jobCount, job.JobType, jobData.TypeURL, jobData.Value, jobPayload)
Expand Down Expand Up @@ -146,4 +213,4 @@ dapr run --app-id=distributed-scheduler \
## Next steps

- [Learn more about the Scheduler control plane service]({{< ref "concepts/dapr-services/scheduler.md" >}})
- [Jobs API reference]({{< ref jobs_api.md >}})
- [Jobs API reference]({{< ref jobs_api.md >}})
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ The diagram below is an overview of how Dapr's service invocation works when inv
<img src="/images/service-invocation-overview-non-dapr-endpoint.png" width=800 alt="Diagram showing the steps of service invocation to non-Dapr endpoints">

1. Service A makes an HTTP call targeting Service B, a non-Dapr endpoint. The call goes to the local Dapr sidecar.
2. Dapr discovers Service B's location using the `HTTPEndpoint` or FQDN URL.
3. Dapr forwards the message to Service B.
4. Service B runs its business logic code.
5. Service B sends a response to Service A's Dapr sidecar.
6. Service A receives the response.
2. Dapr discovers Service B's location using the `HTTPEndpoint` or FQDN URL then forwards the message to Service B.
3. Service B sends a response to Service A's Dapr sidecar.
4. Service A receives the response.

## Using an HTTPEndpoint resource or FQDN URL for non-Dapr endpoints
There are two ways to invoke a non-Dapr endpoint when communicating either to Dapr applications or non-Dapr applications. A Dapr application can invoke a non-Dapr endpoint by providing one of the following:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,25 @@ Want to skip the quickstarts? Not a problem. You can try out the workflow buildi

## Limitations

- **State stores:** As of the 1.12.0 beta release of Dapr Workflow, using the NoSQL databases as a state store results in limitations around storing internal states. For example, CosmosDB has a maximum single operation item limit of only 100 states in a single request.
- **Horizontal scaling:** As of the 1.12.0 beta release of Dapr Workflow, if you scale out Dapr sidecars or your application pods to more than 2, then the concurrency of the workflow execution drops. It is recommended to test with 1 or 2 instances, and no more than 2.
- **State stores:** Due to underlying limitations in some database choices, more commonly NoSQL databases, you might run into limitations around storing internal states. For example, CosmosDB has a maximum single operation item limit of only 100 states in a single request.
- **Horizontal scaling:** As of the 1.12.0 beta release of Dapr Workflow, it is recommended to use a maximum of two instances of Dapr per workflow application. This limitation is resolved in Dapr 1.14.x when enabling the scheduler service.

To enable the scheduler service to work for Dapr Workflows, make sure you're using Dapr 1.14.x or later and assign the following configuration to your app:

```yaml
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: schedulerconfig
spec:
tracing:
samplingRate: "1"
features:
- name: SchedulerReminders
enabled: true
```

See more info about [enabling preview features]({{<ref preview-features>}}).

## Watch the demo

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ def status_monitor_workflow(ctx: wf.DaprWorkflowContext, job: JobStatus):
ctx.call_activity(send_alert, input=f"Job '{job.job_id}' is unhealthy!")
next_sleep_interval = 5 # check more frequently when unhealthy

yield ctx.create_timer(fire_at=ctx.current_utc_datetime + timedelta(seconds=next_sleep_interval))
yield ctx.create_timer(fire_at=ctx.current_utc_datetime + timedelta(minutes=next_sleep_interval))

# restart from the beginning with a new JobStatus input
ctx.continue_as_new(job)
Expand Down Expand Up @@ -896,7 +896,7 @@ func StatusMonitorWorkflow(ctx *workflow.WorkflowContext) (any, error) {
}
if status == "healthy" {
job.IsHealthy = true
sleepInterval = time.Second * 60
sleepInterval = time.Minutes * 60
} else {
if job.IsHealthy {
job.IsHealthy = false
Expand All @@ -905,7 +905,7 @@ func StatusMonitorWorkflow(ctx *workflow.WorkflowContext) (any, error) {
return "", err
}
}
sleepInterval = time.Second * 5
sleepInterval = time.Minutes * 5
}
if err := ctx.CreateTimer(sleepInterval).Await(nil); err != nil {
return "", err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,4 @@ By studying past resource behavior, recommend application resource optimization

The application graph facilitates collaboration between dev and ops by providing a dynamic overview of your services and infrastructure components.

Try out [Conductor Free](https://www.diagrid.io/pricing), ideal for individual developers building and testing Dapr applications on Kubernetes.

{{< button text="Learn more about Diagrid Conductor" link="https://www.diagrid.io/conductor" >}}
Original file line number Diff line number Diff line change
Expand Up @@ -273,23 +273,20 @@ func deleteJob(ctx context.Context, in *common.InvocationEvent) (out *common.Con

// Handler that handles job events
func handleJob(ctx context.Context, job *common.JobEvent) error {
var jobData common.Job
if err := json.Unmarshal(job.Data, &jobData); err != nil {
return fmt.Errorf("failed to unmarshal job: %v", err)
}
decodedPayload, err := base64.StdEncoding.DecodeString(jobData.Value)
if err != nil {
return fmt.Errorf("failed to decode job payload: %v", err)
}
var jobPayload JobData
if err := json.Unmarshal(decodedPayload, &jobPayload); err != nil {
return fmt.Errorf("failed to unmarshal payload: %v", err)
}
var jobData common.Job
if err := json.Unmarshal(job.Data, &jobData); err != nil {
return fmt.Errorf("failed to unmarshal job: %v", err)
}

fmt.Println("Starting droid:", jobPayload.Droid)
fmt.Println("Executing maintenance job:", jobPayload.Task)
var jobPayload JobData
if err := json.Unmarshal(job.Data, &jobPayload); err != nil {
return fmt.Errorf("failed to unmarshal payload: %v", err)
}

return nil
fmt.Println("Starting droid:", jobPayload.Droid)
fmt.Println("Executing maintenance job:", jobPayload.Task)

return nil
}
```

Expand Down
Loading
Loading