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(controller): Add klog logrus bridge. Fixes #2707. #2701

Merged
merged 5 commits into from
Apr 11, 2023

Conversation

Sineaggi
Copy link
Contributor

@Sineaggi Sineaggi commented Apr 6, 2023

closes: #2707
closes: #1914

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed my commits with DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

@Sineaggi
Copy link
Contributor Author

Sineaggi commented Apr 6, 2023

Should fix the issue mentioned in #1914

When leader election is enabled there is one line that doesn't follow JSON format.
12:08:56.641662 1 leaderelection.go:248] attempting to acquire leader lease argocd/argo-rollouts-controller-lock...

@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2023

Go Published Test Results

1 948 tests   1 948 ✔️  2m 35s ⏱️
   118 suites         0 💤
       1 files           0

Results for commit ad481b9.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (17cd3ad) 81.47% compared to head (ad481b9) 81.47%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2701   +/-   ##
=======================================
  Coverage   81.47%   81.47%           
=======================================
  Files         133      133           
  Lines       20152    20154    +2     
=======================================
+ Hits        16419    16421    +2     
  Misses       2881     2881           
  Partials      852      852           
Impacted Files Coverage Δ
utils/log/log.go 93.84% <100.00%> (+0.19%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2023

E2E Tests Published Test Results

    4 files      4 suites   3h 30m 56s ⏱️
  96 tests   81 ✔️   5 💤 10
398 runs  366 ✔️ 20 💤 12

For more details on these failures, see this check.

Results for commit ad481b9.

♻️ This comment has been updated with latest results.

Signed-off-by: Clayton Walker <[email protected]>
Signed-off-by: Clayton Walker <[email protected]>
@Sineaggi Sineaggi changed the title fix: add klog logrus bridge fix(controller): Ddd klog logrus bridge. Fixes #2707. Apr 10, 2023
@Sineaggi Sineaggi changed the title fix(controller): Ddd klog logrus bridge. Fixes #2707. fix(controller): Add klog logrus bridge. Fixes #2707. Apr 10, 2023
go.mod Outdated Show resolved Hide resolved
Signed-off-by: Clayton Walker <[email protected]>
@Sineaggi Sineaggi force-pushed the klog-logrus-bridge branch 2 times, most recently from 3676610 to fbb5643 Compare April 11, 2023 00:57
Signed-off-by: Clayton Walker <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented Apr 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Sineaggi
Copy link
Contributor Author

@zachaller thanks for the review. Are there any next steps for me?

@zachaller zachaller merged commit 689182f into argoproj:master Apr 11, 2023
@zachaller
Copy link
Collaborator

@Sineaggi Merged, Thanks for contributing!

@Sineaggi Sineaggi deleted the klog-logrus-bridge branch April 11, 2023 22:59
zachaller pushed a commit that referenced this pull request May 5, 2023
* Add klog logrus bridge

Signed-off-by: Clayton Walker <[email protected]>

* Pull klog bridge out to log util

Signed-off-by: Clayton Walker <[email protected]>

* Upgrade logrusr to v4

Signed-off-by: Clayton Walker <[email protected]>

* Simplify logging

Signed-off-by: Clayton Walker <[email protected]>

---------

Signed-off-by: Clayton Walker <[email protected]>
@zachaller zachaller added the cherry-pick-completed Used once we have cherry picked the PR to all requested releases label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick/release-1.5 cherry-pick-completed Used once we have cherry picked the PR to all requested releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logs from k8s aren't captured by logrus JSON Logging
2 participants