Skip to content

fix: empty sync/health status for external ArgoCD apps in the app list - #7031

Open
kasparpl wants to merge 1 commit into
devtron-labs:mainfrom
kasparpl:fix/argo-app-list-status-column-case
Open

fix: empty sync/health status for external ArgoCD apps in the app list#7031
kasparpl wants to merge 1 commit into
devtron-labs:mainfrom
kasparpl:fix/argo-app-list-status-column-case

Conversation

@kasparpl

Copy link
Copy Markdown

Description

Fixes #7030

On the ArgoCD Apps tab every external Argo CD application shows - as its status, and GET /orchestrator/argo-application returns empty appStatus / syncStatus, although the Application objects are Synced / Healthy.

BuildK8sObjectListTableData (common-lib utils/k8s/K8sUtil.go) lower-cases the Table column names when it builds the row maps, so the row keys are sync status / health status. getApplicationListDtos looked the values up with the printer-column constants "Sync Status" / "Health Status", which never match.

This PR lower-cases the lookup keys (derived from the same constants, so the two places cannot drift apart again) and adds a comment explaining why.

How was this verified

  • POST /orchestrator/k8s/resource/list for argoproj.io/v1alpha1 Application on a running Devtron (1188d0b9) returns headers: ["name", "namespace", "sync status", "health status"] with Synced / Healthy in the rows, while the list endpoint returned empty strings.
  • The constants are used only in this function (pkg/argoApplication/ArgoApplicationService.go), so nothing else changes behaviour.

Checklist

  • Change is limited to the list DTO mapping; no API contract change.
  • DCO sign-off.

BuildK8sObjectListTableData in common-lib lower-cases the Table column names
when it builds the row maps (keys become "sync status" / "health status"),
but getApplicationListDtos looked the values up with the printer-column
constants "Sync Status" / "Health Status". The lookup never matched, so the
ArgoCD Apps list rendered "-" for every external Argo application even though
the Kubernetes Table API returned Synced/Healthy.

Lower-case the lookup keys to match what the row builder produces.

Signed-off-by: kacpernajda <kacper.najda2001@gmail.com>
@bito-code-review

Copy link
Copy Markdown

Bito Review Skipped - Source Branch Not Found

Bito didn't review this change because the pull request is no longer valid. It may have been merged, or the source/target branch may no longer exist.

@sonarqubecloud

Copy link
Copy Markdown

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.

Bug: ArgoCD Apps list shows empty sync/health status for every external Argo CD application (row keys are lower-cased, lookup keys are not)

1 participant