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: do not instantiate logger inside a method #2195

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

leninmehedy
Copy link
Member

@leninmehedy leninmehedy commented Mar 13, 2024

Description:
This PR removes the problematic instantiation of a logger inside a method that is invoked repeatedly.

Related issue(s):

Fixes #2194

Notes for reviewer:

I couldn't run the integration tests as there were no instruction in the README. I saw errors when I ran task test locally: Error: Failed to construct client for IntegrationTestEnv

However, please let me know if anything else I should test/modify.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Lenin Mehedy <lenin.mehedy@swirldslabs.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.47%. Comparing base (e4a80a1) to head (d875cdd).

❗ Current head d875cdd differs from pull request most recent head 73ec899. Consider uploading reports for the commit 73ec899 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2195      +/-   ##
===========================================
- Coverage    84.48%   84.47%   -0.02%     
===========================================
  Files          305      305              
  Lines        76259    76231      -28     
===========================================
- Hits         64430    64394      -36     
- Misses       11829    11837       +8     

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

@agadzhalov agadzhalov self-requested a review March 14, 2024 07:26
@svetoslav-nikol0v
Copy link
Contributor

Hey leninmehedy,
This logger was only added to track the behavior after the fix we added. We agree to remove it at all. Will add a commit for this.

Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Copy link

sonarcloud bot commented Mar 14, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@agadzhalov agadzhalov left a comment

Choose a reason for hiding this comment

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

LGTM

@svetoslav-nikol0v svetoslav-nikol0v merged commit 6b985e6 into develop Mar 14, 2024
7 checks passed
@svetoslav-nikol0v svetoslav-nikol0v deleted the 2194-remove-logger-instantiation branch March 14, 2024 08:54
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.

A new logger is instantiated every time a method is invoked
4 participants