This is the multi-page printable view of this section. Click here to print.
Contributing to Dapr
- 1: Contribution overview
- 2: Giving a presentation on Dapr
- 3: Dapr Roadmap
- 4: Contributing with GitHub Codespaces
- 5: Dapr bot reference
- 6: Docs contributing guide
- 6.1: Contributors guide
- 6.2: Maintainer guide
- 6.3: Suggested Dapr docs templates
- 6.3.1: Conceptual article template
- 6.3.2: Quickstart guide template
- 6.3.3: How-to guide template
- 7: SDK contributing guide
1 - Contribution overview
Thank you for your interest in Dapr! This document provides the guidelines for how to contribute to the Dapr project through issues and pull requests. Contributions can also come in additional ways such as engaging with the community in community calls, commenting on issues or pull requests, and more.
See the Dapr community repository for more information on community engagement and community membership.
Dapr Repository Index
Below is a list of repositories under the Dapr organization where you can contribute:
-
Docs: This repository contains the documentation for Dapr. You can contribute by updating existing documentation, fixing errors, or adding new content to improve user experience and clarity. Please see the specific guidelines for docs contributions.
-
Quickstarts: The Quickstarts repository provides simple, step-by-step guides to help users get started with Dapr quickly. Contributions in this repository involve creating new quickstarts, improving existing ones, or ensuring they stay up-to-date with the latest features.
-
Runtime: The Dapr runtime repository houses the core runtime components. Here, you can contribute by fixing bugs, optimizing performance, implementing new features, or enhancing existing ones.
-
Components-contrib: This repository hosts a collection of community-contributed components for Dapr. You can contribute by adding new components, improving existing ones, or reviewing and testing contributions from the community.
-
SDKs: Dapr SDKs provide libraries for various programming languages to interact with Dapr. You can contribute by improving SDK functionalities, fixing bugs, or adding support for new features. Please see the contribution guidelines for specific SDKs.
-
CLI: Dapr cli sets up Dapr on a local dev machine or a Kubernetes cluster for launching and managing Dapr instances. Contributions to the CLI repository include adding new features, fixing bugs, improving usability, and ensuring compatibility with the latest Dapr releases. Please see the Development Guide for help in getting started with developing the Dapr cli.
Issues
Issue types
In most Dapr repositories there are usually 4 types of issues:
- Issue/Bug: You’ve found a bug with the code, and want to report it, or create an issue to track the bug.
- Issue/Discussion: You have something on your mind, which requires input form others in a discussion, before it eventually manifests as a proposal.
- Issue/Proposal: Used for items that propose a new idea or functionality. This allows feedback from others before code is written.
- Issue/Question: Use this issue type, if you need help or have a question.
Before submitting
Before you submit an issue, make sure you’ve checked the following:
- Is it the right repository?
- The Dapr project is distributed across multiple repositories. Check the list of repositories if you aren’t sure which repo is the correct one.
- Check for existing issues
- Before you create a new issue, please do a search in open issues to see if the issue or feature request has already been filed.
- If you find your issue already exists, make relevant comments and add your reaction. Use a reaction:
- đ up-vote
- đ down-vote
- For bugs
- Check it’s not an environment issue. For example, if running on Kubernetes, make sure prerequisites are in place. (state stores, bindings, etc.)
- You have as much data as possible. This usually comes in the form of logs and/or stacktrace. If running on Kubernetes or other environment, look at the logs of the Dapr services (runtime, operator, placement service). More details on how to get logs can be found here.
- For proposals
- Many changes to the Dapr runtime may require changes to the API. In that case, the best place to discuss the potential feature is the main Dapr repo.
- Other examples could include bindings, state stores or entirely new components.
Pull Requests
All contributions come through pull requests. To submit a proposed change, follow this workflow:
- Make sure there’s an issue (bug or proposal) raised, which sets the expectations for the contribution you are about to make.
- Fork the relevant repo and create a new branch
- Some Dapr repos support Codespaces to provide an instant environment for you to build and test your changes.
- See the Developing Dapr docs for more information about setting up a Dapr development environment.
- Create your change
- Code changes require tests
- Update relevant documentation for the change
- Commit with DCO sign-off and open a PR
- Wait for the CI process to finish and make sure all checks are green
- A maintainer of the project will be assigned, and you can expect a review within a few days
Use work-in-progress PRs for early feedback
A good way to communicate before investing too much time is to create a “Work-in-progress” PR and share it with your reviewers. The standard way of doing this is to add a “[WIP]” prefix in your PR’s title and assign the do-not-merge label. This will let people looking at your PR know that it is not well baked yet.
Use of Third-party code
- Third-party code must include licenses.
Developer Certificate of Origin: Signing your work
Every commit needs to be signed
The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO, reformatted for readability:
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
Contributors sign-off that they adhere to these requirements by adding a Signed-off-by
line to commit messages.
This is my commit message
Signed-off-by: Random J Developer <random@developer.example.org>
Git even has a -s
command line option to append this automatically to your commit message:
$ git commit -s -m 'This is my commit message'
Each Pull Request is checked whether or not commits in a Pull Request do contain a valid Signed-off-by line.
I didn’t sign my commit, now what?!
No worries - You can easily replay your changes, sign them and force push them!
git checkout <branch-name>
git commit --amend --no-edit --signoff
git push --force-with-lease <remote-name> <branch-name>
Code of Conduct
Please see the Dapr community code of conduct.
2 - Giving a presentation on Dapr
We encourage community members to give presentations on Dapr. To get you started quickly, we offer two PowerPoint files:
- dapr-slidedeck.pptx, this is a 150+ page slide deck and contains; an overview of Dapr, all of its building block APIs, cross-cutting concerns, hosting options, and assets to create your own architecture diagrams.
- dapr-workflow.pptx, this is a dedicated slide deck about Dapr workflow and contains; durable execution concept, workflow authoring, workflow patterns, workflow management, and challenges & tips.
There is a downloadable zip file contains both slide decks.
Download the Dapr Presentation DecksIf you’re using the PowerPoint template with MacOS, please install the Space Grotesk font to ensure the text is rendered properly:
brew install --cask font-space-grotesk
Giving a Dapr presentation
- Begin by downloading the Dapr Presentation Decks. These contain slides, diagrams, and graphical assets needed to give a Dapr presentation.
- Next, review the docs to make sure you understand the concepts.
- Use the Dapr quickstarts repo to show demos of how to use Dapr.
- Once you’ve done a Dapr presentation, claim the Dapr Presenter badge by adding your presentation to this table in the Dapr Community repository.
Dapr presentations from the community
If you need some inspiration, watch these Dapr presentations by the community via this Dapr YouTube playlist:
Additional resources
There are other Dapr resources on the community repo.
3 - Dapr Roadmap
See this document to view the Dapr project’s roadmap.
4 - Contributing with GitHub Codespaces
GitHub Codespaces is the easiest way to get up and running for contributing to a Dapr repo. In as little as a single click, you can have an environment with all of the prerequisites ready to go in your browser.
Features
- Click and Run: Get a dedicated and sandboxed environment with all of the required frameworks and packages ready to go.
- Usage-based Billing: Only pay for the time you spend developing in the Codespaces. Environments are spun down automatically when not in use.
- Portable: Run in your browser or in Visual Studio Code, or connect to it using SSH.
Open a Dapr repo in a Codespace
To open a Dapr repository in a Codespace, select “Code” from the repo homepage and “Open with Codespaces”:

