Skip to content
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: Remove need to pass location parameter along #1093

Merged

Conversation

danieljbruce
Copy link
Contributor

This PR is the 2nd step towards refactoring code pertaining to autoscaler and cluster update work. This should be merged after the following PR:

#1092

@danieljbruce danieljbruce requested review from a team as code owners June 1, 2022 18:50
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigtable Issues related to the googleapis/nodejs-bigtable API. labels Jun 1, 2022
@danieljbruce danieljbruce added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 1, 2022
src/cluster.ts Outdated
@@ -693,7 +693,7 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
* region_tag:bigtable_api_cluster_set_meta
*/
setMetadata(
metadata: SetClusterMetadataOptions,
metadata: BasicClusterConfig,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a breaking change because BasicClusterConfig includes all the parameters that SetClusterMetadataOptions includes. We need to do this to allow the user to pass in location parameter, which shouldn't be required, but seems to be accepted in other codebases when we update clusters.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this will be a compilation error for upstream users because location is require3d on BasicClusterConfig, what I might do instead is add location as an optional parameter on SetClusterMetadataOptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point. By adding this optional parameter to the interface it also means we make fewer changes too which is good because it keeps this PR small. Done.

src/cluster.ts Outdated
@@ -693,7 +693,7 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
* region_tag:bigtable_api_cluster_set_meta
*/
setMetadata(
metadata: SetClusterMetadataOptions,
metadata: BasicClusterConfig,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this will be a compilation error for upstream users because location is require3d on BasicClusterConfig, what I might do instead is add location as an optional parameter on SetClusterMetadataOptions.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: l Pull request size is large. labels Jun 17, 2022
Copy link
Contributor Author

@danieljbruce danieljbruce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments addressed.

src/cluster.ts Outdated
@@ -693,7 +693,7 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`);
* region_tag:bigtable_api_cluster_set_meta
*/
setMetadata(
metadata: SetClusterMetadataOptions,
metadata: BasicClusterConfig,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point. By adding this optional parameter to the interface it also means we make fewer changes too which is good because it keeps this PR small. Done.

@danieljbruce danieljbruce added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Jun 17, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 20, 2022
@danieljbruce danieljbruce added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 20, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 20, 2022
@danieljbruce danieljbruce merged commit 75c1a30 into googleapis:main Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/nodejs-bigtable API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants