Skip to content

[Bug][DORA] Webhook Deployment not appearing in DORA metrics dashboard #8059

@vincentpatella

Description

@vincentpatella

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

I set up a project with only a webhook as the data input and made an api call on my local machine to generate a deployment. The API call returns a success code, and I see the deployment when I look at the lake.cicd_deployments and lake.cicd_deployments_commits tables, but I don't see a mapping for it in the lake.cicd_scopes table, which I think is the main issue. Because there's no mapping for lake.cicd_scopes (there are mappings for my jenkins and AzureDevOps deployment pipelines), it doesn't show up in the DORA metrics dashboard. I followed the steps here to set it up: https://devlake.apache.org/docs/Configuration/webhook/

What do you expect to happen

I expect the deployment to show up on the DORA metrics dashboard like it does for my Jenkins and Azure DevOps deployments.

How to reproduce

  1. Create a new project named Webhook Test
  2. Create a new webhook and name it Webhook Test
  3. Run Collect Data
  4. Create an API key to authenticate with DevLake
  5. Make the following API call (using your own url):

curl http://localhost:4000/api/rest/plugins/webhook/9/deployments -X 'POST' -H 'Authorization: Bearer {MY_API_KEY}' -d '{
"id": "Test 2",
"createdDate":"2024-09-02T11:00:00+00:00",
"startedDate":"2024-09-02T12:00:00+00:00",
"finishedDate":"2024-09-03T13:00:00+00:00",
"environment":"PRODUCTION",
"result": "SUCCESS",
"displayTitle":"optional-custom-deploy-display-title",
"name": "Test Name",
"deploymentCommits":[
{
"repoUrl":"required-repo-url",
"refName": "optional-release-v0.17",
"startedDate":"2024-01-01T11:00:00+00:00",
"finishedDate":"2024-01-02T11:00:00+00:00",
"commitSha":"c1",
"commitMsg":"optional-msg-1",
"result":"SUCCESS",
"name":"Test Commit 1",
"displayTitle":"Test Commit 1"
},
{
"repoUrl":"repo-2",
"refName": "optional-release-v0.17",
"startedDate":"2024-01-01T11:00:00+00:00",
"finishedDate":"2024-01-02T11:00:00+00:00",
"commitSha":"c2",
"commitMsg":"optional-msg-2",
"result":"FAILURE",
"name":"Test Commit 2",
"displayTitle":"Test Commit 2"
}
]
}'

  1. Run Collect Data
  2. Check the DORA or DORA Details - Deployment Frequency dashboard

Anything else

I have tried multiple projects and multiple webhooks, but still have this problem with each one.

Version

v1.0.1-beta8@e195107

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

StaledevopsSomething about CI/CD (devops)severity/p0This bug blocks key user journey and functiontype/bugThis issue is a bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions