Skip to content

Conversation

@pared
Copy link
Contributor

@pared pared commented Apr 23, 2019

  • Have you followed the guidelines in our
    Contributing document?

  • Does your PR affect documented changes or does it add new functionality
    that should be documented? If yes, have you created a PR for
    dvc.org documenting it or at
    least opened an issue for it? If so, please add a link to it.


Fixes #1890

Example:
https://asciinema.org/a/2XsHkAUcUfx1aHfmUV7atnpoJ

@pared pared force-pushed the 1890 branch 2 times, most recently from 8b8737d to f91856a Compare April 23, 2019 02:47
@shcheklein
Copy link
Contributor

@pared @efiop slow_checkout_warning - I think we should take into account other case like add, import - etc. Probably there should be a single option and a single warning for all of them.

@pared
Copy link
Contributor Author

pared commented Apr 24, 2019

Modified behaviour to analyze linking time, added asciinema example to this PR and issue

@pared pared requested a review from efiop April 24, 2019 02:23
@pared pared changed the title [WIP] checkout: different cache link types info on long lasting checkout checkout: different cache link types info on long lasting checkout Apr 24, 2019
@pared pared changed the title checkout: different cache link types info on long lasting checkout link: different cache link types info on long lasting linking Apr 24, 2019
@pared pared changed the title link: different cache link types info on long lasting linking remote: local: different cache link types info on long lasting linking Apr 24, 2019
@efiop
Copy link
Contributor

efiop commented Apr 24, 2019

@pared please rebase.

@pared pared force-pushed the 1890 branch 3 times, most recently from 484c699 to 979d993 Compare April 24, 2019 17:22
dvc/stage.py Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

So now it will print a warning for each stage that it checks out? 🙂

@pared pared changed the title remote: local: different cache link types info on long lasting linking repo: different cache link types info on long lasting operations Apr 25, 2019
Copy link
Contributor

Choose a reason for hiding this comment

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

All caps is usually used for constants, so if you wish to modify it you should probably not use all caps, since it is no longer a constant :)

Copy link
Contributor

@efiop efiop Apr 25, 2019

Choose a reason for hiding this comment

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

why not just use with caplog.at_level(INFO) ?

Copy link
Contributor

Choose a reason for hiding this comment

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

does it actually need to know remote_local? Or should it simply be (self, *args, **kwargs)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it can be self, I just named it to preserve information what user can expect here

Copy link
Contributor

Choose a reason for hiding this comment

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

@pared not sure I follow. remote_local is not used, you are just passing it through, aren't you? If so, your __call__ doesn't care about it.

Copy link
Contributor Author

@pared pared Apr 25, 2019

Choose a reason for hiding this comment

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

Oh, you are right, it matters only for guard, not for decorator class.

@pared pared force-pushed the 1890 branch 2 times, most recently from 7554469 to dab832c Compare April 25, 2019 18:28
@pared pared requested a review from efiop April 25, 2019 18:40
Copy link
Contributor

@efiop efiop Apr 25, 2019

Choose a reason for hiding this comment

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

So is this needed now? At least the naming :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you even need a mock for it though? You are passing it as a function that your decorator should wrap and call, but I don't see you doing anything with it later.

Copy link
Contributor Author

@pared pared Apr 25, 2019

Choose a reason for hiding this comment

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

I will change it so that we can make sure that arguments are passed properly

@pared pared force-pushed the 1890 branch 5 times, most recently from 90cce16 to 7502ae3 Compare April 26, 2019 02:02
@pared pared requested a review from efiop April 26, 2019 03:51
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels like the logic is backwards. Shouldn't was_displayed be False by default? And when it is displayed then it should set was_displayed to True? Or am I missing something?

Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

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

Thank you! :)

@efiop efiop merged commit 435095e into treeverse:master Apr 29, 2019
@pared pared deleted the 1890 branch November 12, 2019 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

checkout: print reminder of other link types on default link cache

3 participants