You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devlake.apache.org by "vincentpatella (via GitHub)" <gi...@apache.org> on 2024/09/17 15:34:17 UTC

[I] [Bug][Module Name] Bug title Webhook Deployment not appearing in DORA metrics dashboard [incubator-devlake]

vincentpatella opened a new issue, #8059:
URL: https://github.com/apache/incubator-devlake/issues/8059

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) 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"
          }
       ]
     }'
   
   6. Run Collect Data
   7. 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
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][DORA] Webhook Deployment not appearing in DORA metrics dashboard [incubator-devlake]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8059: [Bug][DORA] Webhook Deployment not appearing in DORA metrics dashboard
URL: https://github.com/apache/incubator-devlake/issues/8059


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][DORA] Webhook Deployment not appearing in DORA metrics dashboard [incubator-devlake]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8059:
URL: https://github.com/apache/incubator-devlake/issues/8059#issuecomment-2509493471

   This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][DORA] Webhook Deployment not appearing in DORA metrics dashboard [incubator-devlake]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8059:
URL: https://github.com/apache/incubator-devlake/issues/8059#issuecomment-2495716573

   This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Module Name] Bug title Webhook Deployment not appearing in DORA metrics dashboard [incubator-devlake]

Posted by "vincentpatella (via GitHub)" <gi...@apache.org>.
vincentpatella commented on issue #8059:
URL: https://github.com/apache/incubator-devlake/issues/8059#issuecomment-2356447928

   Hi, I had already looked at that issue and it did not help.  The webhook is also already associated with a project and I copied the payload from the Webhook documentation for the fields before editing the data to match what a typical deployment would expect.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Module Name] Bug title Webhook Deployment not appearing in DORA metrics dashboard [incubator-devlake]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #8059:
URL: https://github.com/apache/incubator-devlake/issues/8059#issuecomment-2356270430

   <!-- Greeting -->
   Hello @vincentpatella! 👋 I'm here to help you with any bugs, questions, or contributions you have for the project. Let's tackle this together!
   
   <!-- Answer -->
   I found a similar closed issue: [[Bug][DORA] Webhook incidents do not appear](https://github.com/apache/incubator-devlake/issues/5886), which was resolved by a pull request: [fix: add webhook boards in project_mapping table](https://github.com/apache/incubator-devlake/pull/5898) on August 16, 2023 <sup>[[1]](https://github.com/apache/incubator-devlake/issues/5886)</sup>.
   
   The deployment created via webhook is not appearing in the DORA metrics dashboard because it is likely not associated with a DevLake project. To resolve this, follow these steps:
   
   1. Go to the __Projects__ page in DevLake.
   2. Create or select the relevant project.
   3. Add the existing webhook to this project.
   4. Ensure that the data collection is started by clicking `Collect All` in the __blueprint status__ tab.
   
   This association is necessary for the deployment data to be included in the DORA metrics dashboard. Additionally, ensure that the webhook configuration is correctly set up to push deployment data to DevLake, as described in the documentation. This includes verifying that the webhook payload schema matches the expected format and that the data is being correctly recorded in the `cicd_deployments` and `cicd_deployment_commits` tables <sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/docs/DORA.md)</sup>.
   
   For more detailed guidance on setting up and troubleshooting DORA metrics, you can refer to the [DORA implementation guide](https://grafana-lake.demo.devlake.io/grafana/d/qNo8_0M4z/dora?orgId=1) and the [DORA troubleshooting documentation](https://github.com/apache/incubator-devlake/issues). Additionally, you can review the [DORA metrics documentation](https://incubator-devlake-website/versioned_docs/version-v1.0/DORA.md) for comprehensive information on implementing and configuring DORA metrics in DevLake <sup>[[3]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.21/DORA.md)</sup><sup>[[4]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.20/DORA.md)</sup><sup>[[5]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v1.0/DORA.md)</sup>.
   
   Furthermore, if you are using webhooks to push deployment data, ensure that the payload schema is correctly formatted. The required fields for deployment data include `id`, `startedDate`, `finishedDate`, and `deploymentCommits` with their respective `repoUrl`, `commitSha`, `startedDate`, and `finishedDate`. For more details on the payload schema and sample API calls, refer to the [Webhook Plugin documentation](https://incubator-devlake-website/docs/Plugins/webhook) <sup>[[6]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Plugins/webhook.md)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Module Name] Bug title Webhook Deployment not appearing in DORA metrics dashboard [incubator-devlake]

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky commented on issue #8059:
URL: https://github.com/apache/incubator-devlake/issues/8059#issuecomment-2358448266

   Hi @vincentpatella , we'll look into this problem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][DORA] Webhook Deployment not appearing in DORA metrics dashboard [incubator-devlake]

Posted by "xiaomingzhang12 (via GitHub)" <gi...@apache.org>.
xiaomingzhang12 commented on issue #8059:
URL: https://github.com/apache/incubator-devlake/issues/8059#issuecomment-2370552433

   Hi @vincentpatella , I followed the steps you provided with two differences:
   
   The URL’s IP and API key are from my own environment.
   In the POST request, I updated deploymentCommits[0].startedDate and deploymentCommits[0].finishedDate to more recent dates. Other than that, everything remained the same.
   After completing the steps, I checked the Deployment Frequency dashboard, and there is data, as shown in the attached screenshot. 
   ![img_v3_02f1_9602e126-def9-462a-8de4-b29da3f0a69g](https://github.com/user-attachments/assets/0eaac654-8b57-4797-b244-45fbfb3f3577)
   ![img_v3_02f1_e15e0d28-e23d-4749-94a1-25968aae4ffg](https://github.com/user-attachments/assets/021a25b3-b53a-4593-b583-f250cd1eccbd)
   
   Could you confirm if the data in the screenshot is what you were expecting?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org