Skip to content

Conversation

@nitishfy
Copy link
Member

Closes #26038

After

 ❯ dist/argocd app manifests test 
---
apiVersion: v1
kind: Service
metadata:
  annotations:
    argocd.argoproj.io/tracking-id: test:/Service:guestbook/test-hello-world
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: hello-world
    app.kubernetes.io/version: 1.16.0
    helm.sh/chart: hello-world-0.1.0
  name: test-hello-world
  namespace: guestbook
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  selector:
    app.kubernetes.io/instance: test
    app.kubernetes.io/name: hello-world
  type: ClusterIP

---
apiVersion: v1
kind: ServiceAccount
metadata:
  annotations:
    argocd.argoproj.io/tracking-id: test:/ServiceAccount:guestbook/test-hello-world
    foo: bar
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: hello-world
    app.kubernetes.io/version: 1.16.0
    helm.sh/chart: hello-world-0.1.0
  name: test-hello-world
  namespace: guestbook

---
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    argocd.argoproj.io/tracking-id: test:apps/Deployment:guestbook/test-hello-world
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: hello-world
    app.kubernetes.io/version: 1.16.0
    helm.sh/chart: hello-world-0.1.0
  name: test-hello-world
  namespace: guestbook
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: hello-world
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: test
        app.kubernetes.io/name: hello-world
    spec:
      containers:
      - image: nginx:1.16.0
        imagePullPolicy: IfNotPresent
        livenessProbe:
          httpGet:
            path: /
            port: http
        name: hello-world
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        readinessProbe:
          httpGet:
            path: /
            port: http
      serviceAccountName: test-hello-world


❯ REDIS_PASSWORD=$(kubectl get secret argocd-redis -n argocd -o jsonpath='{.data.auth}' | base64 -d)
REDIS_POD=$(kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-redis -o jsonpath='{.items[0].metadata.name}')
kubectl exec -n argocd "$REDIS_POD" -- redis-cli -a "$REDIS_PASSWORD" FLUSHALL 2>/dev/null
OK

❯ dist/argocd app manifests test                                                                    
{"level":"info","msg":"no Kubernetes resources found for application \"test\": manifests may not exist or the Redis cache is empty","time":"2026-01-19T19:41:25+05:30"}

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Signed-off-by: nitishfy <justnitish06@gmail.com>
@nitishfy nitishfy requested review from a team as code owners January 19, 2026 14:14
@bunnyshell
Copy link

bunnyshell bot commented Jan 19, 2026

❗ Preview Environment stop on Bunnyshell failed

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔴 /bns:stop to stop again the environment
  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

Copy link
Member

@afzal442 afzal442 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: for thie small *fix

Copy link
Contributor

@ppapapetrou76 ppapapetrou76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, this will create more confusion for the user...
If they read that the cache has issues, they will start to wonder what is wrong, etc.

Copy link
Contributor

@pjiang-dev pjiang-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think user's will still run into the issue where they don't know whether their app actually has 0 manifests or the cache is down.
We would need to find a way to differentiate it these two errors
Without changing the server code it may be difficult, but one way is maybe we check the application status from the CLI?
Something like this

if len(resources.Items) == 0 && len(app.Status.Resources) > 0 {
    // App has resources according to its status, but cache returned nothing
    // This indicates cache is likely unavailable
    errors.Fatalf(errors.ErrorCacheUnavailable,
        "Application %s has %d resources but managed resources cache is unavailable. "+
        appName, len(app.Status.Resources))
}

Copy link
Member

@reggie-k reggie-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we need to have a clear distinguishing between the two types of errors, and the UI may need to have changes to deal with the error that would be returned from the server differently than it does today.

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.

argocd app manifests <app-name> returns empty output instead of error if cache unavailable

5 participants