Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable automaxprocs logging #20069

Merged
merged 7 commits into from
Oct 9, 2024
Merged

Conversation

nitishfy
Copy link
Member

Closes #20066

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 Toolchain Guide
  • 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).

@nitishfy nitishfy requested a review from a team as a code owner September 24, 2024 05:51
Copy link

bunnyshell bot commented Sep 24, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

bunnyshell bot commented Sep 24, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

cmd/argocd/commands/root.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 55.96%. Comparing base (5f8de97) to head (9c23436).
Report is 53 commits behind head on master.

Files with missing lines Patch % Lines
cmd/main.go 28.57% 5 Missing ⚠️
cmd/util/app.go 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #20069      +/-   ##
==========================================
+ Coverage   55.95%   55.96%   +0.01%     
==========================================
  Files         322      322              
  Lines       44544    44715     +171     
==========================================
+ Hits        24923    25024     +101     
- Misses      17055    17101      +46     
- Partials     2566     2590      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cmd/main.go Show resolved Hide resolved
@nitishfy nitishfy requested a review from gdsoumya October 1, 2024 09:06
@reggie-k
Copy link
Member

reggie-k commented Oct 1, 2024

I think that it is useful to log the GOMAXPROCS after it was auto-set by the automaxprocs.
The reason is that now, when using automaxprocs, it's value would probably be changed for pods, and when investigating resource consumption / performance issues, it might be important to know what it was set to.
Since the error for local environments / argocd cli commands is obviously annoying, disabling the default logging like you did, makes total sense, and I suggest to add an explicit DEBUG-level log for CPU and GOMAXPROCS values similarly to here afterwards:
uber-go/automaxprocs#18 (comment)
Then it can be tested on both cli commands and argocd container startups to see whether acceptable.
WDYT? I am definitely open to other opinions :)

@gdsoumya
Copy link
Member

gdsoumya commented Oct 1, 2024

@reggie-k that's a good point, we can try something like maxprocs.Set(maxprocs.Logger(log.Debugf)) @nitishfy

cmd/main.go Outdated Show resolved Hide resolved
cmd/main.go Outdated Show resolved Hide resolved
cmd/main.go Outdated Show resolved Hide resolved
Signed-off-by: nitishfy <justnitish06@gmail.com>

fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

move maxprocs to main.go

Signed-off-by: nitishfy <justnitish06@gmail.com>

move set auto max procs to a function

Signed-off-by: nitishfy <justnitish06@gmail.com>

add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: nitishfy <justnitish06@gmail.com>
@nitishfy
Copy link
Member Author

nitishfy commented Oct 4, 2024

@agaudreault can you review the PR now?

cmd/main.go Outdated Show resolved Hide resolved
Signed-off-by: nitishfy <justnitish06@gmail.com>
@nitishfy
Copy link
Member Author

nitishfy commented Oct 8, 2024

@agaudreault PTAL!

@agaudreault agaudreault enabled auto-merge (squash) October 8, 2024 23:58
Signed-off-by: nitishfy <justnitish06@gmail.com>
auto-merge was automatically disabled October 9, 2024 10:18

Head branch was pushed to by a user without write access

@gdsoumya gdsoumya enabled auto-merge (squash) October 9, 2024 10:20
@gdsoumya gdsoumya merged commit cfa1c89 into argoproj:master Oct 9, 2024
26 checks passed
@nitishfy nitishfy deleted the fix-maxprocs branch October 10, 2024 09:36
ali-hamza-noor pushed a commit to ali-hamza-noor/argo-cd that referenced this pull request Oct 10, 2024
* disable automaxprocs logging

Signed-off-by: nitishfy <justnitish06@gmail.com>

fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

move maxprocs to main.go

Signed-off-by: nitishfy <justnitish06@gmail.com>

move set auto max procs to a function

Signed-off-by: nitishfy <justnitish06@gmail.com>

add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add unit test

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint issues

Signed-off-by: nitishfy <justnitish06@gmail.com>

---------

Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: alnoor <alihamzanoor99@gmail.com>
austin5219 pushed a commit to austin5219/argo-cd that referenced this pull request Oct 16, 2024
* disable automaxprocs logging

Signed-off-by: nitishfy <justnitish06@gmail.com>

fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

move maxprocs to main.go

Signed-off-by: nitishfy <justnitish06@gmail.com>

move set auto max procs to a function

Signed-off-by: nitishfy <justnitish06@gmail.com>

add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add unit test

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint issues

Signed-off-by: nitishfy <justnitish06@gmail.com>

---------

Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: austin5219 <3936059+austin5219@users.noreply.github.com>
@gdsoumya
Copy link
Member

/cherry-pick release-2.13

@pasha-codefresh
Copy link
Member

/cherry-pick release-2.13

pasha-codefresh pushed a commit to pasha-codefresh/argo-cd that referenced this pull request Nov 8, 2024
* disable automaxprocs logging

Signed-off-by: nitishfy <justnitish06@gmail.com>

fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

move maxprocs to main.go

Signed-off-by: nitishfy <justnitish06@gmail.com>

move set auto max procs to a function

Signed-off-by: nitishfy <justnitish06@gmail.com>

add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add unit test

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint issues

Signed-off-by: nitishfy <justnitish06@gmail.com>

---------

Signed-off-by: nitishfy <justnitish06@gmail.com>
(cherry picked from commit cfa1c89)
pasha-codefresh added a commit that referenced this pull request Nov 8, 2024
* fix: disable automaxprocs logging (#20069)

* disable automaxprocs logging

Signed-off-by: nitishfy <justnitish06@gmail.com>

fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

move maxprocs to main.go

Signed-off-by: nitishfy <justnitish06@gmail.com>

move set auto max procs to a function

Signed-off-by: nitishfy <justnitish06@gmail.com>

add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add unit test

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint issues

Signed-off-by: nitishfy <justnitish06@gmail.com>

---------

Signed-off-by: nitishfy <justnitish06@gmail.com>
(cherry picked from commit cfa1c89)

* fix(ci): ignore temporary files when checking for out of bound symlinks (#20527)

Signed-off-by: cef <moncef.abboud95@gmail.com>

---------

Signed-off-by: cef <moncef.abboud95@gmail.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
Co-authored-by: ABBOUD Moncef <moncef.abboud95@gmail.com>
adriananeci pushed a commit to adriananeci/argo-cd that referenced this pull request Dec 4, 2024
* disable automaxprocs logging

Signed-off-by: nitishfy <justnitish06@gmail.com>

fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

move maxprocs to main.go

Signed-off-by: nitishfy <justnitish06@gmail.com>

move set auto max procs to a function

Signed-off-by: nitishfy <justnitish06@gmail.com>

add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add info log

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint checks

Signed-off-by: nitishfy <justnitish06@gmail.com>

* add unit test

Signed-off-by: nitishfy <justnitish06@gmail.com>

* fix lint issues

Signed-off-by: nitishfy <justnitish06@gmail.com>

---------

Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: Adrian Aneci <aneci@adobe.com>
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.

2.13 RC Argo CD CLI returns
7 participants