-
Notifications
You must be signed in to change notification settings - Fork 1k
samples: Bigtable: Added App Profile samples and tests #1456
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
samples: Bigtable: Added App Profile samples and tests #1456
Conversation
|
Here is the summary of changes. You are about to add 5 region tags.
This comment is generated by snippet-bot.
|
bshaffer
left a comment
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 main issues I see in this PR are mostly nits, but please check for:
- Using double quotes when you should have single quotes
- Lack of implicit else
- spaces needed around
=> - in
try/catchmake sure the special cases return instead of executing the rest of the sample.
Changed double quotes to single quotes Removed redundant else blocks Converted echo statements to printf
| // $appProfile->setMultiClusterRoutingUseAny($routingPolicy); | ||
|
|
||
| // returns a string identifier depending on SingleClusterRouting or MultiClusterRoutingUseAny | ||
| $routingPolicyStr = $appProfile->getRoutingPolicy(); |
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 returns single_cluster_routing or multi_cluster_routing_any. But TBH, it feels like the field that the user should update is routing_policy.
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.
If you take a look at the API Reference, you'll see there are two fields as part of the AppProfile object being updated: single_cluster_routing and multi_cluster_routing_any. routing_policy, even though it's a protobuf getter, is not the field to be updated, it's only the field identifier. So this code is correct.
* Bigtable: Added App Profile samples and tests * Bigtable: Addressed PR comments for App Profile samples Changed double quotes to single quotes Removed redundant else blocks Converted echo statements to printf * Changed quotes for bigtableTest * Fixed lint errors Co-authored-by: Brent Shaffer <[email protected]>
The tests should pass once #1450 is merged.