[Bug][GitLab] Issue collecting the deployment frequency data from a specific Job of a pipeline.
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.
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.
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
- [X] I agree to follow this project's Code of Conduct
What kind of data source is it? Jenkins?
I think it's a bug, because in scope config
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.
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.
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".
Collecting votes if you're encountering the same problem.
@estefaniasuasti 'the wording is one of its jobs' maybe right, It is executed here, not in the pipeline extractor
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?
To solve this problem, I think DevLake's scope config needs to support kinds of "filter" when generating a pipeline.
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.
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.
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.