-
Notifications
You must be signed in to change notification settings - Fork 388
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): add factory functions for instance/database/backup #7321
feat(spanner): add factory functions for instance/database/backup #7321
Conversation
With the move to generated APIs for Spanner admin, the results of of admin operations now only contain the raw resource strings from the protobufs. So, it is helpful to be able to build `Instance`, `Database`, and `Backup` objects directly from those strings. And to complete the picture, introduce `google::cloud::Project`, which will be helpful to encapsulate the slew of "projects/" concatenations we've accumulated.
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Codecov Report
@@ Coverage Diff @@
## main #7321 +/- ##
========================================
Coverage 93.65% 93.66%
========================================
Files 1348 1351 +3
Lines 116629 116746 +117
========================================
+ Hits 109225 109345 +120
+ Misses 7404 7401 -3
Continue to review full report at Codecov.
|
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.
Looks like this is mixing a bit of refactoring for KmsKeyName
, an other changes. Closely related though.
Curious why the ABI dump needed to change as part of this PR?
@@ -17,7 +17,8 @@ | |||
|
|||
#include "google/cloud/spanner/instance.h" | |||
#include "google/cloud/spanner/version.h" | |||
#include <ostream> | |||
#include "google/cloud/status_or.h" | |||
#include <iosfwd> |
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.
Thanks!
Yeah. I couldn't help but try to make them all more alike.
It looks like because I changed the existing model for all this from |
With the move to generated APIs for Spanner admin, the results of
of admin operations now only contain the raw resource strings from
the protobufs. So, it is helpful to be able to build
Instance
,Database
, andBackup
objects directly from those strings.And to complete the picture, introduce
google::cloud::Project
,which will be helpful to encapsulate the slew of "projects/"
concatenations we've accumulated.
This change is