Chore: refactor client.download_blob_to_file#1052
Merged
andrewsg merged 7 commits intogoogleapis:tm-metricsfrom Jun 13, 2023
Merged
Chore: refactor client.download_blob_to_file#1052andrewsg merged 7 commits intogoogleapis:tm-metricsfrom
andrewsg merged 7 commits intogoogleapis:tm-metricsfrom
Conversation
…rage into transfer_manager_usage_metrics
andrewsg
reviewed
May 30, 2023
Contributor
andrewsg
left a comment
There was a problem hiding this comment.
We may later have to tune download_to_filename() to put the business logic of opening the file and handling exceptions behind a private barrier, but to keep things simple let's save that for after this PR.
…nto transfer_manager_usage_metrics
andrewsg
requested changes
Jun 9, 2023
Contributor
andrewsg
left a comment
There was a problem hiding this comment.
Other than the unresolved naming question, looks good!
cojenco
reviewed
Jun 9, 2023
Contributor
cojenco
left a comment
There was a problem hiding this comment.
The updated tests using the mock.patch.object context looks good 🙌
Left a few comments. Let me know if you have any questions.
andrewsg
pushed a commit
that referenced
this pull request
Sep 18, 2023
* Refactor client.download_blob_to_file * Chore: clean up code * refactor blob and client unit tests * lint reformat * Rename _prep_and_do_download
cojenco
added a commit
that referenced
this pull request
Oct 19, 2023
* Chore: refactor client.download_blob_to_file (#1052) * Refactor client.download_blob_to_file * Chore: clean up code * refactor blob and client unit tests * lint reformat * Rename _prep_and_do_download * Chore: refactor blob.upload_from_file (#1063) * Refactor client.download_blob_to_file * Chore: clean up code * refactor blob and client unit tests * lint reformat * Rename _prep_and_do_download * Refactor blob.upload_from_file * Lint reformat * feature: add 'command' argument to private upload/download interface (#1082) * Refactor client.download_blob_to_file * Chore: clean up code * refactor blob and client unit tests * lint reformat * Rename _prep_and_do_download * Refactor blob.upload_from_file * Lint reformat * feature: add 'command' argument to private upload/download interface * lint reformat * reduce duplication and edit docstring * feat: add support for custom headers starting with metadata op * add custom headers to downloads in client blob modules * add custom headers to uploads with tests * update mocks and tests * test custom headers support tm mpu uploads * update tm test * update test --------- Co-authored-by: MiaCY <97990237+MiaCY@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.