Skip to content

fix(argo): handle null items array in argocd applications response #765

Closed

Description

@dan-petty

Description

When querying ArgoCD for applications (devops argo cd apps list), an ArgoCD instance with zero applications returns {"metadata": ..., "items": null} due to Go protobuf JSON serialization semantics.

_build_apps_table previously did:

items = data.get("items", []) if isinstance(data, dict) else []

Because items key is present with value None, the default [] was not returned, resulting in:
TypeError: 'NoneType' object is not iterable

Fix

Safely coerce None to an empty list:

items = (data.get("items") or []) if isinstance(data, dict) else []

Activity

  1. added this to the v0.2.24 milestone on Oct 1, 2026
  2. added
    type/bug
    scope/k8s
    priority/p2-medium
    on Oct 1, 2026
  3. added a commit that references this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2-mediumscope/k8stype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions