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!: [Spanner] Upgrade to PHP V2 #7193
base: main
Are you sure you want to change the base?
Conversation
Core/src/LongRunning/LROTraitV2.php
Outdated
} | ||
|
||
return $this->requestHandler->sendRequest( | ||
OperationsGrpcClient::class, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I am using OperationsGrpcClient
instead of OperationsClient
of the DatabaseAdminClient
.
If DatabaseAdminClient
would have used the V2 OperationsGrpcClient
, I could have simply extracted this from the DatabaseAdminClient->getOperationsClient
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new Operations Client will be released this Friday in #7212 as google/longrunning:0.4.0
843be5e
to
55a81e9
Compare
55a81e9
to
37076aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this is in draft mode, but the design is confusing to me. Do you have a document or anything to describe this approach?
Core/src/LongRunning/LROTraitV2.php
Outdated
* | ||
* This trait should be used by a user-facing client which implements LRO. | ||
*/ | ||
trait LROTraitV2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would try to avoid using version numbers in the class/trait names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me, I will find a better name, how about LROManagerTrait
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manager
would be more for a class than a trait. Something like LROManagementTrait
would make more sense. However, I think the verb is unnecessary. What about simply LongRunningOperationTrait
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LongRunningOperationTrait
sounds great, will change to that name
Core/src/LongRunning/LROTraitV2.php
Outdated
use Google\Cloud\Core\Iterator\ItemIterator; | ||
use Google\Cloud\Core\Iterator\PageIterator; | ||
use Google\Cloud\Core\RequestHandler; | ||
# TODO: Point to the correct request class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the correct request class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct class, this comment added here to discuss further on the arrival of new OperationsClient
I will remove this comment.
We did not create any design document for these changes. We are following a V2 parent doc drafted by @saranshdhingra. Basically we are trying to remove usage of Please let me know if you would like me to create a doc for this purpose. |
PR for Spanner V2.