argoproj / argo-cd

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

ArgoCD cli always sends GOMAXPROCS log message to STDERR #20690

Closed jmf-mordis closed 1 day ago

jmf-mordis commented 6 days ago

Checklist:

Describe the bug

Issue only present in the argocd cli 2.13.0, tested on argocd-darwin-arm64 and argocd-linux-amd64

All argocd cli commands I tried send to STDERR this kind of message:

2024/11/07 10:21:35 maxprocs: Leaving GOMAXPROCS=12: CPU quota undefined

If you check that the STDERR of your argocd cli command is empty in your CI/CD, this new version produces always an issue because it always sends this message to STDERR, you can only rely on the status code from now on. I don't think that this a relevant message to send to STDERR.

I think that it is not an expected change, checking this code and this PR.

Setting the GOMAXPROCS env variable doesn't fix the issue, it just makes the argo cli send this other message to STDERR:

GOMAXPROCS=12 argocd version
2024/11/07 10:57:35 maxprocs: Honoring GOMAXPROCS="12" as set in environment

To Reproduce

Just invoking an argocd version, argocd app list or an argocd app diff is enough to reproduce the issue.

argocd app list
2024/11/07 10:52:34 maxprocs: Leaving GOMAXPROCS=12: CPU quota undefined

Expected behavior

STDERR of the argocd cli is empty then there is no relevant error. (I don't consider the GOMAXPROCS logs a relevant error).

Screenshots

Version

(The issue is also in the argocd version )

 argocd version                                                                                                                                                                          2 ✘ 
2024/11/07 10:54:02 maxprocs: Leaving GOMAXPROCS=12: CPU quota undefined
argocd: v2.13.0+347f221
  BuildDate: 2024-11-04T12:29:51Z
  GitCommit: 347f221adba5599ef4d5f12ee572b2c17d01db4d
  GitTreeState: clean
  GoVersion: go1.22.8
  Compiler: gc
  Platform: darwin/arm64

Logs

Paste any relevant application logs here.
Andrew-Jayne commented 5 days ago

Also able to replicate

If anyone thinks that it is the OhMyZsh Plugin it is just argoCD CLI itself,

➜  ~ argocd version
2024/11/07 20:30:46 maxprocs: Leaving GOMAXPROCS=14: CPU quota undefined
argocd: v2.13.0+347f221
  BuildDate: 2024-11-04T15:31:13Z
  GitCommit: 347f221adba5599ef4d5f12ee572b2c17d01db4d
  GitTreeState: clean
  GoVersion: go1.23.2
  Compiler: gc
  Platform: darwin/arm64
FATA[0000] Argo CD server address unspecified           
➜  ~ argocd
2024/11/07 20:30:55 maxprocs: Leaving GOMAXPROCS=14: CPU quota undefined
pasha-codefresh commented 5 days ago

This issue exists in release-2.13, but not exists in master, probably we just didnt cherry-pick the fix

pasha-codefresh commented 5 days ago

https://github.com/argoproj/argo-cd/pull/20069

ishitasequeira commented 1 day ago

Fix has been merged.