GoogleCloudPlatform / gcsfuse

A user-space file system for interacting with Google Cloud Storage
https://cloud.google.com/storage/docs/gcs-fuse
Apache License 2.0
2k stars 413 forks source link

Use a viper instance for deserialization #2078

Closed kislaykishore closed 1 week ago

kislaykishore commented 1 week ago

Using a global viper instance could cause problems since the same viper is shared across the entire application and libraries. This can lead to races. So, use instance level viper.

Description

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - NA
  2. Unit tests - Existing tests should suffice.
  3. Integration tests - NA
codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 15.18987% with 67 lines in your changes missing coverage. Please review.

Project coverage is 72.03%. Comparing base (3995bfb) to head (bb48c34). Report is 1 commits behind head on master.

Files Patch % Lines
cfg/config.go 0.00% 62 Missing :warning:
cmd/root.go 70.58% 2 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2078 +/- ## ========================================== + Coverage 71.98% 72.03% +0.05% ========================================== Files 100 99 -1 Lines 11207 10865 -342 ========================================== - Hits 8067 7827 -240 + Misses 2806 2708 -98 + Partials 334 330 -4 ``` | [Flag](https://app.codecov.io/gh/GoogleCloudPlatform/gcsfuse/pull/2078/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleCloudPlatform) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/GoogleCloudPlatform/gcsfuse/pull/2078/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleCloudPlatform) | `72.03% <15.18%> (+0.05%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GoogleCloudPlatform#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.