-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat: Remove need to pass location parameter along #1093
Conversation
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, |
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 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.
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 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
.
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.
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, |
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 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
.
…into autoscaler-refactor-tech-debt
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.
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, |
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.
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.
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