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: init jobsdb logger at the right place #2729

Merged
merged 1 commit into from
Nov 23, 2022
Merged

Conversation

chandumlg
Copy link
Member

Description

There are references to assertError function in init function. assertError uses logger to log some internal data structures. But logger is initialised in the end of init. This is causing a nil pointer exception in case of errors in init function.

In this pr, initing the logger in the beginning of init.

Notion Ticket

https://www.notion.so/rudderstacks/8aac9087df644365acdf64e28e290153?v=6e06b0a5ade24f0aa5ffe05dc2972e84&p=69fbdd52094d428583317ad0a5dcc64f&pm=s

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Base: 45.83% // Head: 45.71% // Decreases project coverage by -0.11% ⚠️

Coverage data is based on head (fabf8cf) compared to base (bc6afca).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2729      +/-   ##
==========================================
- Coverage   45.83%   45.71%   -0.12%     
==========================================
  Files         295      295              
  Lines       48503    48503              
==========================================
- Hits        22233    22175      -58     
- Misses      24867    24928      +61     
+ Partials     1403     1400       -3     
Impacted Files Coverage Δ
jobsdb/jobsdb.go 72.97% <100.00%> (-0.30%) ⬇️
processor/stash/stash.go 44.56% <0.00%> (-22.10%) ⬇️
...rvices/streammanager/kafka/client/testutil/util.go 66.99% <0.00%> (-3.89%) ⬇️
config/backend-config/namespace_config.go 67.00% <0.00%> (-3.00%) ⬇️
services/db/recovery.go 50.60% <0.00%> (-1.21%) ⬇️
jobsdb/backup.go 76.30% <0.00%> (-0.35%) ⬇️
processor/processor.go 86.40% <0.00%> (+0.41%) ⬆️
router/manager/manager.go 100.00% <0.00%> (+3.29%) ⬆️
config/backend-config/noop.go 42.10% <0.00%> (+42.10%) ⬆️

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

4 participants