-
Notifications
You must be signed in to change notification settings - Fork 436
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)
The "Prefer Lowest" tests are failing because you've added a new |
Great, the test is passing now.. |
* | ||
* @return array | ||
*/ | ||
private function getLROResponseMappers() |
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.
Removing duplicate data in the handwritten layer that's already being generated and handled by GAPIC is the whole reason we are making the V2 changes, so having all this metadata defined in an array like this is not acceptable.
We can consume the generated data in the GAPIC layer, or use the GAPIC clients directly.
* @param $clientName The class name of the client. | ||
* @param $clientObject The client object to be added. | ||
*/ | ||
public function addClientObject(string $clientName, mixed $clientObject) |
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.
Having public getters and setters for the client objects is hacky and could have unexpected results. This points to a flaw in the design.
array $info = [], | ||
$databaseRole = '' | ||
string $databaseRole = '', | ||
array $config = [] |
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 do not like extending our already bloated constructor with another parameter, especially one as generic as $config
.
If anything , we should name this $options
and combine it with all the other optional parameters.
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.