This is an automated email from the ASF dual-hosted git repository.
Startrekzky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 92fbab8c0 fix(dora): count failed deployments, not incidents, in
Change Failure Rate (#8890)
92fbab8c0 is described below
commit 92fbab8c02a73178e4eb639b1f584191f522f61a
Author: Spiff Azeta <[email protected]>
AuthorDate: Sat May 30 14:31:11 2026 +0200
fix(dora): count failed deployments, not incidents, in Change Failure Rate
(#8890)
The Change Failure Rate panels summed `has_incident`, which was the count of
distinct incidents per deployment. A deployment that caused multiple
incidents
was counted multiple times, inflating CFR above the DORA definition
(deployments that caused a failure / total deployments).
Make `has_incident` a 0/1 flag so each deployment counts once regardless of
how
many incidents it caused, and relabel the companion stat from "incident
count"
to "failed deployment count" so the displayed counts match the rate.
Validated against a production dataset: a 30-day window with 6 incidents
across
4 deployments out of 23 total dropped from 26.1% to the correct 17.4%.
Signed-off-by: Spiff Azeta <[email protected]>
---
grafana/dashboards/DORADetails-ChangeFailureRate.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/grafana/dashboards/DORADetails-ChangeFailureRate.json
b/grafana/dashboards/DORADetails-ChangeFailureRate.json
index 87e3b9779..ee27327d5 100644
--- a/grafana/dashboards/DORADetails-ChangeFailureRate.json
+++ b/grafana/dashboards/DORADetails-ChangeFailureRate.json
@@ -164,7 +164,7 @@
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
- "rawSql": "-- Metric 3: change failure rate\nwith _deployments as
(\n -- When deploying multiple commits in one pipeline, GitLab and BitBucket
may generate more than one deployment. However, DevLake consider these
deployments as ONE production deployment and use the last one's finished_date
as the finished date.\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n
max(cdc.finished_date) as deployment_finished_date\n FROM\n
cicd_deployment_commits cdc\n JOIN proj [...]
+ "rawSql": "-- Metric 3: change failure rate\nwith _deployments as
(\n -- When deploying multiple commits in one pipeline, GitLab and BitBucket
may generate more than one deployment. However, DevLake consider these
deployments as ONE production deployment and use the last one's finished_date
as the finished date.\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n
max(cdc.finished_date) as deployment_finished_date\n FROM\n
cicd_deployment_commits cdc\n JOIN proj [...]
"refId": "A",
"select": [
[
@@ -502,7 +502,7 @@
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
- "rawSql": "-- Metric 3: change failure rate\nwith _deployments as
(\n -- When deploying multiple commits in one pipeline, GitLab and BitBucket
may generate more than one deployment. However, DevLake consider these
deployments as ONE production deployment and use the last one's finished_date
as the finished date.\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n
max(cdc.finished_date) as deployment_finished_date\n FROM\n
cicd_deployment_commits cdc\n JOIN proj [...]
+ "rawSql": "-- Metric 3: change failure rate\nwith _deployments as
(\n -- When deploying multiple commits in one pipeline, GitLab and BitBucket
may generate more than one deployment. However, DevLake consider these
deployments as ONE production deployment and use the last one's finished_date
as the finished date.\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n
max(cdc.finished_date) as deployment_finished_date\n FROM\n
cicd_deployment_commits cdc\n JOIN proj [...]
"refId": "A",
"select": [
[