kc-sdk-python 5.3.1__tar.gz → 5.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kc-sdk-python
3
- Version: 5.3.1
3
+ Version: 5.3.2
4
4
  Summary: Kvindo Cloud Python SDK — typed client for managing Kvindo Cloud infrastructure (VMs, S3, Kubernetes, load balancers, VPCs, PostgreSQL) via the REST API
5
5
  Author: Kvindo
6
6
  License-Expression: MIT
@@ -569,9 +569,8 @@ class KcResourceClient:
569
569
  """Poll a change request once per second until it finishes or times out.
570
570
 
571
571
  Returns as soon as the request succeeds (`succeeded == True`) or fails
572
- (both `errorMessage` and `errorCode` set). On timeout it returns the last
573
- (still-pending) status rather than raising — inspect `succeeded` to tell
574
- the cases apart.
572
+ (`errorCode` set). On timeout it returns the last (still-pending) status
573
+ rather than raising — inspect `succeeded` to tell the cases apart.
575
574
 
576
575
  Args:
577
576
  request_id: the `requestId` to poll.
@@ -583,7 +582,21 @@ class KcResourceClient:
583
582
  result = self.read_request(request_id)
584
583
 
585
584
  i = 0
586
- while result.succeeded == False and result.errorMessage == None:
585
+ # Keep polling past a non-None errorMessage as long as errorCode is still None - the
586
+ # reconciler routinely stamps a benign, expected "please wait" errorMessage (e.g.
587
+ # "Temporary error. Waiting for all changes to finish first.") on EVERY throttled/gated
588
+ # retry tick while a resource is still legitimately in progress (see the various
589
+ # CloudCancelReconciliationException call sites across avant.cloud's reconcilers) -
590
+ # errorCode is what actually distinguishes a terminal failure. The old condition here
591
+ # (`result.errorMessage == None`) stopped polling and returned `succeeded=False` the
592
+ # moment ANY transient message appeared, without checking errorCode at all. Confirmed
593
+ # live via ES logs 2026-09-21 (Kubernetes E2E SDK test): the loop exited on
594
+ # `{"succeeded":false,"errorMessage":"Temporary error. Waiting for all changes to finish
595
+ # first.","errorCode":null}` mid-reconcile, and the caller (DocGuideExamples' Kubernetes
596
+ # example, and any real caller that doesn't separately check `.succeeded`) proceeded to
597
+ # read a resource that hadn't actually finished yet - e.g. status.kubeconfig was still
598
+ # None, crashing `f.write(kubeconfig)`.
599
+ while result.succeeded == False and result.errorCode == None:
587
600
  i = i + 1
588
601
  if i > timeout_seconds:
589
602
  return result # timed out while still pending
@@ -593,7 +606,7 @@ class KcResourceClient:
593
606
 
594
607
  if result.succeeded == True:
595
608
  return result # applied successfully
596
- if result.errorMessage != None and result.errorCode != None:
609
+ if result.errorCode != None:
597
610
  return result # failed terminally
598
611
 
599
612
  return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kc-sdk-python
3
- Version: 5.3.1
3
+ Version: 5.3.2
4
4
  Summary: Kvindo Cloud Python SDK — typed client for managing Kvindo Cloud infrastructure (VMs, S3, Kubernetes, load balancers, VPCs, PostgreSQL) via the REST API
5
5
  Author: Kvindo
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "kc-sdk-python"
7
- version = "5.3.1"
7
+ version = "5.3.2"
8
8
  description = "Kvindo Cloud Python SDK — typed client for managing Kvindo Cloud infrastructure (VMs, S3, Kubernetes, load balancers, VPCs, PostgreSQL) via the REST API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
File without changes
File without changes
File without changes