sanscfs opened a new pull request, #9080:
URL: https://github.com/apache/devlake/pull/9080

   ## Problem
   
   In the ArgoCD plugin, `collectApplications` and `extractApplications` have 
**no**
   `DomainTypes`, whereas `convertApplications` and the `*SyncOperations` 
subtasks
   carry `DomainTypes: [CICD]`.
   
   Blueprint plan generation (`MakePipelinePlanSubtasks` in
   `backend/helpers/pluginhelper/api/pipeline_plan.go`) only includes a subtask
   whose `DomainTypes` intersect the scope config's `entities` (typically
   `["CICD"]`). With no `DomainTypes`, the application collect/extract subtasks 
are
   **never generated into the blueprint plan**, so
   `_tool_argocd_applications.dest_namespace` is never populated.
   
   `detectEnvironment()` (in `sync_operation_convertor.go`) only emits
   `PRODUCTION` when the `production_pattern`/`env_name_pattern` matches the
   application name, namespace, or `DestNamespace`. Because `DestNamespace` 
stays
   empty, every ArgoCD deployment falls back to `TESTING` — which empties the
   production-only DORA boards.
   
   ## Fix
   
   Add `DomainTypes: []string{plugin.DOMAIN_TYPE_CICD}` to the
   `collectApplications` and `extractApplications` subtask metadata so they are
   generated into the blueprint plan alongside the sync-operation subtasks.
   `dest_namespace` then populates natively and `detectEnvironment()` emits
   `PRODUCTION` without any out-of-band workaround.
   
   ## Verification
   
   - `go build ./plugins/argocd/...` succeeds.
   - `gofmt` clean on both files.
   - The subtasks already exist and are `EnabledByDefault`; only the missing
     `DomainTypes` field was preventing their inclusion.
   
   Note: existing deployments already classified as `TESTING` will be corrected 
on
   the next blueprint run once the plugin is rebuilt with this change.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to