Skip to content

Conversation

@sadielbartholomew
Copy link
Contributor

@sadielbartholomew sadielbartholomew commented Oct 30, 2019

Replace generic locked checkout warning with an information report on return when 'dvc pull' is run at import stage.

Related to #2685.

  • 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?
    [It does not for both cases.]


The new output, after the minimal steps to recreate as outlined in the Issue to close, is:

$ dvc pull
Data retrieved successfully from DVC remote storage.

@shcheklein
Copy link
Contributor

@sadielbartholomew thanks! let's for now just start with something simple like Data retrieved successfully from DVC remote storage. That additional report goes too away from what we have for other commands, also, I'm not sure that it's that useful to repeat this information (that you should know anyway). What would be useful is to show some basic stats - how many files, directories, size, etc. And it can be part of the message, not a separate table.

For the warning itlsef. It looks like it's being used in dvc checkout (and dvc pull is using the same set of functions internally), is it correct? Then either I'm missing something or I don't understand why do we show this warning at all while actually performing checkout?

@sadielbartholomew
Copy link
Contributor Author

Thanks for the clarification @shcheklein, it makes it easier to know more specifically what you want to resolve the Issue.

That additional report goes too away from what we have for other commands, also, I'm not sure that it's that useful to repeat this information (that you should know anyway). What would be useful is to show some basic stats - how many files, directories, size, etc. And it can be part of the message, not a separate table.

Sure, that makes sense. I read through #2667 as referenced in the Issue but was not sure what sort of "stats" would be useful. I'll squash in a new commit to change the report according to your requests above, & using those three stats you suggest. I can always add more afterwards if you think it would help.

For the warning itlsef. It looks like it's being used in dvc checkout (and dvc pull is using the same set of functions internally), is it correct?

Yes, the warning does emerge from the call to checkout (I am sure because there are three locations containing that warning from a grep & I added some random text to each in testing to trace it).

Then either I'm missing something or I don't understand why do we show this warning at all while actually performing checkout?

So, you prefer to just remove the warning from checkout altogether? From the context I read I thought it might need to be left in for other usage of checkout, but I'm more than happy to change to remove it completely.

@shcheklein
Copy link
Contributor

So, you prefer to just remove the warning from checkout altogether? From the context I read I thought it might need to be left in for other usage of checkout, but I'm more than happy to change to remove it completely.

@efiop could you chime in and shed some light why do we show that warning even though checkout is happening nonetheless.

Change messages output after return of some commands:

* Remove warning for 'dvc checkout' & commands calling it under the hood
* Add an informational message output for 'dvc pull' command

Fixes treeverse#2685.
dvc/repo/pull.py Outdated
recursive=recursive,

)
logger.info("Data retrieved successfully from DVC remote storage.")
Copy link
Contributor

Choose a reason for hiding this comment

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

qq - can we analyze results of self._fetch (processed_files_count in this case) and self._checkout to show a different message if nothing has changed or there are no files to process?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sure. Sorry I was delayed in writing up the message below to say I will start adding in the stats information tomorrow, as don't have time tonight but wanted to address the first set of comments to being with. Thanks again for your feedback.

Copy link
Contributor

@shcheklein shcheklein left a comment

Choose a reason for hiding this comment

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

looks great! thanks @sadielbartholomew . Just one minor question to address.

@sadielbartholomew
Copy link
Contributor Author

I've just reverted the PR proposed code changes to the state where the warning has been removed for dvc checkout & where dvc pull returns (& logs as info) the message "Data retrieved successfully from DVC remote storage.", but I haven't yet had time to add in the stats. I'll get those added tomorrow, & if not at the weekend. Thanks for your patience.

@shcheklein
Copy link
Contributor

@sadielbartholomew absolutely! and thank for doing this 🙏

@efiop
Copy link
Contributor

efiop commented Nov 1, 2019

@sadielbartholomew Sorry for jumping in, but I've decided to adjust your PR a bit to get that warning removal quickly merged :) Please open a new PR for #2685 Also, I've noticed that you had your patch formatting broken, please refer to our contrib guide and install pre-commit hooks so they handle that automatically. Thanks! 🙂

@efiop efiop merged commit 7ecbdab into treeverse:master Nov 1, 2019
@sadielbartholomew
Copy link
Contributor Author

@sadielbartholomew Sorry for jumping in, but I've decided to adjust your PR a bit to get that warning removal quickly merged :)

No problem, thanks. Also, sorry, if I had known there was need to get the warning removed quickly I would have prioritised this over my other (non-work) dev.

Please open a new PR for #2685 Also, I've noticed that you had your patch formatting broken, please refer to our contrib guide and install pre-commit hooks so they handle that automatically. Thanks! 🙂

Sure, I'll heed that advice & try to get the PR in shortly (though I might leave it until next week now there is less rush, without an open PR taking up reviewer time & effort).

@efiop
Copy link
Contributor

efiop commented Nov 2, 2019

@sadielbartholomew No rush at all! Thank you so much for contributing! 🙏

@sadielbartholomew
Copy link
Contributor Author

No problems, thanks for being so helpful & welcoming :)

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.

3 participants