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

feedback.py: Don't use f-strings in logger #1622

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tisnik
Copy link
Contributor

@tisnik tisnik commented Sep 18, 2024

Description

feedback.py: Don't use f-strings in logger

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)

@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.88%. Comparing base (32b78e7) to head (24d8399).
Report is 17 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1622      +/-   ##
==========================================
- Coverage   94.89%   94.88%   -0.01%     
==========================================
  Files          60       60              
  Lines        2685     2681       -4     
==========================================
- Hits         2548     2544       -4     
  Misses        137      137              
Files with missing lines Coverage Δ
ols/app/endpoints/feedback.py 100.00% <100.00%> (ø)

@tisnik
Copy link
Contributor Author

tisnik commented Sep 18, 2024

/approve

@tisnik
Copy link
Contributor Author

tisnik commented Sep 18, 2024

/retest

Copy link

openshift-ci bot commented Sep 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tisnik

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 18, 2024
@asamal4
Copy link
Contributor

asamal4 commented Sep 19, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 19, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 19, 2024
@onmete
Copy link
Contributor

onmete commented Sep 19, 2024

/hold

What is wrong with fstrings?

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 19, 2024
@asamal4
Copy link
Contributor

asamal4 commented Sep 19, 2024

/hold

What is wrong with fstrings?

@onmete https://docs.astral.sh/ruff/rules/logging-f-string/

@onmete
Copy link
Contributor

onmete commented Sep 19, 2024

I understand that, but using fstrings is generally more convenient and readable. The performance impact of evaluating fstring when logging is set to a higher level is less than negligible.

It is recommended by the logging, but the community is split on this topic. To me, readability has a better value here.

Either way, we should be consistent in the logging. I see we have both approaches in our code (for different levels). This PR should unify it across the whole codebase and not just small part of it - this is unnecessarily atomic change, especially with our problems/waiting times on CI.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 19, 2024
Copy link

openshift-ci bot commented Sep 19, 2024

New changes are detected. LGTM label has been removed.

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 19, 2024
@tisnik
Copy link
Contributor Author

tisnik commented Sep 19, 2024

Either way, we should be consistent in the logging. I see we have both approaches in our code (for different levels). This PR should unify it across the whole codebase and not just small part of it - this is unnecessarily atomic change, especially with our problems/waiting times on CI.

we are fixing it everywhere as time constraints allow us

@onmete
Copy link
Contributor

onmete commented Sep 19, 2024

Isn't it like 30 minutes at most to change it everywhere?

Copy link

openshift-ci bot commented Oct 4, 2024

@tisnik: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-ols-cluster-4-17 24d8399 link true /test e2e-ols-cluster-4-17

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants