Skip to content

Conversation

@saranshdhingra
Copy link
Collaborator

@saranshdhingra saranshdhingra commented Jul 22, 2021

The tests should pass once #1450 is merged.

@saranshdhingra saranshdhingra requested a review from a team as a code owner July 22, 2021 10:32
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 22, 2021
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jul 22, 2021
@snippet-bot
Copy link

snippet-bot bot commented Jul 22, 2021

Here is the summary of changes.

You are about to add 5 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Copy link
Contributor

@bshaffer bshaffer left a 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:

  1. Using double quotes when you should have single quotes
  2. Lack of implicit else
  3. spaces needed around =>
  4. in try/catch make sure the special cases return instead of executing the rest of the sample.

// $appProfile->setMultiClusterRoutingUseAny($routingPolicy);

// returns a string identifier depending on SingleClusterRouting or MultiClusterRoutingUseAny
$routingPolicyStr = $appProfile->getRoutingPolicy();
Copy link
Collaborator Author

@saranshdhingra saranshdhingra Aug 10, 2021

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.

Copy link
Contributor

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.

@saranshdhingra saranshdhingra merged commit 332aac5 into GoogleCloudPlatform:master Aug 11, 2021
rsamborski pushed a commit that referenced this pull request Sep 14, 2021
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants