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

feat(storage): refactor to use transport-agnostic interface #6465

Merged
merged 18 commits into from Aug 10, 2022

Conversation

noahdietz
Copy link
Contributor

No description provided.

tritone and others added 14 commits July 26, 2022 14:10
Change production code paths for Composer to use the new transport
agnostic interface.

Required a few setup steps to make tests pass, which will be needed for
other integrations too:
* Add initialization of tc to NewClient
* Add new useGRPC flag to remove switches on tc in Reader/Writer

Also a few cleanups:
* Use EncryptionKey from dstObject
* Use defaultGen instead of hard coded int

Also, a unit test checks that setting Generation with composer causes
a failure. Currently this is enforced by applyConds. I added
a separate validation for this instead, but I could do a pass-
through of the Generation through the interface -- it's just
confusing looking because setting Generation on a new object
is never valid.
This takes out a few lines of boilerplate that will be
present in all top-level methods.
Migrate Copier to use the new transport-agnostic interface.
I found one additional piece of data that needs to be passed back
through the interface in the process (object size).

I removed one integration test. This test is old and currently
calls rewriteObject in a way that an external library user could
not accomplish. I don't think this test adds any value.
* chore(storage): migrate GetServiceAccount

* migrate ListBuckets

* migrate CreateBucket and refactor interface method

* update tests and BucketIterator with retryConfig

* Revert "update tests and BucketIterator with retryConfig"

This reverts commit b7662b4.

* remove unused field and internal method upon migration
* chore(storage): migrate IAM operations

* remove unused field
Migrate ACL ops to the new transport agnostic interface. No
interface changes were necessary for this one and tests pass.
Migrates the Notification APIs to the transport agnostic surface. Integration tests passed and added a check to ensure that AddNotification returns a Notification with a non-empty ID.
* test: update continuous.sh for storage-refactor

* add todo to revert change

Co-authored-by: Chris Cotter <cjcotter@google.com>
Co-authored-by: cojenco <cathyo@google.com>
* chore(storage): migrate GetBucket and DeleteBucket

* migrate remaining bucket methods

* fix merge conflict

Co-authored-by: Chris Cotter <cjcotter@google.com>
Migrate Object metadata operations to transport-agnostic interface. Integration tests pass locally
- GetObject
- UpdateObject
- DeleteObject
Migrate Writer to use the transport-agnostic interface. A few
minor fixes:

* Pass in retry, idempotency and user project via settings rather
than determining below interface.
* Use default generation since this can't be sent for this call.
Migrate the Reader to use the new transport-agnostic interface.
A few minor fixes were required:
* Move validations above interface
* Fix up settings for call
* Add param for sending with accept-encoding: gzip (HTTP only)
* Fix up reader resumption test
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: storage Issues related to the Cloud Storage API. labels Aug 2, 2022
@noahdietz noahdietz changed the title feat(storage): refactor HTTP client code into feat(storage): refactor to use transport-agnostic interface Aug 2, 2022
@noahdietz noahdietz marked this pull request as ready for review August 10, 2022 18:02
@noahdietz noahdietz requested review from a team as code owners August 10, 2022 18:02
Copy link
Contributor

@cojenco cojenco left a comment

Choose a reason for hiding this comment

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

🎉

@noahdietz noahdietz added the automerge Merge the pull request once unit tests and other checks pass. label Aug 10, 2022
@gcf-merge-on-green gcf-merge-on-green bot merged commit d03c3e1 into main Aug 10, 2022
@gcf-merge-on-green gcf-merge-on-green bot deleted the storage-refactor branch August 10, 2022 18:22
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants