dosubot[bot] commented on issue #7611:
URL: 
https://github.com/apache/incubator-devlake/issues/7611#issuecomment-2163392894

   <!-- Greeting -->
   Hello @lukayeh! I'm here to help you with any bugs, questions, and 
contributions for the DevLake project. Let me know how I can assist you!
   
   <!-- Answer -->
   The issue you're encountering is due to the GitLab plugin directly calling 
`MakePipelinePlanSubtasks` instead of `MakePipelinePlanTask`, which processes 
the `ENABLE_SUBTASKS_BY_DEFAULT` environment variable.
   
   To address this, you can modify the GitLab plugin's blueprint creation 
process to use `MakePipelinePlanTask` instead of `MakePipelinePlanSubtasks`. 
This change will ensure that the `ENABLE_SUBTASKS_BY_DEFAULT` environment 
variable is respected.
   
   Here's a potential modification to the `blueprint_v200.go` file:
   
   ```go
   // Replace the direct call to MakePipelinePlanSubtasks with 
MakePipelinePlanTask
   subtasks, err := helper.MakePipelinePlanTask("gitlab", subtaskMetas, 
scopeConfig.Entities, options)
   if err != nil {
       return nil, err
   }
   ```
   
   This change will ensure that the `CollectDeployment` subtask can be disabled 
using the `ENABLE_SUBTASKS_BY_DEFAULT` environment variable.
   
   After making this change, you can set the environment variable as follows:
   
   ```sh
   export ENABLE_SUBTASKS_BY_DEFAULT="gitlab:CollectDeployment:false"
   ```
   
   Then, restart the DevLake service to apply the changes:
   - For Docker Compose, run `docker-compose down` and `docker-compose up -d`.
   - For Helm, run `helm upgrade devlake devlake/devlake --recreate-pods`.
   
   This should remove the `CollectDeployment` phase from the transformation 
process as expected 
<sup>[[1]](https://github.com/apache/incubator-devlake/blob/main/backend/helpers/pluginhelper/api/pipeline_plan.go)</sup><sup>[[2]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/gitlab/api/blueprint_v200.go)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
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

Reply via email to