If you haven’t already forked the repo, creating the Codespace will also create a fork for you and use it inside the Codespace.
Supported repos
Developing Dapr Components in a Codespace
Developing a new Dapr component requires working with both the dapr/components-contrib and dapr/dapr repos. It is recommended to place both folders inside the /workspaces
directory, side-by-side.
If you created a Codespace from dapr/dapr
If your Codespaces was started from the dapr/dapr
repo or a fork of that, you will need to clone the dapr/components-contrib
repository (or your fork of that) inside /workspaces/components-contrib
.
First, make sure you’ve authenticated with the GitHub CLI:
# Run this command and follow the prompts
# Most users should accept the default choices
gh auth login
Clone the repo:
# If you want to use your fork of dapr/components-contrib, replace this with your fork (e.g. "yourusername/components-contrib")
# Make sure you've forked the repo before doing this
REPO=dapr/components-contrib
cd /workspaces
gh repo clone "$REPO" /workspaces/components-contrib
Then, add the folder to current workspace:
code -a /workspaces/components-contrib
If you created a Codespace from dapr/components-contrib
If your Codespaces was started from the dapr/components-contrib
repo or a fork of that, you will need to clone the dapr/dapr
repository (or your fork of that) inside /workspaces/dapr
.
First, make sure you’ve authenticated with the GitHub CLI:
# Run this command and follow the prompts
# Most users should accept the default choices
gh auth login
Clone the repo:
# If you want to use your fork of dapr/dapr, replace this with your fork (e.g. "yourusername/dapr")
# Make sure you've forked the repo before doing this
REPO=dapr/dapr
cd /workspaces
gh repo clone "$REPO" /workspaces/dapr
Then, add the folder to current workspace:
code -a /workspaces/dapr
Related links
5 - Dapr bot reference
Dapr bot is triggered by a list of commands that helps with common tasks in the Dapr organization. It is set up individually for each repository (example) and can be configured to run on specific events. Below is a list of commands and the list of repositories they are implemented on.
Command reference
Command | Target | Description | Who can use | Repository |
---|---|---|---|---|
/assign |
Issue | Assigns an issue to a user or group of users | Anyone | dapr , docs , quickstarts , cli , components-contrib , go-sdk , js-sdk , java-sdk , python-sdk , dotnet-sdk , rust-sdk |
/ok-to-test |
Pull request | dapr : trigger end to end tests components-contrib : trigger conformance and certification tests |
Users listed in the bot | dapr , components-contrib |
/ok-to-perf |
Pull request | Trigger performance tests. | Users listed in the bot | dapr |
/make-me-laugh |
Issue or pull request | Posts a random joke | Users listed in the bot | dapr , components-contrib |
Label reference
You can query issues created by the Dapr bot by using the created-by/dapr-bot
label (query).
Label | Target | What does it do? | Repository |
---|---|---|---|
docs-needed |
Issue | Creates a new issue in dapr/docs to track doc work |
dapr |
sdk-needed |
Issue | Creates new issues across the SDK repos to track SDK work | dapr |
documentation required |
Issue or pull request | Creates a new issue in dapr/docs to track doc work |
components-contrib |
new component |
Issue or pull request | Creates a new issue in dapr/dapr to register the new component |
components-contrib |
6 - Docs contributing guide
6.1 - Contributors guide
In this guide, you’ll learn how to contribute to the Dapr docs repository. Since Dapr docs are published to docs.dapr.io, you must make sure your contributions compile and publish correctly.
Prerequisites
Before contributing to the Dapr docs:
- Review the guidance around general Dapr project contributions.
- Install and set up your local environment with Hugo with the Docsy theme. Follow the instructions in the repository README.md.
- Fork and clone the docs repository.
Branch guidance
The Dapr docs handles branching differently than most code repositories. Instead of a main
branch, every branch is labeled to match the major and minor version of a runtime release. For the full list visit the Docs repo
Generally, all of your docs updates should point to docs branch for the latest release of Dapr. The latest release is the default branch [https://github.com/dapr/docs]. For example, if you are fixing a typo, adding notes, or clarifying a point, make your changes into the default Dapr branch.
For any docs changes applicable to a release candidate or a pre-release version of the docs, point your changes into that particular branch. For example, if you are documenting an upcoming change to a component or the runtime, make your changes to the pre-release branch.
Style and tone
Style and tone conventions should be followed throughout all Dapr documentation for consistency across all docs:
Style/Tone | Guidance |
---|---|
Casing | Use upper case only:
|
Headers and titles | Headers and titles must be brief, but descriptive and clear. |
Use simple sentences | Write easy-to-read, scannable sentences. Tip: Skip the formal tone and write as if you were talking directly to the reader. |
Avoid the first person | Instead of first person “I”, “we”, and “our”, use second person “you” and “your”. |
Assume a “new developer” audience | Some seemingly obvious steps to an experienced developer might not be as obvious to a new developer. Give the reader more explicit, thorough instructions. |
Use present tense | Avoid sentences like “this command will install Redis”. Instead, use “This command installs Redis”. |
Diagrams and images
Diagrams and images are invaluable visual aids for documentation pages. Use the diagram style and icons in the Dapr Diagrams template deck.
The process for creating diagrams for your documentation:
- Download the Dapr Diagrams template deck to use the icons and colors.
- Add a new slide and create your diagram.
- Screen capture the diagram as high-res PNG file and save in the images folder.
- Name your PNG files using the convention of a concept or building block so that they are grouped.
- For example:
service-invocation-overview.png
. - For more information on calling out images using shortcode, see the Images guidance section below.
- Add the diagram to the appropriate section in your documentation using the HTML
<image>
tag. - In your PR, comment the diagram slide (not the screen capture) so it can be reviewed and added to the diagram deck by maintainers.
Contributing a new docs page
If you’re creating a new article, make sure you:
- Place the new document in the correct place in the hierarchy.
- Avoid creating new sections. Most likely, the proper place is already in the docs hierarchy.
- Include complete Hugo front-matter.
Select the topic type below to view a suggested template to help you get started.
Topic type | What is it? |
---|---|
Concept | Answers the question, “What problems does this help me solve?” Avoid repeating the API or component spec; provide more details. |
Quickstart | Provides a “Five minutes to wow” experience. Walk the reader quickly through a feature or API and how it works in a controlled example. |
How-to | Provides a detailed, practical step-by-step through a Dapr feature or technology. Encourage the reader to try with their own scenario, rather than the controlled scenario provided in a quickstart. |
Requirements for docs.dapr.io
Make sure your contribution doesn’t break the website build. The way Hugo builds the website requires following the guidance below:
Files and folder names
File and folder names should be globally unique.
- \service-invocation
- service-invocation-overview.md
Front-matter
Front-matter is what takes regular markdown files and upgrades them into Hugo compatible docs for rendering into the nav bars and ToCs.
Every page needs a section at the top of the document like this:
---
type: docs
title: "TITLE FOR THE PAGE"
linkTitle: "SHORT TITLE FOR THE NAV BAR"
weight: (number)
description: "1+ SENTENCES DESCRIBING THE ARTICLE"
---
Example
---
type: docs
title: "Service invocation overview"
linkTitle: "Overview"
weight: 10
description: "A quick overview of Dapr service invocation and how to use it to invoke services within your application"
---
Weight determines the order of the pages in the left sidebar, with 0 being the top-most.
Front-matter should be completed with all fields including type, title, linkTitle, weight, and description.
title
should be 1 sentence, no period at the endlinkTitle
should be 1-3 words, with the exception of How-to at the front.description
should be 1-2 sentences on what the reader will learn, accomplish, or do in this doc.
As per the styling conventions, titles should only capitalize the first word and proper nouns, with the exception of “How-To:”
- “Getting started with Dapr service invocation”
- “How-To: Setup a local Redis instance”
Referencing other pages
Hugo ref
and relref
shortcodes are used to reference other pages and sections. These shortcodes also allow the build to break if a page is incorrectly renamed or removed.
For example, this shortcode, written inline with the rest of the markdown page, will link to the _index.md of the section/folder name:
{{% ref "folder" %}}
While this shortcode will link to a specific page:
{{% ref "page" %}}
All pages and folders need to have globally unique names in order for the ref shortcode to work properly. If there are duplicate names, the build will break and an error will be thrown.
Referencing sections in other pages
To reference a specific section in another page, add #section-short-name
to the end of your reference.
As a general rule, the section short name is the text of the section title, all lowercase, with spaces changed to “-”. You can check the section short name by:
- Visiting the website page.
- Clicking the link icon (đ) next to the section.
- Seeing how the URL renders in the nav bar.
- Copying the content after the “#” for your section shortname.
As an example, for this specific section, the complete reference to the page and section would be:
{{% ref "contributing-docs#referencing-sections-in-other-pages" %}}
Shortcodes
The following are useful shortcodes for writing Dapr documentation
Images
The markdown spec used by Docsy and Hugo does not give an option to resize images using markdown notation. Instead, raw HTML is used.
Begin by placing images under /daprdocs/static/images
with the naming convention of [page-name]-[image-name].[png|jpg|svg]
.
Then link to the image using:
<img src="/images/[image-filename]" width=1000 alt="Description of image">
Don’t forget to set the alt
attribute to keep the docs readable and accessible.
Example
This HTML will display the dapr-overview.png
image on the overview.md
page:
<img src="/images/overview-dapr-overview.png" width=1000 alt="Overview diagram of Dapr and its building blocks">
Tabbed content
Tabs are made possible through Hugo shortcodes.
The overall format is:
[Content for Tab1]
[Content for Tab2]
All content you author will be rendered to markdown, so you can include images, code blocks, YouTube videos, and more.
Example
powershell -Command "iwr -useb https://raw.githubusercontent.com/dapr/cli/master/install/install.ps1 | iex"
wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash
brew install dapr/tap/dapr-cli
This example will render to this:
powershell -Command "iwr -useb https://raw.githubusercontent.com/dapr/cli/master/install/install.ps1 | iex"
wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash
brew install dapr/tap/dapr-cli
YouTube videos
Hugo can automatically embed YouTube videos using a shortcode:
{{% youtube [VIDEO ID] %}}
Example
Given the video https://youtu.be/dQw4w9WgXcQ
The shortcode would be:
{{% youtube dQw4w9WgXcQ %}}
Buttons
To create a button in a webpage, use the button
shortcode.
An optional “newtab” parameter will indicate if the page should open in a new tab. Options are “true” or “false”. Default is “false”, where the page will open in the same tab.
Link to an external page
{{% button text="My Button" link="https://example.com" %}}
My Button
Link to another docs page
You can also reference pages in your button as well:
{{% button text="My Button" page="contributing" newtab="true" %}}
My Button
Button colors
You can customize the colors using the Bootstrap colors:
{{% button text="My Button" link="https://example.com" color="primary" %}}
{{% button text="My Button" link="https://example.com" color="secondary" %}}
{{% button text="My Button" link="https://example.com" color="success" %}}
{{% button text="My Button" link="https://example.com" color="danger" %}}
{{% button text="My Button" link="https://example.com" color="warning" %}}
{{% button text="My Button" link="https://example.com" color="info" %}}
References
Translations
The Dapr Docs supports adding language translations into the docs using git submodules and Hugo’s built in language support.
You can find an example PR of adding Chinese language support in PR 1286.
Steps to add a language:
-
Open an issue in the Docs repo requesting to create a new language-specific docs repo
-
Once created, create a git submodule within the docs repo:
git submodule add <remote_url> translations/<language_code>
-
Add a language entry within
daprdocs/config.toml
:[languages.<language_code>] title = "Dapr Docs" weight = 3 contentDir = "content/<language_code>" languageName = "<language_name>"
-
Create a mount within
daprdocs/config.toml
:[[module.mounts]] source = "../translations/docs-<language_code>/content/<language_code>" target = "content" lang = "<language_code>"
-
Repeat above step as necessary for all other translation directories.
Next steps
Get started by copying and working from one of the Dapr doc templates.
6.2 - Maintainer guide
In this guide, youâll learn how to perform routine Dapr docs maintainer and approver responsibilities. In order to successfully accomplish these tasks, you need either approver or maintainer status in the dapr/docs
repo.
To learn how to contribute to Dapr docs, review the Contributor guide.
Branch guidance
The Dapr docs handles branching differently than most code repositories. Instead of a main
branch, every branch is labeled to match the major and minor version of a runtime release.
For the full list, visit the Docs repo.
Read the contributor’s guide for more information about release branches.
Upmerge from current release branch to the pre-release branch
As a docs approver or maintainer, you need to perform routine upmerges to keep the pre-release branch aligned with updates to the current release branch. It is recommended to upmerge the current branch into the pre-release branch on a weekly basis.
For the following steps, treat v1.0
as the current release and v1.1
as the upcoming release.
-
Open Visual Studio Code to the Dapr docs repo.
-
From your local repo, switch to the latest branch (
v1.0
) and synchronize changes:git pull upstream v1.0 git push origin v1.0
-
Switch to the upcoming branch (
v1.1
) and synchronize changes:git pull upstream v1.1 git push origin v1.1
-
Create a new branch based off of the upcoming release:
git checkout -b upmerge_MM-DD
-
Open a terminal and stage a merge from the latest release into the upmerge branch:
git merge --no-ff --no-commit v1.0
-
In the terminal, make sure included files look accurate. Inspect any merge conflicts in VS Code. Remove configuration changes or version information that does not need to be merged.
-
Commit the staged changes and push to the upmerge branch (
upmerge_MM-DD
). -
Open a PR from the upmerge branch to the upcoming release branch (
v1.1
). -
Review the PR and double check that no unintended changes were pushed to the upmerge branch.
Release process
Dapr docs must align with features and updates included in the Dapr project release. Leading up to the Dapr release date, make sure:
- All new features or updates have been sufficiently documented and reviewed.
- Docs PRs for the upcoming release point to the release branch.
For the following steps, treat v1.0
as the latest release and v1.1
as the upcoming release.
The release process for docs requires the following:
- An upmerge of the latest release into the upcoming release branch
- An update to the latest and upcoming release Hugo configuration files
- A new Azure Static Web App for the next version
- A new DNS entry for the next version’s website
- A new git branch for the next version
Upmerge
First, perform a docs upmerge from the latest release to the upcoming release branch.
Update Hugo Configuration
After upmerge, prepare the docs branches for the release. In two separate PRs, you need to:
- Archive the latest release.
- Bring the preview/release branch as the current, live version of the docs.
- Create a new preview branch.
Latest release
These steps will prepare the latest release branch for archival.
-
Open VS Code to the Dapr docs repo.
-
Switch to the latest branch (
v1.0
) and synchronize changes:git pull upstream v1.0 git push origin v1.0
-
Create a new branch based off of the latest release:
git checkout -b release_v1.0
-
In VS Code, navigate to
/daprdocs/config.toml
. -
Add the following TOML to the
# Versioning
section (around line 154):version_menu = "v1.0" version = "v1.0" archived_version = true url_latest_version = "https://docs.dapr.io" [[params.versions]] version = "v1.2 (preview)" url = "v1-2.docs.dapr.io" [[params.versions]] version = "v1.1 (latest)" url = "#" [[params.versions]] version = "v1.0" url = "https://v1-0.docs.dapr.io"
-
Delete
.github/workflows/website-root.yml
. -
Commit the staged changes and push to your branch (
release_v1.0
). -
Open a PR from
release_v1.0
tov1.0
. -
Have a docs maintainer or approver review. Wait to merge the PR until release.
Upcoming release
These steps will prepare the upcoming release branch for promotion to latest release.
-
Open VS Code to the Dapr docs repo.
-
Switch to the upcoming release branch (
v1.1
) and synchronize changes:git pull upstream v1.1 git push origin v1.1
-
Create a new branch based off of the upcoming release:
git checkout -b release_v1.1
-
In VS Code, navigate to
/daprdocs/config.toml
. -
Update line 1 to
baseURL - https://docs.dapr.io/
. -
Update the
# Versioning
section (around line 154) to display the correct versions and tags:# Versioning version_menu = "v1.1 (latest)" version = "v1.1" archived_version = false url_latest_version = "https://docs.dapr.io" [[params.versions]] version = "v1.2 (preview)" url = "v1-2.docs.dapr.io" [[params.versions]] version = "v1.1 (latest)" url = "#" [[params.versions]] version = "v1.0" url = "https://v1-0.docs.dapr.io"
-
Navigate to
.github/workflows/website-root.yml
. -
Update the branches which trigger the workflow:
name: Azure Static Web App Root on: push: branches: - v1.1 pull_request: types: [opened, synchronize, reopened, closed] branches: - v1.1
-
Navigate to
/README.md
. -
Update the versions table:
| Branch | Website | Description |
| ------------------------------------------------------------ | -------------------------- | ------------------------------------------------------------------------------------------------ |
| [v1.1](https://github.com/dapr/docs) (primary) | https://docs.dapr.io | Latest Dapr release documentation. Typo fixes, clarifications, and most documentation goes here. |
| [v1.2](https://github.com/dapr/docs/tree/v1.2) (pre-release) | https://v1-2.docs.dapr.io/ | Pre-release documentation. Doc updates that are only applicable to v1.2+ go here. |
- Update the
dapr-latest-version.html
shortcode partial to the new minor/patch version (in this example,1.1.0
and1.1
). - Commit the staged changes and push to your branch (
release_v1.1
). - Open a PR from
release/v1.1
tov1.1
. - Have a docs maintainer or approver review. Wait to merge the PR until release.
Future preview branch
Create preview branch
- In GitHub UI, select the branch drop-down menu and select View all branches.
- Click New branch.
- In New branch name, enter the preview branch version number. In this example, it would be
v1.2
. - Select v1.1 as the source.
- Click Create new branch.
Configure preview branch
-
In a terminal window, navigate to the
docs
repo. -
Switch to the upcoming release branch (
v1.1
) and synchronize changes:git pull upstream v1.1 git push origin v1.1
-
Create a new branch based on
v1.1
and name itv1.2
:
git checkout -b release_v1.1
-
Rename
.github/workflows/website-v1-1.yml
to.github/workflows/website-v1-2.yml
. -
Open
.github/workflows/website-v1-2.yml
in VS Code and update the name, trigger, and deployment target to 1.2:name: Azure Static Web App v1.2 on: push: branches: - v1.2 pull_request: types: [opened, synchronize, reopened, closed] branches: - v1.2 ... with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_V1_2 }} repo_token: ${{ secrets.GITHUB_TOKEN }} ... with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_V1_2 }} skip_deploy_on_missing_secrets: true
-
Navigate to
daprdocs/config.toml
and update thebaseURL
to point to the new preview website:baseURL = "https://v1-2.docs.dapr.io"
-
Update the
# GitHub Information
and# Versioning
sections (around line 148) to display the correct versions and tags:# GitHub Information github_repo = "https://github.com/dapr/docs" github_project_repo = "https://github.com/dapr/dapr" github_subdir = "daprdocs" github_branch = "v1.2" # Versioning version_menu = "v1.2 (preview)" version = "v1.2" archived_version = false url_latest_version = "https://docs.dapr.io" [[params.versions]] version = "v1.2 (preview)" url = "#" [[params.versions]] version = "v1.1 (latest)" url = "https://docs.dapr.io" [[params.versions]] version = "v1.0" url = "https://v1-0.docs.dapr.io"
-
Commit the staged changes and push to a new PR against the v1.2 branch.
-
Hold on merging the PR until after release and the other
v1.0
andv1.1
PRs have been merged.
Create new website for future release
Next, create a new website for the future Dapr release. To do this, you’ll need to:
- Deploy an Azure Static Web App.
- Configure DNS via request from CNCF.
Prerequisites
- Docs maintainer status in the
dapr/docs
repo. - Access to the active Dapr Azure Subscription with Contributor or Owner access to create resources.
- Azure Developer CLI installed on your machine.
- Your own fork of the
dapr/docs
repo cloned to your machine.
Deploy Azure Static Web App
Deploy a new Azure Static Web App for the future Dapr release. For this example, we use v1.1 as the future release.
-
In a terminal window, navigate to the
iac/swa
folder in thedapr/docs
directory.cd .github/iac/swa
-
Log into Azure Developer CLI (
azd
) using the Dapr Azure subscription.azd login
-
In the browser prompt, verify you’re logging in as Dapr and complete the login.
-
In a new terminal, replace the following values with the website values you prefer.
export AZURE_RESOURCE_GROUP=rg-dapr-docs-test export IDENTITY_RESOURCE_GROUP=rg-my-identities export AZURE_STATICWEBSITE_NAME=daprdocs-latest
-
Create a new
azd
environment.azd env new
-
When prompted, enter a new environment name. For this example, you’d name the environment something like:
dapr-docs-v1-1
. -
Once the environment is created, deploy the Dapr docs SWA into the new environment using the following command:
azd up
-
When prompted, select an Azure subscription and location. Match these to the Dapr Azure subscription.
Configure the SWA in the Azure portal
Head over to the Dapr subscription in the Azure portal and verify that your new Dapr docs site has been deployed.
Optionally, grant the correct minimal permissions for inbound publishing and outbound access to dependencies using the Static Web App > Access control (IAM) blade in the portal.
Configure DNS
-
In the Azure portal, from the new SWA you just created, naviage to Custom domains from the left side menu.
-
Copy the “CNAME” value of the web app.
-
Using your own account, submit a CNCF ticket to create a new domain name mapped to the CNAME value you copied. For this example, to create a new domain for Dapr v1.1, you’d request to map to
v1-1.docs.dapr.io
.Request resolution may take some time.
-
Once the new domain has been confirmed, return to the static web app in the portal.
-
Navigate to the Custom domains blade and select + Add.
-
Select Custom domain on other DNS.
-
Enter
v1-1.docs.dapr.io
under Domain name. Click Next. -
Keep Hostname record type as
CNAME
, and copy the value of Value. -
Click Add.
-
Navigate to
https://v1-1.docs.dapr.io
and verify a blank website loads correctly.
You can repeat these steps for any preview versions.
On the new Dapr release date
- Wait for all code/containers/Helm charts to be published.
- Merge the PR from
release_v1.0
tov1.0
. Delete the release/v1.0 branch. - Merge the PR from
release_v1.1
tov1.1
. Delete the release/v1.1 branch. - Merge the PR from
release_v1.2
tov1.2
. Delete the release/v1.2 branch.
Congrats on the new docs release! đ đ đ
Pull in SDK doc updates
SDK docs live in each of the SDK repos. Changes made to the SDK docs are pushed to the relevant SDK repo. For example, to update the Go SDK docs, you push changes to the dapr/go-sdk
repo. Until you pull the latest dapr/go-sdk
commit into the dapr/docs
current version branch, your Go SDK docs updates won’t be reflected on the Dapr docs site.
To bring updates to the SDK docs live to the Dapr docs site, you need to perform a straightforward git pull
. This example refers to the Go SDK, but applies to all SDKs.
-
Pull the latest upstream into your local
dapr/docs
version branch. -
Change into the root of the
dapr/docs
directory. -
Change into the Go SDK repo. This command takes you out of the
dapr/docs
context and into thedapr/go-sdk
context.cd sdkdocs/go
-
Switch to the
main
branch indapr/go-sdk
.git checkout main
-
Pull the latest Go SDK commit.
git pull upstream main
-
Change into the
dapr/docs
context to commit, push, and create a PR.
Next steps
6.3 - Suggested Dapr docs templates
6.3.1 - Conceptual article template
Contributing a new conceptual or overview article
Conceptual (or overview) articles answer the questions:
- Why should you care about this feature?
- What problems does it help you solve?
While a component, API, or SDK spec may help readers understand how to use or work with these features, a conceptual article provides more depth and context. Link off to the spec article, but try not to simply repeat the spec.
When naming your conceptual article, make sure it is consistent with the spec in terms of names, parameters, and terminology. Make sure you update both as needed.
Note
This template is only a suggestion. Feel free to change based on your document’s purpose.Learn more about contributing to the Dapr docs, like front-matter and shortcodes.
Template
---
type: #Required; docs
title: #Required; Brief, clear title
linkTitle: #Required; Brief title
weight: #Required; Use the correct weight based on hierarchy
description: #Required; One-sentence description of what to expect in the article
---
<!--
Remove all the comments in this template before opening a PR.
-->
<!--
H1: The title in the Hugo front-matter serves as the article's markdown H1.
-->
<!-- Introductory paragraph
Required. Brief intro that describes the concepts that the article will cover. Link off to the appropriate reference, specs, or how-to guides to provide context. -->
<!--
Include a diagram or image, if possible.
-->
## <Section 1 H2>
<!--
Add your content here.
-->
## <Section 2 H2>
<!--
Each H2 step should start with a noun/descriptive word.
-->
## <Section 3 H2>
<!--
Add your content here.
-->
<!--
Include diagrams or images throughout, where applicable.
-->
## Try out <concept>
<!--
If applicable, include a section with links to the related quickstart, how-to guides, or tutorials. -->
### Quickstarts and tutorials
Want to put the Dapr <topic> API to the test? Walk through the following quickstart and tutorials to see <topic> in action:
| Quickstart/tutorial | Description |
| ------------------- | ----------- |
| [<topic> quickstart](link) | Description of the quickstart. |
| [<topic> tutorial](link) | Description of the tutorial. |
### Start using <topic> directly in your app
Want to skip the quickstarts? Not a problem. You can try out the <topic> building block directly in your application. After [Dapr is installed](link), you can begin using the <topic> API, starting with [the <topic> how-to guide](link).
-->
## Next steps
<!--
Link to related pages and examples. For example, the related API spec, related building blocks, etc.
-->
6.3.2 - Quickstart guide template
Contributing a new quickstart guide
Dapr quickstart guides consist of quick instructions that walk readers through a prepared quickstart, saved to the dapr/quickstarts repo. These quickstarts package an entire feature or building block in one place, making it easy for the reader to experience how it works without compromising their own project.
The quickstart instructions should be succinct, direct, and clear. The sole purpose of a quickstart guide is to simply instruct a reader through the prepared quickstart. If you’d like to explain the concepts behind the quickstart, direct the reader to a concept article for more context.
Note
This template is only a suggestion. Feel free to change based on your document’s purpose.Learn more about contributing to the Dapr docs, like front-matter and shortcodes.
Template
---
type: #Required; docs
title: #Required; "Quickstart: Brief, clear title"
linkTitle: #Required; This will display in the docs table of contents
weight: #Required; Use the correct weight based on hierarchy
description: #Required; One-sentence description of what to expect in the article
---
<!--
Remove all the comments in this template before opening a PR.
-->
<!--
H1: The title in the Hugo front-matter serves as the article's markdown H1.
-->
<!-- Introductory paragraph
Required. Light intro that briefly describes what the quickstart will cover. Link off to the appropriate concept or overview docs to provide context. -->
<!--
Include a diagram or image, if possible.
-->
<!--
Make sure the quickstart includes examples for multiple programming languages.
-->
## Pre-requisites
<!--
Make sure the reader is prepared for a successful quickstart walk through by listing what they may need.
-->
## Step 1: Set up the environment
<!--
Link to the quickstart sample for the reader to clone.
-->
## Step 2: <action or task>
<!--
Each H2 step should start with a verb/action word.
-->
<!--
Include code snippets where possible.
-->
## Tell us what you think!
We're continuously working to improve our Quickstart examples and value your feedback. Did you find this quickstart helpful? Do you have suggestions for improvement?
Join the discussion in our [discord channel](https://discord.gg/22ZtJrNe).
<!-- Since Dapr is an open community of contributors, make sure to provide a link to the discord discussion to welcome feedback.
-->
## Next steps
<!--
Link to related pages and examples. For example, the building block overview, the HTTP version of an SDK quickstart sample, etc.
-->
<!--
Use the button shortcode to direct readers to more in-depth, related scenarios, like the Dapr tutorials.
-->
6.3.3 - How-to guide template
Contributing a new how-to guide
How-to guides provide step-by-step practical guidance to readers who wish to:
- Enable a feature
- Integrate a technology
- Use Dapr in a specific scenario
How-to guides can be considered “next-level”, self-guided docs compared to quickstarts. How-to scenarios will take longer and can be more easily applied to the reader’s individual project or environment.
When naming your how-to document, include the sub-directory name in the file name. If you need to create a new sub-directory, make sure it’s descriptive and includes the relevant component or concept name. For example, pubsub-namespaces.
Note
This template is only a suggestion. Feel free to change based on your document’s purpose.Learn more about contributing to the Dapr docs, like front-matter and shortcodes.
Template
---
type: #Required; docs
title: #Required; "How to: Brief, clear title"
linkTitle: #Required; "How to: Shorter than regular title, to show in table of contents"
weight: #Required; Use the correct weight based on hierarchy
description: #Required; One-sentence description of what to expect in the article
---
<!--
Remove all the comments in this template before opening a PR.
-->
<!--
H1: The title in the Hugo front-matter serves as the article's markdown H1.
-->
<!-- Introductory paragraph
Required. Light intro that briefly describes what the how-to will cover and any default Dapr characteristics. Link off to the appropriate concept or overview docs to provide context. -->
<!--
Include a diagram or image, if possible.
-->
<!--
If applicable, link to the related quickstart in a shortcode note or alert with text like:
If you haven't already, [try out the <topic> quickstart](link) for a quick walk-through on how to use <topic>.
-->
<!--
Make sure the how-to includes examples for multiple programming languages, OS, or deployment targets, if applicable.
-->
## <Action or task>
<!--
Unlike quickstarts, do not use "Step 1", "Step 2", etc.
-->
## <Action or task>
<!--
Each H2 step should start with a verb/action word.
-->
<!--
Include code snippets where possible.
-->
## Next steps
<!--
Link to related pages and examples. For example, the building block overview, the related tutorial, API reference, etc.
-->
7 - SDK contributing guide
7.1 - Contributing to the .NET SDK
Welcome!
If you’re reading this, you’re likely interested in contributing to Dapr and/or the Dapr .NET SDK. Welcome to the project and thank you for your interest in contributing!
Please review the documentation, familiarize yourself with what Dapr is and what it’s seeking to accomplish and reach out on Discord. Let us know how you’d like to contribute and we’d be happy to chime in with ideas and suggestions.
There are many ways to contribute to Dapr:
- Submit bug reports for the Dapr runtime or the Dapr .NET SDK
- Propose new runtime capabilities or SDK functionality
- Improve the documentation in either the larger Dapr project or the Dapr .NET SDK specifically
- Add new or improve existing components that implement the various building blocks
- Augment the .NET pluggable component SDK capabilities
- Improve the Dapr .NET SDK code base and/or fix a bug (detailed below)
If you’re new to the code base, please feel encouraged to ask in the #dotnet-sdk channel in Discord about how to implement changes or generally ask questions. You are not required to seek permission to work on anything, but do note that if an issue is assigned to someone, it’s an indication that someone might have already started work on it. Especially if it’s been a while since the last activity on that issue, please feel free to reach out and see if it’s still something they’re interested in pursuing or whether you can take over, and open a pull request with your implementation.
If you’d like to assign yourself to an issue, respond to the conversation with “/assign” and the bot will assign you to it.
We have labeled some issues as good-first-issue
or help wanted
indicating that these are likely to be small,
self-contained changes.
If you’re not certain about your implementation, please create it as a draft pull request and solicit feedback
from the .NET maintainers by tagging
@dapr/maintainers-dotnet-sdk
and providing some context about what you need assistance with.
Contribution Rules and Best Practices
When contributing to the .NET SDK the following rules and best-practices should be followed.
Pull Requests
Pull requests that contain only formatting changes are generally discouraged. Pull requests should instead seek to fix a bug, add new functionality, or improve on existing capabilities.
Do aim to minimize the contents of your pull request to span only a single issue. Broad PRs that touch on a lot of files are not likely to be reviewed or accepted in a short timeframe. Accommodating many different issues in a single PR makes it hard to determine whether your code fully addresses the underlying issue(s) or not and complicates the code review.
Tests
All pull requests should include unit and/or integration tests that reflect the nature of what was added or changed so it’s clear that the functionality works as intended. Avoid using auto-generated tests that duplicate testing the same functionality several times. Rather, seek to improve code coverage by validating each possible path of your changes so future contributors can more easily navigate the contours of your logic and more readily identify limitations.
Examples
The examples
directory contains code samples for users to run to try out specific functionality of the various
Dapr .NET SDK packages and extensions. When writing new and updated samples keep in mind:
- All examples should be runnable on Windows, Linux, and MacOS. While .NET Core code is consistent among operating systems, any pre/post example commands should provide options through tabpane
- Contain steps to download/install any required pre-requisites. Someone coming in with a fresh OS install should be able to start on the example and complete it without an error. Links to external download pages are fine.
Documentation
The daprdocs
directory contains the markdown files that are rendered into the Dapr Docs website. When the
documentation website is built this repo is cloned and configured so that its contents are rendered with the docs
content. When writing docs keep in mind:
- All rules in the docs guide should be followed in addition to these.
- All files and directories should be prefixed with
dotnet-
to ensure all file/directory names are globally - unique across all Dapr documentation.
All pull requests should strive to include both XML documentation in the code clearly indicating what functionality does and why it’s there as well as changes to the published documentation to clarify for other developers how your change improves the Dapr framework.
GitHub Dapr Bot Commands
Checkout the daprbot documentation for Github commands you can run in this repo for common tasks. For example,
you can comment /assign
on an issue to assign it to yourself.
Commit Sign-offs
All code submitted to the Dapr .NET SDK must be signed off by the developer authoring it. This means that every commit must end with the following:
Signed-off-by: First Last flast@example.com
The name and email address must match the registered GitHub name and email address of the user committing the changes. We use a bot to detect this in pull requests and we will be unable to merge the PR if this check fails to validate.
If you notice that a PR has failed to validate because of a failed DCO check early on in the PR history, please consider squashing the PR locally and resubmitting to ensure that the sign-off statement is included in the commit history.
Languages, Tools and Processes
All source code in the Dapr .NET SDK is written in C# and targets the latest language version available to the earliest supported .NET SDK. As of v1.15, this means that because .NET 6 is still supported, the latest language version available is C# version 10.
As of v1.15, the following versions of .NET are supported:
Version | Notes |
---|---|
.NET 6 | Will be discontinued in v1.16 |
.NET 7 | Only supported in Dapr.Workflows, will be discontinued in v1.16 |
.NET 8 | Will continue to be supported in v1.16 |
.NET 9 | Will continue to be supported in v1.16 |
Contributors are welcome to use whatever IDE they’re most comfortable developing in, but please do not submit IDE-specific preference files along with your contributions as these will be rejected.
7.2 - Contributing to the Go SDK
When contributing to the Go SDK the following rules and best-practices should be followed.
Examples
The examples
directory contains code samples for users to run to try out specific functionality of the various Go SDK packages and extensions. When writing new and updated samples keep in mind:
- All examples should be runnable on Windows, Linux, and MacOS. While Go code is consistent among operating systems, any pre/post example commands should provide options through tabpane
- Contain steps to download/install any required pre-requisites. Someone coming in with a fresh OS install should be able to start on the example and complete it without an error. Links to external download pages are fine.
Docs
The daprdocs
directory contains the markdown files that are rendered into the Dapr Docs website. When the documentation website is built this repo is cloned and configured so that its contents are rendered with the docs content. When writing docs keep in mind:
- All rules in the docs guide should be followed in addition to these.
- All files and directories should be prefixed with
go-
to ensure all file/directory names are globally unique across all Dapr documentation.
7.3 - Contributing to the Java SDK
When contributing to the Java SDK the following rules and best-practices should be followed.
Examples
The examples
directory contains code samples for users to run to try out specific functionality of the various Java SDK packages and extensions. When writing new and updated samples keep in mind:
- All examples should be runnable on Windows, Linux, and MacOS. While Java code is consistent among operating systems, any pre/post example commands should provide options through tabpane
- Contain steps to download/install any required pre-requisites. Someone coming in with a fresh OS install should be able to start on the example and complete it without an error. Links to external download pages are fine.
Docs
The daprdocs
directory contains the markdown files that are rendered into the Dapr Docs website. When the documentation website is built, this repo is cloned and configured so that its contents are rendered with the docs content. When writing docs, keep in mind:
- All rules in the docs guide should be followed in addition to these.
- All files and directories should be prefixed with
java-
to ensure all file/directory names are globally unique across all Dapr documentation.
Github Dapr Bot Commands
Checkout the daprbot documentation for Github commands you can run in this repo for common tasks. For example, you can run the /assign
(as a comment on an issue) to assign the issue to yourself.
7.4 - Contributing to the JavaScript SDK
When contributing to the JavaScript SDK the following rules and best-practices should be followed.
đĄ You can run npm pretty-fix
to run prettier on all your files
Commit Guidelines
The Dapr Javascript SDK uses the Conventional Commits specification. The automatic changelog tool uses these to automatically generate a changelog based on the commit messages. Here’s a guide to writing a commit message to allow this:
Format
type(scope)!: subject
-
type
: the type of the commit is one of the following:feat
: new features.fix
: bug fixes.docs
: documentation changes.refactor
: refactor of a particular code section without introducing new features or bug fixes.style
: code style improvements.perf
: performance improvements.test
: changes to the test suite.ci
: changes to the CI system.build
: changes to the build system (we don’t yet have one so this shouldn’t apply).chore
: for other changes that don’t match previous types. This doesn’t appear in the changelog.
-
scope
: section of the codebase that the commit makes changes to. If it makes changes to many sections, or if no section in particular is modified, leave blank without the parentheses. Examples:- Commit that adds a
test
:
test(actors): add an actor test
- Commit that changes many things at once:
style: adopt eslint
For changes to examples, the scope should be the example name with the
examples/
prefix:- â
fix(agnoster): commit subject
- â
fix(examples/http/actor): commit subject
- Commit that adds a
-
!
: this goes after thescope
(or thetype
if scope is empty), to indicate that the commit introduces breaking changes.Optionally, you can specify a message that the changelog tool will display to the user to indicate what’s changed and what they can do to deal with it. You can use multiple lines to type this message; the changelog parser will keep reading until the end of the commit message or until it finds an empty line.
Example (made up):
style(agnoster)!: change dirty git repo glyph BREAKING CHANGE: the glyph to indicate when a git repository is dirty has changed from a Powerline character to a standard UTF-8 emoji. Fixes #420 Co-authored-by: Username <email>
-
subject
: a brief description of the changes. This will be displayed in the changelog. If you need to specify other details you can use the commit body but it won’t be visible.Formatting tricks: the commit subject may contain:
-
Links to related issues or PRs by writing
#issue
. This will be highlighted by the changelog tool:feat(archlinux): add support for aura AUR helper (#9467)
-
Formatted inline code by using backticks: the text inbetween backticks will also be highlighted by the changelog tool:
feat(shell-proxy): enable unexported `DEFAULT_PROXY` setting (#9774)
-
Style
Try to keep the first commit line short. This is harder to do using this commit style but try to be concise and if you need more space, you can use the commit body. Try to make sure that the commit subject is clear and precise enough that users will know what change by just looking at the changelog.
Github Dapr Bot Commands
Checkout the daprbot documentation for Github commands you can run in this repo for common tasks. For example, you can run the /assign
(as a comment on an issue) to assign issues to a user or group of users.
Coding Rules
To ensure consistency throughout the source code, keep these rules in mind as you are working:
- All features or bug fixes must be tested by one or more specs (unit-tests).
- All public API methods must be documented.
- We follow ESLint RecommendedRules.
Examples
The examples
directory contains code samples for users to run to try out specific functionality of the various JavaScript SDK packages and extensions. When writing new and updated samples keep in mind:
- All examples should be runnable on Windows, Linux, and MacOS. While JavaScript code is consistent among operating systems, any pre/post example commands should provide options through tabpane.
- Contain steps to download/install any required pre-requisites. Someone coming in with a fresh OS install should be able to start on the example and complete it without an error. Links to external download pages are fine.
Docs
The daprdocs
directory contains the markdown files that are rendered into the Dapr Docs website. When the documentation website is built, this repo is cloned and configured so that its contents are rendered with the docs content. When writing docs, keep in mind:
- All rules in the docs guide should be followed in addition to these.
- All files and directories should be prefixed with
js-
to ensure all file/directory names are globally unique across all Dapr documentation.
7.5 - Contributing to the Python SDK
When contributing to the Python SDK the following rules and best-practices should be followed.
Examples
The examples
directory contains code samples for users to run to try out specific functionality of the various Python SDK packages and extensions. When writing new and updated samples keep in mind:
- All examples should be runnable on Windows, Linux, and MacOS. While Python code is consistent among operating systems, any pre/post example commands should provide options through tabpane
- Contain steps to download/install any required pre-requisites. Someone coming in with a fresh OS install should be able to start on the example and complete it without an error. Links to external download pages are fine.
Docs
The daprdocs
directory contains the markdown files that are rendered into the Dapr Docs website. When the documentation website is built this repo is cloned and configured so that its contents are rendered with the docs content. When writing docs keep in mind:
- All rules in the docs guide should be followed in addition to these.
- All files and directories should be prefixed with
python-
to ensure all file/directory names are globally unique across all Dapr documentation.
Github Dapr Bot Commands
Checkout the daprbot documentation for Github commands you can run in this repo for common tasks. For example, you can run the /assign
(as a comment on an issue) to assign issues to a user or group of users.
7.6 - Contributing to the Rust SDK
When contributing to the Rust SDK the following rules and best-practices should be followed.
Examples
The examples
directory contains code samples for users to run to try out specific functionality of the various Rust SDK packages and extensions. It also hosts component examples used for validation. When writing new and updated samples keep in mind:
- All examples should be runnable on Windows, Linux, and MacOS. While Rust code is consistent among operating systems aside from minor OS-feature gating, any pre/post example commands should provide options through tabpane
- Contain steps to download/install any required pre-requisites. Someone coming in with a fresh OS install should be able to start on the example and complete it without an error. Links to external download pages are fine.
- Examples should be pass validation and include mechanical markdown steps and be added to the validation workflow TBA
Docs
The daprdocs
directory contains the markdown files that are rendered into the Dapr Docs website. When the documentation website is built this repo is cloned and configured so that its contents are rendered with the docs content. When writing docs keep in mind:
- All rules in the docs guide should be followed in addition to these.
- All files and directories should be prefixed with
rust-
to ensure all file/directory names are globally unique across all Dapr documentation.
Update Protobufs
To pull the protobufs from the dapr/dapr
repo you can run the script in the repo root like so:
./update-protos.sh
By default, the script fetches the latest proto updates from the master branch of the Dapr repository. If you need to choose a specific release or version, use the -v flag:
./update-protos.sh -v v1.13.0