incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

[Bug][GitLab] Issue collecting the deployment frequency data from a specific Job of a pipeline.

Open estefaniasuasti opened this issue 2 years ago • 9 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

I am facing an issue collecting the deployment frequency data. My pipeline reaching production has 3 stages: Dry-run, deploy, and health check. The logic would be to grab as a deployment date the last time when the "Deploy" stage was run, however DevLake is taking the last time when the health-check stage was run. The issue is in order to check the health of our system we sometimes just run the health-check stage, months after the deployment was done.

To be more precise we had a deployment "prod-deploy" during December, however we run a health-check "prod-healthcheck" on January and now the monthly deployments shows that the deployment happened during January, which is not accurate.

Screenshot 2024-01-30 at 1 08 44 PM (2)

The Scope config, that I am using is:

(?i)(^(branchName)$) and (?i)(prod-deploy)

Data source: GitLab

What do you expect to happen

With this scope the idea was just to collect the data only if the "prod-deploy" job had been run.

How to reproduce

Having a pipeline with different stages and run a no deployment job later on.

image

Anything else

No response

Version

v0.19.0-rc4@

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

estefaniasuasti avatar Feb 01 '24 21:02 estefaniasuasti

What kind of data source is it? Jenkins?

klesh avatar Feb 02 '24 02:02 klesh

I think it's a bug, because in scope config image the wording is one of its jobs , but in code https://github.com/apache/incubator-devlake/blob/release-v0.19/backend/plugins/gitlab/tasks/pipeline_detail_extractor.go#L74 only ref's name was checked. (it's the same with main branch https://github.com/apache/incubator-devlake/blob/main/backend/plugins/gitlab/tasks/pipeline_detail_extractor.go#L71).

@estefaniasuasti Thanks for your feedback.

It will be good if this bug can be resolve ASAP.

d4x1 avatar Feb 02 '24 12:02 d4x1

Good morning @klesh, sorry I forgot to mention that in the description of the issue. I am using GitLab as a data source. Let me update it.

estefaniasuasti avatar Feb 02 '24 14:02 estefaniasuasti

Good morning @d4x1. That is a really good point. And based on my short experience using DevLake , yes, because I modified the regex for the Scope Config several time but it didn't work, it only check the branch name (ref). And based on the code that you shared, there is no parameter that compares the "Stage" name or the job "name".

estefaniasuasti avatar Feb 02 '24 14:02 estefaniasuasti

Collecting votes if you're encountering the same problem.

Startrekzky avatar Feb 04 '24 08:02 Startrekzky

@estefaniasuasti 'the wording is one of its jobs' maybe right, It is executed here, not in the pipeline extractor

abeizn avatar Feb 04 '24 08:02 abeizn

Thanks for your answer @abeizn, as a result do you think there is a way for my project to fit the current structure for calculating Dora metrics or not at all because of the health-check stage situation?

estefaniasuasti avatar Feb 05 '24 14:02 estefaniasuasti

To solve this problem, I think DevLake's scope config needs to support kinds of "filter" when generating a pipeline.

d4x1 avatar Feb 05 '24 14:02 d4x1

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.

github-actions[bot] avatar Apr 06 '24 00:04 github-actions[bot]

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.

github-actions[bot] avatar Jun 06 '24 00:06 github-actions[bot]

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.

github-actions[bot] avatar Jun 13 '24 00:06 github-actions[bot]