From 4583105a18d946992bf65943eb8af32c059aa03a Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Thu, 8 May 2025 12:18:29 -0600 Subject: [PATCH] fix: update ibm-vpc dependencies per breaking change in 0.28.0 Release of ibm-vpc 0.28.0 forces providing a known API version on VpcV1 __init__. API versions can be determined at https://github.com/IBM/vpc-python-sdk/releases/. Continue bump setup.cfg contraints in coordination with an ibm-vpc API version change to avoid unexpected integration test failures when subsequent releases of ibm-vpc are published. --- VERSION | 2 +- pycloudlib/ibm/cloud.py | 6 +++++- setup.cfg | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index bcc50592..e05df4ae 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1!10.12.0 +1!10.12.1 diff --git a/pycloudlib/ibm/cloud.py b/pycloudlib/ibm/cloud.py index a75c135b..d0651193 100644 --- a/pycloudlib/ibm/cloud.py +++ b/pycloudlib/ibm/cloud.py @@ -75,7 +75,11 @@ def __init__( authenticator = IAMAuthenticator(api_key) self.instance_counter = itertools.count(1) - self._client = VpcV1(authenticator=authenticator) + # Note this pins API version to ibm-vpc 0.28.0 also in setup.cfg. + # If updating API version: + # 1. Check latest https://github.com/IBM/vpc-python-sdk/releases/ + # 2. Update setup.cfg ibm-vpc < conditional + self._client = VpcV1(authenticator=authenticator, version="2025-04-22") self._client.set_service_url(f"https://{self.region}.iaas.cloud.ibm.com/v1") self._resource_manager_service = ResourceManagerV2(authenticator=authenticator) diff --git a/setup.cfg b/setup.cfg index 58bc6ebc..e6239477 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,7 +34,7 @@ install_requires = googleapis-common-protos >= 1.63.1 ibm-cloud-sdk-core >= 3.14.0 ibm-platform-services - ibm-vpc >= 0.10 + ibm-vpc >= 0.10, < 0.29.0 knack >= 0.7.1 oci >= 2.17.0 openstacksdk >= 1.1.0, < 1.5.0