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: Load root dir before loading config #2266

Conversation

fredcarle
Copy link
Collaborator

Relevant issue(s)

Resolves #2264

Description

This PR ensures that the root dir path gets defined prior to looking for a config file. It fixes an issue where the config file wasn't being loaded on node start.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

manually tested that a change in the config file would be reflected in the node behaviour.

Specify the platform(s) on which this was tested:

  • MacOS

@fredcarle fredcarle added bug Something isn't working area/config Related to configuration labels Jan 29, 2024
@fredcarle fredcarle added this to the DefraDB v0.10 milestone Jan 29, 2024
@fredcarle fredcarle requested a review from a team January 29, 2024 19:47
@fredcarle fredcarle self-assigned this Jan 29, 2024
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (6f53af2) 74.14% compared to head (69846b4) 74.11%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2266      +/-   ##
===========================================
- Coverage    74.14%   74.11%   -0.03%     
===========================================
  Files          256      256              
  Lines        25767    25767              
===========================================
- Hits         19104    19095       -9     
- Misses        5351     5356       +5     
- Partials      1312     1316       +4     
Flag Coverage Δ
all-tests 74.11% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
config/config.go 74.65% <ø> (+0.52%) ⬆️
cli/utils.go 44.29% <0.00%> (-1.98%) ⬇️

... and 10 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f53af2...69846b4. Read the comment docs.

Copy link
Member

@nasdf nasdf left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

LGTM

@fredcarle fredcarle merged commit 4da6ed0 into sourcenetwork:develop Jan 29, 2024
32 of 33 checks passed
@fredcarle fredcarle deleted the fredcarle/fix/i2264-set-rootdir-on-load-config branch January 29, 2024 21:54
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
## Relevant issue(s)

Resolves sourcenetwork#2264 

## Description

This PR ensures that the root dir path gets defined prior to looking for
a config file. It fixes an issue where the config file wasn't being
loaded on node start.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config Related to configuration bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config file not being loaded on start
3 participants