Skip to content

fix(argo): show repo for multi-source Argo apps #2579

Closed

Description

@dan-petty

Problem Description

devops argo cd apps list shows an empty Repo column for every Application that uses spec.sources (multi-source) in place of spec.source. ArgoAppInfo reads spec.source.repoURL only (src/devops_cli/models/argo.py), and a multi-source Application has no spec.source.

On the homelab (2026-10-29), 16 of the 29 Applications use spec.sources, for example argocd (chart, values ref and git), and grafana, loki, traefik and argo-workflows (chart and values ref). All 16 show no repository.

Reproduction Steps

  1. Have an Argo CD Application with spec.sources (for example a Helm chart source and a ref source for its values).
  2. Run uv run devops argo cd apps list.

Expected vs Actual Behavior

  • Expected: the Repo column names each source of the Application (for example the chart repository and the values repository), or the first source, with a rule the help states.
  • Actual: the Repo column is empty.

Environment Diagnostics

origin/main cabfcd43. Read-only kubectl -n argocd get applications -o json shows spec.source unset and spec.sources set on each of the 16.

Logs, Traces, or Terminal Output

devops argo cd apps list: argocd, argo-workflows, argocd-image-updater, dcgm-exporter, gitea, grafana, k8s-monitoring, loki, open-webui, otel-collector, prometheus, prometheus-operator-crds, pyroscope, qdrant, tempo and traefik show no repository. The single-source Applications (base, devops, llm and others) show theirs.

Existing Tool Considered

The Argo CD Application spec defines spec.sources as a list of the same source objects. The fix reads it in the existing model. Nothing new is built.

Proposed design

Problem statement

The command devops argo cd apps list shows an empty Repo column for every Argo CD Application that uses spec.sources (multi-source) instead of spec.source. The model reads only spec.source.repoURL. On the homelab, 16 of 29 Applications use spec.sources and all show no repository. The fix reads spec.sources[0].repoURL as a fallback in the existing model.

Acceptance criteria

Requirement: Single-source repo shown

When an Application has spec.source.repoURL, the Repo column SHALL show that URL.

Scenario: Application with spec.source set

  • WHEN An Application JSON has spec.source.repoURL set to a value and spec.sources absent
  • THEN The Repo column shows the value of spec.source.repoURL

Requirement: Multi-source first repo shown

When an Application has spec.sources and no spec.source, the Repo column SHALL show the repoURL of the first element of spec.sources.

Scenario: Application with spec.sources list

  • WHEN An Application JSON has spec.sources as a non-empty list and spec.source absent
  • THEN The Repo column shows the repoURL of spec.sources[0]

Requirement: No source yields empty repo

When an Application has neither spec.source nor spec.sources, the Repo column SHALL be empty.

Scenario: Application with no source fields

  • WHEN An Application JSON has neither spec.source nor spec.sources
  • THEN The Repo column is an empty string

Existing Tool Considered

No check has run. No external tool covers this need because it is a bug in the project's own model code. The fix adds a fallback read of spec.sources[0].repoURL in src/devops_cli/models/argo.py. The written cost is a few lines of code to build, keep and fix, well under one hour of elapsed time.

Key questions

  • What value to show in the Repo column for a multi-source Application?: Show the repoURL of the first element of spec.sources. This matches the Argo CD CLI behavior and keeps the column narrow and predictable. (best practice) [sources: src/devops_cli/models/argo.py]
    • Chosen: First source repoURL. Matches Argo CD CLI behavior. Keeps the column narrow. The first source is the primary source by Argo CD convention.
    • Rejected: All repoURLs joined by comma. Shows every source but makes the column very wide and hard to read in a table.
    • Rejected: Leave empty. Preserves the current broken behavior. Does not fix the issue.
  • Which methods in the model need the fallback read?: Two methods: ArgoCDApp.from_api_item and ArgoResourceState.from_manifest, both in src/devops_cli/models/argo.py. Both currently read only spec.source.repoURL. [sources: src/devops_cli/models/argo.py:40, src/devops_cli/models/argo.py:155]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    status/new
    value/medium
    effort/low
    on Oct 29, 2026
  2. dan-petty commented on Oct 29, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The command displays wrong data for Applications that use 'spec.sources' instead of 'spec.source'.
    • Priority: P2-Medium. The list command is incomplete for 12 of 29 Applications, but the data is still reachable via kubectl or the Argo CD UI.
    • Value: Medium. Users lose the repository column for multi-source Applications, which reduces the usefulness of the list command.
    • Effort: Low. The fix reads 'spec.sources' in the existing model file; no new component is built.
  3. added
    priority/p2-medium
    on Oct 29, 2026
  4. added
    status/ready
    and removed
    status/new
    on Oct 30, 2026
  5. devops-cli-service commented on Oct 30, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 07fb4c2 (see proposed design in issue body).

  6. devops-cli-service commented on Nov 1, 2026

    @devops-cli-service
    Contributor

    Staged: branch fix/2579-devops-argo-cd-apps-list-shows, draft pull request #3003. The pull request plans the item and closes no issue.

    The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:

    1. Add tests for multi-source repo fallback: 2880 tokens
    2. Add spec.sources fallback to ArgoCDApp and ArgoResourceState: 2872 tokens

    These paths of the plan are no file on the default branch, and no group creates them: tests/test_models_argo.py. A person checks that the plan names them right.

  7. added a commit that references this issue on Nov 1, 2026
  8. added
    status/planned
    owner/service
    and removed
    status/ready
    on Nov 1, 2026
  9. 64 remaining items

  10. added
    status/planned
    on Nov 4, 2026
  11. devops-cli-service commented on Nov 4, 2026

    @devops-cli-service
    Contributor

    Cleared the stop at job by the rule digest: the runner image changed since the stop, from sha256:eb2c32f9c27c350eafb35b7f08c274621a0a05b95904b2185c667b9805b0d499 to sha256:ff7f81f8f5902c5ae4e48ed334bc83f842b51afb639ab71be65cb4240daadf01. The item is Planned again, and the Service takes it in the next round. The Service clears a stop one time for each runner image. A new stop on this image waits for a comment implement: retry.

  12. changed the title [-]fix(argo): devops argo cd apps list shows no repository for an Application with spec.sources[/-] [+]fix(argo): show repo for multi-source Argo apps[/+] on Nov 6, 2026
  13. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    The job shortened the title of this item. The summary had 81 characters, and the limit is 60. The type and the scope stay.

  14. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/planned
    status/in-progress
    on Nov 6, 2026
  15. removed
    status/in-review
    owner/agent
    on Nov 6, 2026
  16. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-06 19:47 UTC

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

    effort/lowpriority/p2-mediumsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions