Skip to content

fs: add acknowledge_abuse parameter #214

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

Merged
merged 1 commit into from
Jul 22, 2022
Merged

fs: add acknowledge_abuse parameter #214

merged 1 commit into from
Jul 22, 2022

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Jul 21, 2022

Related #62
Pre-requisite for iterative/dvc#7832

@efiop efiop temporarily deployed to internal July 21, 2022 13:51 Inactive
Files identified as `abusive`_ (malware, etc.) are only downloadable by the owner.
If you see a
'This file has been identified as malware or spam and cannot be downloaded'
error, set 'acknowledge_abuse=True' parameter in `GetContentFile()`. By using
Copy link
Contributor Author

@efiop efiop Jul 21, 2022

Choose a reason for hiding this comment

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

Decided not to add this flag to GetContentString for now because it is tiny bit more involved and we have no use for it anyway.

Also didn't add GetContentIOBuffer to this doc, because it is not documented at all yet 🙁

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shcheklein I suppose you meant v2 https://developers.google.com/drive/api/v2/reference/files/get#acknowledgeAbuse . But I'm not sure how useful that is, who cares what we use internally.

@efiop efiop temporarily deployed to internal July 21, 2022 13:55 Inactive
@efiop efiop temporarily deployed to internal July 21, 2022 13:56 Inactive
@efiop efiop temporarily deployed to internal July 21, 2022 14:29 Inactive
@efiop efiop requested a review from shcheklein July 21, 2022 14:49
@@ -167,6 +167,7 @@ def __init__(
client_json_file_path=None,
use_service_account=False,
profile=None,
acknowledge_abuse=False,
Copy link
Member

Choose a reason for hiding this comment

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

style/minor - move trash only nearby to this one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strictly speaking, that would be breaking backwards compatibility. But we can add an *args guard (which is also breaking it but at least only once).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Introducing the guard forces changing tests, which is out of scope here. Can get back to this separately in a followup. For now moved those flags nearby, as requested.

Copy link
Member

@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.

A few comments, nothing major though.

@efiop efiop temporarily deployed to internal July 22, 2022 10:49 Inactive
@efiop efiop temporarily deployed to internal July 22, 2022 10:56 Inactive
@efiop
Copy link
Contributor Author

efiop commented Jul 22, 2022

Happy to address any small things on top.

@efiop efiop merged commit 2e6ac10 into master Jul 22, 2022
@efiop efiop deleted the abuse branch July 22, 2022 11:07
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.

2 participants