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

config: don't look for .dvc dir implicitly #9274

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Mar 29, 2023

Currently if dvc_dir doesn't exists (e.g. we are creating an uninitialized repo), config will try looking for .dvc dir in the current directory, which might be inside of another dvc repository resulting in mixed configs.

Use explicit from_cwd method to make Config try to find repo configs if available to avoid the usage mixup.

Related #8789
Related #9246

Currently if dvc_dir doesn't exists (e.g. we are creating an uninitialized
repo), config will try looking for `.dvc` dir in the current directory,
which might be inside of another dvc repository resulting in mixed configs.

Use explicit `from_cwd` method to make `Config` try to find repo configs
if available to avoid the usage mixup.
@efiop efiop marked this pull request as ready for review March 29, 2023 13:07
@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (fe6d543) 92.85% compared to head (c134293) 92.86%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9274   +/-   ##
=======================================
  Coverage   92.85%   92.86%           
=======================================
  Files         459      459           
  Lines       37144    37149    +5     
  Branches     5356     5357    +1     
=======================================
+ Hits        34490    34498    +8     
+ Misses       2122     2120    -2     
+ Partials      532      531    -1     
Impacted Files Coverage Δ
dvc/analytics.py 92.95% <ø> (+2.81%) ⬆️
dvc/updater.py 90.19% <ø> (ø)
dvc/commands/config.py 91.73% <100.00%> (ø)
dvc/config.py 98.53% <100.00%> (+0.02%) ⬆️
dvc/parsing/interpolate.py 100.00% <100.00%> (ø)
dvc/repo/__init__.py 93.55% <100.00%> (+0.03%) ⬆️
tests/func/test_config.py 100.00% <100.00%> (ø)
tests/unit/test_config.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

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

@efiop efiop added the bug Did we break something? label Mar 29, 2023
@efiop efiop assigned efiop and unassigned efiop Mar 29, 2023
@efiop efiop merged commit 35bb261 into iterative:main Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Did we break something?
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant