Skip to content

feat: Add support for autoscaling#509

Merged
Mariatta merged 7 commits intomainfrom
feat-add-autoscaling
Mar 4, 2022
Merged

feat: Add support for autoscaling#509
Mariatta merged 7 commits intomainfrom
feat-add-autoscaling

Conversation

@Mariatta
Copy link
Contributor

@Mariatta Mariatta commented Feb 15, 2022

  • Add the parameters min_serve_nodes, max_serve_nodes, and cpu_utilization_percent
  • Create disable_autoscaling function
  • Update documentation and tests

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@Mariatta Mariatta requested review from a team as code owners February 15, 2022 20:00
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/python-bigtable API. label Feb 15, 2022
@snippet-bot
Copy link

snippet-bot bot commented Feb 15, 2022

Here is the summary of changes.

You are about to add 2 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

: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
Copy link
Collaborator

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 ...

@Mariatta Mariatta requested a review from a team as a code owner February 23, 2022 01:27
@Mariatta Mariatta requested a review from kolea2 February 23, 2022 01:30
@Mariatta Mariatta force-pushed the feat-add-autoscaling branch from 13646ed to 7b3e3bf Compare February 23, 2022 01:33
Copy link
Collaborator

@kolea2 kolea2 left a 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!

and not self.cpu_utilization_percent
):
raise ValueError(
"Must specify either serve_nodes or all of the autoscaling configurations."
Copy link
Collaborator

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?

)
):
raise ValueError(
"All of autoscaling configurations must be specified at the same time."
Copy link
Collaborator

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
Copy link
Collaborator

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.

Copy link
Contributor Author

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)

@Mariatta Mariatta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 28, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 28, 2022
@Mariatta Mariatta requested a review from kolea2 February 28, 2022 21:59
Mariatta added 7 commits March 3, 2022 11:57
- Add the parameters min_serve_nodes, max_serve_nodes, and cpu_utilization_percent
- Create disable_autoscaling function
- Update documentation and tests
- System test fixes and add new test fixtures
@Mariatta Mariatta force-pushed the feat-add-autoscaling branch from e8aecfe to 3f093f8 Compare March 4, 2022 00:51
@Mariatta Mariatta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 4, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 4, 2022
@Mariatta Mariatta merged commit 8f4e197 into main Mar 4, 2022
@Mariatta Mariatta deleted the feat-add-autoscaling branch March 4, 2022 16:16
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/python-bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments