You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devlake.apache.org by "nes-a-cti (via GitHub)" <gi...@apache.org> on 2023/08/18 05:25:05 UTC

[GitHub] [incubator-devlake] nes-a-cti opened a new issue, #5909: [Feature][Engineering Throughput And Cycle Time] Github pr_deploy_time for Squash and Merge Mode Of PR

nes-a-cti opened a new issue, #5909:
URL: https://github.com/apache/incubator-devlake/issues/5909

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Use case
   
   For Github repo, if the PR is merged with "Squash And Commit" mode, the deploy_time is showing as null
   
   ### Description
   
   While investigating, it is found that `PR Deploy Time` is calculated by matching the column value of `commit_sha` of table `commits_diffs` (which was joined by `commit_sha` of `cicd_deployment_commits` table) with column value of `merge_commit_sha`  of table `pull_requests` as shown in below screen shot.
   
   <img width="1167" alt="screenshot1" src="https://github.com/apache/incubator-devlake/assets/1773811/3a72c4be-d369-49a0-83f0-ffbbb1363b75">
   
   However, for the given pull_request, the column value of `commit_sha` of table `cicd_deployment_commits` has the column value of `head_commit_sha` of table  `pull_requests` and not column value of `merge_commit_sha`.  As shown in following screen shots
   
   <img width="1622" alt="Screenshot2" src="https://github.com/apache/incubator-devlake/assets/1773811/ce3ed8ab-b489-49cd-8332-0cad8f04c915">
   
   <img width="1635" alt="Screenshot3" src="https://github.com/apache/incubator-devlake/assets/1773811/327bcb2c-6635-408d-9c6a-d72a40dd67c7">
   
   So the condition in screen shot 1 is never met and hence the PR Deploy Time is always zero.
   
   As `pr_deploy` time not calculated, `pr_cycle` time is also not calculated. As shown below, pr_cycle time is calculated only if `pr_deploy` time is not nil. 
   
   <img width="1073" alt="screenshot5" src="https://github.com/apache/incubator-devlake/assets/1773811/210d0395-5aaf-497d-be2f-c80e5542df78">
   
   As `PR Cycle Time` not calculated, `Median Lead Time To Change` in DORA metrics is also not showing as it calculated on `PR Cycle Time`.
   
   So may relax above condition to calculate the pr_cycle time even if the pr_deploy time is nil if the PR is merged with `Squash and Merge` mode ?
   
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a 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


[GitHub] [incubator-devlake] klesh commented on issue #5909: [Feature][Engineering Throughput And Cycle Time] Github pr_deploy_time for Squash and Merge Mode Of PR

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

   I'm thinking, maybe we can utilize the `webhook` plugin to create deployments  with correct `commit sha` for the use case, what do you think? @nes-a-cti 


-- 
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] [Feature][Engineering Throughput And Cycle Time] Github pr_deploy_time for Squash and Merge Mode Of PR [incubator-devlake]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #5909: [Feature][Engineering Throughput And Cycle Time] Github pr_deploy_time for Squash and Merge  Mode Of PR
URL: https://github.com/apache/incubator-devlake/issues/5909


-- 
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] [Feature][Engineering Throughput And Cycle Time] Github pr_deploy_time for Squash and Merge Mode Of PR [incubator-devlake]

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

   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] [Feature][Engineering Throughput And Cycle Time] Github pr_deploy_time for Squash and Merge Mode Of PR [incubator-devlake]

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

   Hi, @nes-a-cti , I'm proposing a solution for your use case, would you like to see if it can solve your problem or if anything is missing? Thanks.


-- 
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] [Feature][Engineering Throughput And Cycle Time] Github pr_deploy_time for Squash and Merge Mode Of PR [incubator-devlake]

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

   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