Skip to content

Commit

Permalink
chore(deps): update all dependencies (#601)
Browse files Browse the repository at this point in the history
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

* attempt to fix flaky test

* use build specific project for test

* attempt to fix flaky test

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
  • Loading branch information
3 people authored Jul 24, 2022
1 parent 10d00f5 commit 2363e4d
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install nox
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/system_emulated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.8'

Expand Down
2 changes: 1 addition & 1 deletion samples/instanceadmin/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
google-cloud-bigtable==2.10.0
backoff==2.0.1
backoff==2.1.2
14 changes: 8 additions & 6 deletions samples/metricscaler/metricscaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,22 @@ def scale_bigtable(bigtable_instance, bigtable_cluster, scale_up):
if current_node_count < max_node_count:
new_node_count = min(current_node_count + size_change_step, max_node_count)
cluster.serve_nodes = new_node_count
cluster.update()
operation = cluster.update()
response = operation.result(60)
logger.info(
"Scaled up from {} to {} nodes.".format(
current_node_count, new_node_count
"Scaled up from {} to {} nodes for {}.".format(
current_node_count, new_node_count, response.name
)
)
else:
if current_node_count > min_node_count:
new_node_count = max(current_node_count - size_change_step, min_node_count)
cluster.serve_nodes = new_node_count
cluster.update()
operation = cluster.update()
response = operation.result(60)
logger.info(
"Scaled down from {} to {} nodes.".format(
current_node_count, new_node_count
"Scaled down from {} to {} nodes for {}.".format(
current_node_count, new_node_count, response.name
)
)
# [END bigtable_scale]
Expand Down
8 changes: 6 additions & 2 deletions samples/metricscaler/metricscaler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def instance():
serve_nodes=serve_nodes,
default_storage_type=storage_type,
)
instance.create(clusters=[cluster])
operation = instance.create(clusters=[cluster])
response = operation.result(60)
print(f"Successfully created {response.name}")

# Eventual consistency check
retry_found = RetryResult(bool)
Expand Down Expand Up @@ -105,7 +107,9 @@ def dev_instance():
cluster = instance.cluster(
cluster_id, location_id=BIGTABLE_ZONE, default_storage_type=storage_type
)
instance.create(clusters=[cluster])
operation = instance.create(clusters=[cluster])
response = operation.result(60)
print(f"Successfully created {response.name}")

# Eventual consistency check
retry_found = RetryResult(bool)
Expand Down
39 changes: 39 additions & 0 deletions samples/metricscaler/noxfile_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Default TEST_CONFIG_OVERRIDE for python repos.

# You can copy this file into your directory, then it will be imported from
# the noxfile.py.

# The source of truth:
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/noxfile_config.py

TEST_CONFIG_OVERRIDE = {
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
# An envvar key for determining the project id to use. Change it
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
# build specific Cloud project. You can also use your own string
# to use your own Cloud project.
"gcloud_project_env": "BUILD_SPECIFIC_GCLOUD_PROJECT",
# If you need to use a specific version of pip,
# change pip_version_override to the string representation
# of the version number, for example, "20.2.4"
"pip_version_override": None,
# A dictionary you want to inject into your test. Don't put any
# secrets here. These values will override predefined values.
"envs": {},
}
2 changes: 1 addition & 1 deletion samples/snippets/writes/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
backoff==2.0.1
backoff==2.1.2
pytest==7.1.2
2 changes: 1 addition & 1 deletion samples/tableadmin/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pytest==7.1.2
google-cloud-testutils==1.3.1
google-cloud-testutils==1.3.2

0 comments on commit 2363e4d

Please sign in to comment.