apache / incubator-devlake

Apache DevLake is an open-source dev data platform to ingest, analyze, and visualize the fragmented data from DevOps tools, extracting insights for engineering excellence, developer experience, and community growth.
https://devlake.apache.org/
Apache License 2.0
2.61k stars 530 forks source link

[Bug][gitlab] Deployment count is wrong when downstream pipeline is used #8145

Open MarcViola opened 1 month ago

MarcViola commented 1 month ago

Search before asking

What happened

Requested this feature to be supported https://github.com/apache/incubator-devlake/pull/8009 After testing with downstream pipeline, the number of deployments don't add up. I've tested a few similar projects and the count is not correct.

image

image

image

image

What do you expect to happen

It should only be 1 deployment.

How to reproduce

Parent Test: stage: build trigger: include: trigger-child.yml

Child Test: tags:

Anything else

No response

Version

v1.0.2-beta2@2cadbf8

Are you willing to submit PR?

Code of Conduct

dosubot[bot] commented 1 month ago

Hey @MarcViola! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's work together to solve this issue you're facing!

I found a similar closed issue that might be relevant to your problem: How to avoid skipped jobs counting as successful production deployment?. This issue was resolved by a pull request that addressed how skipped jobs were being counted, which might provide insights into handling deployment counts [1].

Regarding your specific issue with downstream pipelines in GitLab, the deployment count may be incorrect because tools like GitLab generate more than one deployment for multiple deployments triggered by one pipeline. Apache DevLake considers these deployments as one and uses the last deployment's finished date as the deployment finished date. To fix this, ensure that DevLake is configured to treat multiple deployments from a single pipeline as one. This involves defining deployment in the data transformations while configuring the blueprint of a project [2].

For more detailed guidance, you can refer to the transformation rules section in the documentation, which explains how to set up these configurations using regular expressions to identify deployments and production deployments [3].

To continue talking to Dosu, mention @dosu.