dosubot[bot] commented on issue #8249: URL: https://github.com/apache/incubator-devlake/issues/8249#issuecomment-2551940085
<!-- Greeting --> Hey there, @qpawelc! 👋 I'm here to help you out with any bugs, questions, or even becoming a contributor. Let's tackle this together! <!-- Answer --> To address the issue of commits being associated with a "seemingly random" deployment in DevLake, you can consider the following steps: 1. **Debugging the Association Logic**: DevLake associates commits with deployments by finding the commits difference between two consecutive deployments and connecting PR/MR and the commits difference through `merge_commit` or `pr_commit` <sup>[[1]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.21/Metrics/PRDeployTime.md)</sup>. If historical deployment data is missing, DevLake might default to associating older commits with the earliest available deployment. Unfortunately, specific fallback mechanisms for missing deployment data are not documented, so you might need to explore the codebase or logs to understand the exact logic being applied. 2. **Workaround with Blueprint Configuration**: You can configure the data ingestion to start after a specific event, such as a deployment, by using the `SyncPolicy` component. This allows you to set a `timeAfter` property to limit data collection to a specific time range <sup>[[2]](https://github.com/apache/incubator-devlake/blob/main/config-ui/src/routes/blueprint/detail/components/sync-policy/index.tsx)</sup>. This approach can help you avoid associating older commits with recent deployments by only ingesting data after a certain point in time. 3. **Review Related Issues**: Since you've found a similar issue in the DevLake repository, it might be helpful to follow up on that issue or any related discussions to see if there have been updates or solutions provided by the community. By implementing these steps, you should be able to better manage the commit-to-deployment associations and mitigate the skewed metrics issue. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/419cd9ae-b43a-4377-a618-e113a6e3026e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/419cd9ae-b43a-4377-a618-e113a6e3026e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/419cd9ae-b43a-4377-a618-e113a6e3026e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/419cd9ae-b43a-4377-a618-e113a6e3026e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/419cd9ae-b43a-4377-a618-e113a6e3026e?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/419cd9ae-b43a-4377-a618-e113a6e3026e?feedback_type=other)</sup> -- 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-unsubscr...@devlake.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org