-
Notifications
You must be signed in to change notification settings - Fork 428
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 V2 #7193
base: main
Are you sure you want to change the base?
Conversation
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?
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. |
Spanner: upgrade to V2 (Part 2/2)
@@ -184,6 +184,9 @@ public function getOperationsClient() | |||
public function resumeOperation($operationName, $methodName = null) | |||
{ | |||
$options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; | |||
// OperationResponse is a V1 surface class, we need V2 surface class. | |||
// [V2 LongRunning/Client/OperationsClient, getOperation] | |||
// Other clients have also used the OperationResponse similarly. | |||
$operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); |
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.
These changes can be removed once the migration mode is fixed.
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 should modify the MIGRATION_MODE
locally and generate the client as part of this PR, so we can preview those changes. Then we can merge the CL to change the migration mode once this PR is merged
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.
Discussed internally that Brent will take care of the MIGRATION_MODE
, Thanks!
The "Prefer Lowest" tests are failing because you've added a new |
Great, the test is passing now.. |
Spanner V2:
Part 1:
RequestHandler
[Operation
class]RequestHandler
[Database
class]RequestHandler
[Session
class]RequestHandler
[CacheSessionPool
class]RequestHandler
in Core'sLongRunningOperation
]Part 2:
RequestHandler
[Backup
class]RequestHandler
[Instance
class]RequestHandler
[InstanceConfiguration
class]RequestHandler
[SpannerClient
]Tests:
Related work:
OperationsClient
[GAPIC generator change] [See @todo in Spanner/src/Admin/Database/V1/Client/DatabaseAdminClient.php] : This is replaced with the migration status changes.BREAKING_CHANGE_REASON=RC-1 for the version 2 of the Spanner library.