The documentation you are viewing is for Dapr v1.6 which is an older version of Dapr. For up-to-date documentation, see the latest version.
Contributing with GitHub Codespaces
GitHub Codespaces are 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.
- 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 Codespace. Environments are spun down automatically when not in use.
- Portable: Run in your browser or in Visual Studio Code
Open a Dapr repo in a Codespace
To open a Dapr repository in a Codespace simply 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.
Developing Dapr Components in a Codespace
Developing a new Dapr component requires working with both the components-contrib and dapr repos together under the
$GOPATH tree for testing purposes. To facilitate this, the
/go/src/github.com/dapr folder in the components-contrib Codespace will already be set up with your fork of components-contrib, and a clone of the dapr repo as described in the component development documentation. A few things to note in this configuration:
- The components-contrib and dapr repos only define Codespaces for the Linux amd64 environment at the moment.
/go/src/github.com/dapr/components-contribfolder is a soft link to Codespace’s default
/workspace/components-contribfolder, so changes in one will be automatically reflected in the other.
- Since the
/go/src/github.com/dapr/daprfolder uses a clone of the official dapr repo rather than a fork, you will not be able to make a pull request from changes made in that folder directly. You can use the dapr Codespace separately for that PR, or if you would like to use the same Codespace for the dapr changes as well, you should remap the dapr repo origin to your fork in the components-contrib Codespace. For example, to use a dapr fork under
cd /go/src/github.com/dapr/dapr git remote set-url origin https://github.com/my-git-alias/dapr git fetch git reset --hard
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.