-
Notifications
You must be signed in to change notification settings - Fork 578
[Bug][DORA-change_lead_time_calculator] Wrong deployment reference #8188
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
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). |
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. |
We've been tracking this and it's still an issue for us! Although we're transitioning over to Github Actions we still have a lot of teams using Github for commits and an old Jenkins set up for deploy. Where devlake is finding PRs within Github but can't find a corresponding deploy it's choosing (we think) the first and so earliest deploy available to it, creating massive data skews of 10s of weeks. If there is a PR that says it's been deployed but devlake can't find a deploy job we'd expect it to just not include that PR at all |
We are in the process of analyzing some of the PRs that have been wrongly mapped to non relevant deployments. This is likely due to the previously mentioned query, which appears to be producing inaccurate results during transformation. We are currently investigating affected PRs. |
Appreciate it @kostas-petrakis ! We'll keep an eye on this thread, thanks |
Hello @kostas-petrakis , we are also keeping track of this ticket since we are affected. |
Hi @nicolavolpini I have to revisit this issue, as my original tests were performed over older versions of Apache Devlake locally. Since then we deployed |
Hello Kostas, thanks for the update. We are on |
@Startrekzky I am seeing similar behaviour although a different use case. We have historic PRs that do not have any deployment commits associated. During testing I noticed that all historic PRs without an associated deployment can be simultaneously populated by a deployment commit ID that has no link to it. This doesnt happen all the time so I am investigating what might trigger it. I thought looking at the GO code that there has to be a merge commit hash match for a deployment commit ID to associate with a pull request in project PR metrics table. This is hugely annoying for our usecase as it completely skews the median lead time for change. v1.0.2-beta6 |
Following up on this issue now that we've resolved the more urgent missing DORA calculations. |
Uh oh!
There was an error while loading. Please reload this page.
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: