-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug][DORA-change_lead_time_calculator] Wrong deployment reference #8188
Comments
Hello @kostas-petrakis! I'm here to help you with any bugs, questions, or contributions you have. Let me know how I can assist you while we wait for a human maintainer. The issue you're encountering seems to be related to how the In the To address this, you might need to adjust the logic in the Since this issue is specific to the first deployment in each grouping, reviewing and potentially updating the logic in both the |
Hi @kostas-petrakis , I saw your PR #8206 One of DevLake's strategies of Because in many cases,
In your case, the PR However, if we allow the first deployment_commit mapped to PRs. If the Finally, we adopted the above strategy of excluding the very first deployment when mapping to PR. |
@Startrekzky thanks for the explanation. However, in my specific use case (and I assume to others looking at the upvotes), I've observed that PRs associated with the initial recorded commit are being mapped to an incorrect deployment. This seems to introduce a different kind of mis-mapping issue, which affects the accuracy of our metrics (as explained with the data above). |
Search before asking
What happened
While analyzing the data gathered from our GitHub integration, I stumbled upon an anomaly in a minor subset of deployments. Oddly enough, some deployments were reporting a deployment of incosistent time (in my example 30 weeks).
Given my familiarity with our GitHub operations, I was certain this wasn't accurate, prompting me to dig deeper. My investigation points towards a potential issue with the
getDeploymentCommit
function, particularly in relation toEnrichPrevSuccessDeploymentCommit
.To illustrate, I've attached an example PR
As you can see this PR was merged
2024-04-05 09:00:16
yet the deployment linked is incorrect, as it belongs to a different deployment.Manually checking in the
cicd_deployment_commits
for themerge_commit_sha
(b297c73092685c4b1a0ee62c2326d77115a86e94
) I can see that the deployment is there:Upon inspection, I've noticed that the
prev_success_deployment_commit_id
field is empty in our data. I suspect this might be influencing the results of the query in thechange_lead_time_calculator.go
module.I'm uncertain if the query should return
null
when faced with this condition, given thatprev_success_deployment_commit_id
is consistently empty for the first deployment recorded for the cicd_scope_id/repo_url/env grouping, as per code.Interestingly, the linked "deployment_commit_id" : "github:GithubRun:4:435823930:11612162783 is the final entry in the cicd_deployment_commits table for the cicd_scope_id/repo_url/env grouping.
What do you expect to happen
PR deployment should be linked to the proper run for this example (
github:GithubRun:4:435823930:8567339272:https:\/\/github.com\/l*****\/****
)How to reproduce
I will just describe what the status of that repo is, GitHub, deployment through CI/CD workflow, explore for the first PR deployment recorded by Devlake and evaluate the linked deployment.
This issue is only related to the first deployment for each cicd_scope_id/repo_url/env grouping.
Anything else
No response
Version
v1.0.1@e061ef2
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: