From 421f4d3fb48fef17c39126c183aff00e3ad3660b Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Tue, 12 Sep 2023 14:48:19 -0700 Subject: [PATCH] Skip updating nodes if the spanner instance is user managed. PiperOrigin-RevId: 564839719 --- perfkitbenchmarker/providers/gcp/gcp_spanner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/perfkitbenchmarker/providers/gcp/gcp_spanner.py b/perfkitbenchmarker/providers/gcp/gcp_spanner.py index 709434fe0c..ce06b60b84 100644 --- a/perfkitbenchmarker/providers/gcp/gcp_spanner.py +++ b/perfkitbenchmarker/providers/gcp/gcp_spanner.py @@ -362,6 +362,10 @@ def _WaitUntilInstanceReady(self) -> None: def _SetNodes(self, nodes: int) -> None: """Sets the number of nodes on the Spanner instance.""" + # Not yet supported for user managed instances since instance attributes + # are not discovered. + if self.user_managed: + return current_nodes = self._GetNodes() if nodes == current_nodes: return