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

repo: brancher/switch: reset parsed fields #9758

Merged
merged 1 commit into from
Jul 25, 2023
Merged

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Jul 25, 2023

Related #9754 and fixes dvc fetch.

Related iterative#9754 and fixes `dvc fetch`.
@efiop efiop changed the title repo: brancher: reset parsed fields repo: brancher/switch: reset parsed fields Jul 25, 2023
@efiop efiop added the bugfix fixes bug label Jul 25, 2023
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (65ba9ba) 90.46% compared to head (6589e1d) 90.48%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9758      +/-   ##
==========================================
+ Coverage   90.46%   90.48%   +0.01%     
==========================================
  Files         480      480              
  Lines       36588    36586       -2     
  Branches     5263     5265       +2     
==========================================
+ Hits        33101    33104       +3     
+ Misses       2889     2886       -3     
+ Partials      598      596       -2     
Files Changed Coverage Δ
dvc/repo/__init__.py 94.47% <100.00%> (+0.05%) ⬆️
dvc/repo/brancher.py 100.00% <100.00%> (ø)
tests/func/test_data_cloud.py 99.42% <100.00%> (+<0.01%) ⬆️
tests/func/test_gc.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

Comment on lines 104 to +106
self.root_dir = saved_root
self.dvc_dir = saved_dvc_dir
self._reset() # pylint: disable=protected-access
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clunky and brancher should go away in favor of switch/etc, but this will do for now.

@@ -203,7 +203,8 @@ def test_verify_hashes(tmp_dir, scm, dvc, mocker, tmp_path_factory, local_remote
# Removing cache will invalidate existing state entries
dvc.cache.local.clear()

dvc.config["remote"]["upstream"]["verify"] = True
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In-memory changes to config can't work between command sessions, the logic is really the same as with us resetting index, because other commands/instances could modify the config while we are not holding a lock. Same in changed tests below.

@efiop efiop marked this pull request as ready for review July 25, 2023 10:23
@efiop efiop merged commit 73dad47 into iterative:main Jul 25, 2023
@efiop efiop self-assigned this Jul 25, 2023
efiop added a commit to efiop/dvc that referenced this pull request Aug 10, 2023
This used to work like so but by accident, when we didn't reload config
at all when collecting other revisions.

Regression from iterative#9758
efiop added a commit that referenced this pull request Aug 10, 2023
This used to work like so but by accident, when we didn't reload config
at all when collecting other revisions.

Regression from #9758
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix fixes bug
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant