argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.95k stars 5.46k forks source link

Improve cmp logging/error messages #12144

Open jsoref opened 1 year ago

jsoref commented 1 year ago

Checklist:

Describe the bug

  1. both couldn't and could not appear in related messages (only one style should be used for the project)
  2. the argocd application name isn't reported -- making it incredibly hard to do anything with the message (yes, it might be obvious when viewed in certain circumstances, but when reviewing the argocd-repo-server output, that information is definitely not readily available)

To Reproduce

  1. have some CMPs that are declared (but likely not completely working)
  2. have a number of applications that want to use those various plugins
  3. view the logs for argocd-repo-server (I'm using Google Cloud's Logs Explorer, but you can experience this by using ArgoCD to view the logs for an individual argocd-repo-server pod / sidecar pod, or k9s to do the same)

    resource.type="k8s_container"
    resource.labels.namespace_name="argocd"
    labels.k8s-pod/app_kubernetes_io/instance="argocd"
    labels.k8s-pod/app_kubernetes_io/name="argocd-repo-server"
    severity="ERROR"

Expected behavior

  1. consistently use couldn't/could not (probably always avoid the abbreviation?)
  2. report the app name in messages
  3. don't say plugin sidecar failed when no sidecar could be found, it should probably say could not find a sidecar or could not found a matching sidecar or could not find a sidecar cmp plugin or ...

Screenshots

Version

{
    "Version": "v2.6.0+8238b53.dirty",
    "BuildDate": "2023-01-25T15:13:11Z",
    "GitCommit": "8238b53da09f2ca7dc2f0b3b3dcb9579866d148e",
    "GitTreeState": "dirty",
    "GoVersion": "go1.19.5",
    "Compiler": "gc",
    "Platform": "linux/amd64",
    "KustomizeVersion": "v4.5.7 2022-08-02T16:35:54Z",
    "HelmVersion": "v3.10.3+g835b733",
    "KubectlVersion": "v0.24.2",
    "JsonnetVersion": "v0.19.1"
}

Logs

error="Manifest generation error (cached): plugin sidecar failed. couldn't find cmp-server plugin with name dhall-to-yaml supporting the given repository"
error="Manifest generation error (cached): plugin sidecar failed. could not find plugin supporting the given repository"
Thedarkmatter10 commented 1 year ago

Hii @jsoref i want to fix this issue.

jsoref commented 1 year ago

@Thedarkmatter10 that'd be wonderful as we're currently tripping over these errors and we have less technical users who'd definitely benefit from the improved output (heck, I'd really benefit from it).

If you need help, please visit slack