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: use debug level for readiness checks logs #5029

Merged
merged 2 commits into from
Oct 31, 2023
Merged

Conversation

czeslavo
Copy link
Contributor

What this PR does / why we need it:

It turns out s.logger.V(util.DebugLevel).Error(err, "...") doesn't result in a log message with a debug, but an error level. The PR fixes logs that were intended to use debug-level with the error as a log field.

Which issue this PR fixes:

Customer reported

{"error":"making HTTP request: Get \"https://172.17.1.180:8444/status\": context deadline exceeded","level":"error","logger":"setup.readiness-checker","msg":"already created client for \"https://172.17.1.180:8444/\" is not ready, moving to pending","time":"2023-10-31T09:52:17Z"}

kind of logs presence repeating quite often. Error logs should not be used for that kind of message as they're signaling expected situations that users should not be worried about.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

Copy link
Member

@programmer04 programmer04 left a comment

Choose a reason for hiding this comment

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

It's exactly like you described, calling Error always overwrites the level to error

internal/clients/readiness.go Outdated Show resolved Hide resolved
internal/clients/readiness.go Outdated Show resolved Hide resolved
@czeslavo czeslavo marked this pull request as ready for review October 31, 2023 11:44
@czeslavo czeslavo requested a review from a team as a code owner October 31, 2023 11:44
@czeslavo czeslavo self-assigned this Oct 31, 2023
@czeslavo czeslavo added the fix label Oct 31, 2023
@czeslavo czeslavo added this to the KIC v3.0.0 milestone Oct 31, 2023
@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (10879ed) 75.4% compared to head (9f2b6c0) 75.2%.

❗ Current head 9f2b6c0 differs from pull request most recent head 9b4e3a0. Consider uploading reports for the commit 9b4e3a0 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #5029     +/-   ##
=======================================
- Coverage   75.4%   75.2%   -0.3%     
=======================================
  Files        167     167             
  Lines      18796   18796             
=======================================
- Hits       14184   14144     -40     
- Misses      3787    3830     +43     
+ Partials     825     822      -3     
Files Coverage Δ
internal/clients/readiness.go 89.8% <100.0%> (ø)
internal/dataplane/sendconfig/backoff_strategy.go 84.6% <100.0%> (ø)

... and 10 files with indirect coverage changes

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

@czeslavo czeslavo enabled auto-merge (squash) October 31, 2023 12:09
@czeslavo czeslavo merged commit afe12ed into main Oct 31, 2023
52 checks passed
@czeslavo czeslavo deleted the fix/debug-logs branch October 31, 2023 12:10
@github-actions
Copy link

The backport to release/2.12.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/2.12.x release/2.12.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.12.x
# Create a new branch
git switch --create backport-5029-to-release/2.12.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 afe12ed7a15299de3343132002c2451fe8aa42cb
# Push it to GitHub
git push --set-upstream origin backport-5029-to-release/2.12.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.12.x

Then, create a pull request where the base branch is release/2.12.x and the compare/head branch is backport-5029-to-release/2.12.x.

czeslavo added a commit that referenced this pull request Oct 31, 2023
czeslavo added a commit that referenced this pull request Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants