Skip to content

fix(argocd): add CICD DomainTypes to application collect/extract subtasks - #9080

Open
sanscfs wants to merge 1 commit into
apache:mainfrom
sanscfs:fix/argocd-applications-domain-types
Open

fix(argocd): add CICD DomainTypes to application collect/extract subtasks#9080
sanscfs wants to merge 1 commit into
apache:mainfrom
sanscfs:fix/argocd-applications-domain-types

Conversation

@sanscfs

@sanscfs sanscfs commented Aug 28, 2026

Copy link
Copy Markdown

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.

…asks

collectApplications and extractApplications had no DomainTypes, while the
convertApplications / *SyncOperations subtasks carry DomainTypes [CICD].
Blueprint plan generation (MakePipelinePlanSubtasks) only includes a
subtask whose DomainTypes intersect the scope config's entities (typically
["CICD"]). With no DomainTypes, the application subtasks were never
generated into the blueprint plan, so _tool_argocd_applications.dest_namespace
was never populated and detectEnvironment() classified every ArgoCD
deployment as TESTING instead of PRODUCTION.

Add DomainTypes: [CICD] so the application collect/extract subtasks are
generated alongside the sync-operation ones, letting dest_namespace populate
natively.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant