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 checkout callback during add/commit #9445

Merged
merged 2 commits into from
May 12, 2023

Conversation

skshetry
Copy link
Member

@skshetry skshetry commented May 12, 2023

@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Patch coverage: 88.23% and project coverage change: -0.24 ⚠️

Comparison is base (2342099) 91.59% compared to head (a8716e2) 91.35%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9445      +/-   ##
==========================================
- Coverage   91.59%   91.35%   -0.24%     
==========================================
  Files         488      488              
  Lines       38090    38101      +11     
  Branches     5462     5464       +2     
==========================================
- Hits        34888    34807      -81     
- Misses       2637     2710      +73     
- Partials      565      584      +19     
Impacted Files Coverage Δ
dvc/repo/worktree.py 9.72% <0.00%> (-0.05%) ⬇️
dvc/output.py 89.80% <100.00%> (+0.26%) ⬆️

... and 23 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines +897 to +899
# callback passed act as a aggregate callback.
# do not let checkout to call set_size and change progressbar.
class CallbackProxy(Callback):
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't like this that it passes an aggregated callback, but this seemed easier to do for now.

@skshetry skshetry changed the title fix checkout callback fix checkout callback during add/commit May 12, 2023
@skshetry
Copy link
Member Author

skshetry commented May 12, 2023

@efiop, I am getting:

dvc/repo/worktree.py: note: In function "push_worktree":
dvc/repo/worktree.py:176:27: error: Unsupported operand types for + ("int" and
"Dict[str, List[Change]]")  [operator]
                    pushed += checkout(
                              ^
Found 1 error in 1 file (checked 283 source files

What is the equivalent to get total no of push now?

@efiop
Copy link
Contributor

efiop commented May 12, 2023

@skshetry Just sum up all the changes (it returns a dict of lists, just sum up length of all lists) for now. That worktree code will go away soon in #9424 anyway.

@skshetry
Copy link
Member Author

There's unchanged too, right?

@efiop
Copy link
Contributor

efiop commented May 12, 2023

@skshetry No, this is index diff(checkout really) not hashfile diff, it has with_unchanged as an option that is not always turned on (at least right now).

@skshetry
Copy link
Member Author

Thanks, updated.

@skshetry skshetry merged commit d08c85f into iterative:main May 12, 2023
@skshetry skshetry deleted the fix-checkout-callback branch May 12, 2023 12:29
@skshetry skshetry added enhancement Enhances DVC ui user interface / interaction A: cli Related to the CLI labels May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: cli Related to the CLI enhancement Enhances DVC ui user interface / interaction
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

add: broken progress bar during relink/checkout
2 participants