This guide provides step-by-step instructions for organizing projects in DevLake. It is intended for team leads and developers who want to optimize their workflow. Herein, we will explore various use cases to demonstrate the practical application of these instructions.
Development teams typically manage pull requests, deployments, and incidents using various boards.
Based on such, we want to measure their productivity and stability. This is how DORA does that:
deploy? (a.k.a. Deployment Frequency)pull requests resolved? (a.k.a. Lead Time)incidents per deploys does the team have? (a.k.a. Change Failure Rate)incidents solved? (a.k.a. Median Time to Restore)All these questions/metrics are based on either pull requests, deployments, or incidents.
Note: All three are completely separate entities and are associated only with their project.
There are 3 red lines when it comes to structuring your DevLake projects:
But when we scale this up, a few problems arise:
reposboard contains incidents of multiple teams or projectsrepository is managed by multiple teams or projects, e.g. a monorepopipeline can trigger deployments in multiple reposThis is where the project concept comes into play.
In practical terms, a project usually involves building or researching solutions to address specific problems or explore new opportunities. A DevLake project is a grouping of pull requests, deployments, or incidents. It can be seen as a real-world project or product line. DevLake measures DORA metrics for each project.
Note: It does not matter if a team works on a particular repository more than another. The metrics are calculated over the entire set of repos, and the values are accumulated. More on that: Debugging DORA Issue Metrics.
DevLake's flexible structure enables you to organize pull requests, deployments, and incidents in a manner tailored to your specific projects, teams, or technologies.
The examples below show the patterns of how to organize your projects. To keep things simple we assume that we work with GitHub repos, Jira boards, and Jenkins CI/CD deploys in each GitHub repo.
The same would apply to other repos (e.g. GitLab or BitBucket), boards (e.g. TAPD), or CI/CD (e.g. GitLab CI, Azure DevOps).
This section demonstrates real-life situations and how they get reflected in DevLake.
Disclaimer: To keep this guide shorter, some technical details are only mentioned in Use Case 1, so if you read this page for the first time, make sure to go through them in order.
Note: If you use webhooks, check the quick note about them below.
Apache Software Foundation (ASF) has and is developing many projects.
To take an example we will analyze 2 projects: DevLake and Spark. Both are independent of each other. Assume that ASF wants to check the health of the development and maintenance of these projects with DORA.
DevLake manages 3 repos: incubator-devlake, incubator-devlake-website, and incubator-devlake-helm-chart. There are many repos related to Spark in one way or another. To keep it simple, we will also pick 3 repos: spark, spark-website, and incubator-livy.
Both projects use GitHub for storing code (including pull requests), deployments on GitHub Actions, and incidents.
Note: To avoid confusion between DevLake as a project in this use case and DevLake as a platform, we will use complete names i.e. project DevLake and platform DevLake respectively.
First, create two projects on the DevLake platform, one for DevLake and one for Spark. These will represent real-world projects.
Once these are created, the connections created in the following steps will be bound to them.
Since all is on GitHub in this case, we can use just 1 connection with the following properties:
repospull requests, deployments, and incidents)If you store incidents on Jira, for example, you will need to create a separate connection just for them. The same applies to deployments, a separate connection is needed in case they are stored in Jenkins (or any other host for deployments).
This part is described in GitHub connection configuration. For other platforms check the Configuration Guide
At this point, we have projects and connections created on the platform DevLake. It is time to bind those connections to the projects. To do so, follow the steps described in the Tutorial.
To know if the data of a project is successfully collected go to your DORA Dashboard:
If everything goes well, you should see all the 4 charts. If something is wrong, and you are puzzled as to why, check out the Debugging Dora Issue Metrics page.
In the same DORA dashboard check out this menu point:
The metrics should change when you select or deselect projects, representing the projects you selected.
Consider a scenario where a company operates with several teams, each managing one or more projects. For illustration, we will explore two such teams: the Payments team and the Internal Tools team. Here's a simplified representation of this scenario:
repos and Jenkins for CI/CD.DORA is effective for observing the impacts of methodology changes within a team. From DORA’s standpoint, the concept of distinct teams is not recognized; only projects exist. Adding a team concept introduces unnecessary complexity without providing any substantial benefit.
In DevLake, we create three projects: payments, it-legacy, and it-new.
It is crucial to maintain atomic projects, representing the smallest, independent units, to prevent complexity and ensure precise data representation. Atomic projects allow for a more flexible and accurate data comparison and combination between projects.
Create just one connection and reuse it across projects by adding data scopes. This method optimizes data collection, minimizing redundancy and ensuring more efficient use of resources.
It is NOT recommended to create multiple connections, for instance, GitHub repos, as it
will increase the time to collect the data due to the storage of multiple copies of shared repos in the database.
The only exception is the webhooks: we must have 1 connection per project, as this is the only way DevLake can accurately assign incidents to the corresponding project.
So, in total we will have only these connections:
repos to collect pull requestsdeploymentsincidentsincidents: 1 per each project that uses webhooks (it-legacy and it-new)The step-by-step Configuration Guide shows how to both add connections and set scopes as described in the next chapter.
Now, add the connections to our projects and set the scope to them:
For payments project:
repos to collect their pull requestsdeployments of p1...p10 reposincidentsFor it-legacy project:
repos it-legacy-1, it-legacy-2, it-core-1 and it-core-2 to collect their pull requestsdeployments of it-legacy-1, it-legacy-2, it-core-1 and it-core-2 reposincidentsFor it-new project:
repos it-new-1, it-new-2, it-core-1 and it-core-2 to collect their pull requestsdeployments of it-new-1, it-new-2, it-core-1 and it-core-2 reposincidentsAssigning a UNIQUE webhook to each project is critical. This ensures that the DevLake platform correctly associates the incoming data with the corresponding project through the webhook.
If you use the same webhook across multiple projects, the data sent by it will be replicated per each project that uses that webhook. More information available on the Webhook page
If you run into any problem, please check the Troubleshooting or create an issue