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: Managed Autoscalar feature #1038

Closed
wants to merge 13 commits into from

Conversation

harshachinta
Copy link
Contributor

@harshachinta harshachinta commented Nov 18, 2023

[DO NOT MERGE]
This PR adds code changes for Managed Autoscalar feature.

  • Add the ability to create / update an instance with autoscaling config. Note that now user can only specify one of the node_count, processing_units or autoscaling_config as the compute capacity for an instance.

  • Add the ability to see autoscaling config with an instance

@harshachinta harshachinta requested review from a team as code owners November 18, 2023 08:39
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Nov 18, 2023
Copy link

snippet-bot bot commented Nov 18, 2023

Here is the summary of changes.

You are about to add 1 region tag.

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

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Nov 18, 2023
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Nov 18, 2023
@harshachinta harshachinta changed the title feat: managed autoscalar feature feat: Managed Autoscalar feature Nov 19, 2023
"autoscaling_config",
]
if self._autoscaling_config is not None:
# When switching from non-autoscalar to autoscalar instance,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: set paths in a if else condition

@@ -291,6 +298,49 @@ def test_create_with_processing_units(self):
self.assertEqual(instance.labels, self.LABELS)
self.assertEqual(metadata, [("google-cloud-resource-prefix", instance.name)])

def test_create_with_autoscaling_config(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Update any existing test eg: test_create_with_processing_units and add autoscaling_config with a comment that autoscaling_config should always be set irrespective of processing_unit or node_count

@rahul2393
Copy link
Contributor

Closing this because of #1111

@rahul2393 rahul2393 closed this Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants