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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for autoscaling #509
Conversation
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
google/cloud/bigtable/cluster.py
Outdated
@@ -85,6 +89,28 @@ class Cluster(object): | |||
:data:`google.cloud.bigtable.enums.Cluster.State.CREATING`. | |||
:data:`google.cloud.bigtable.enums.Cluster.State.RESIZING`. | |||
:data:`google.cloud.bigtable.enums.Cluster.State.DISABLED`. | |||
|
|||
:type min_serve_nodes: int | |||
:param min_serve_nodes: (Optional) The minimum number of nodes in the cluster. Must be |
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 would reword this slightly to point out that this is a setting for autoscaling. Something like:
The miniumum number of nodes to be set in the cluster for autoscaling. Must be 1 or greater ...
13646ed
to
7b3e3bf
Compare
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.
lgtm after two small docs comments!
google/cloud/bigtable/cluster.py
Outdated
and not self.cpu_utilization_percent | ||
): | ||
raise ValueError( | ||
"Must specify either serve_nodes or all of the autoscaling configurations." |
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.
maybe list the configurations here for convenience?
google/cloud/bigtable/cluster.py
Outdated
) | ||
): | ||
raise ValueError( | ||
"All of autoscaling configurations must be specified at the same time." |
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.
same comment here
alt_cluster.reload() | ||
assert alt_cluster.min_serve_nodes == new_min_serve_nodes | ||
assert alt_cluster.max_serve_nodes == new_max_serve_nodes | ||
assert alt_cluster.cpu_utilization_percent == new_cpu_utilization_percent |
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.
let's add one more test case in which only one field is updated.
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've added such test below (line 691)
- Add the parameters min_serve_nodes, max_serve_nodes, and cpu_utilization_percent - Create disable_autoscaling function - Update documentation and tests
- Unittest fixes
- System test fixes and add new test fixtures
Update docstring. Add test cases.
Update test suite accordingly.
e8aecfe
to
3f093f8
Compare
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 馃