kaxil commented on a change in pull request #13563:
URL: https://github.com/apache/airflow/pull/13563#discussion_r555775514



##########
File path: airflow/cli/commands/kubernetes_command.py
##########
@@ -90,7 +90,7 @@ def cleanup_pods(args):
     print('Loading Kubernetes configuration')
     kube_client = get_kube_client()
     print(f'Listing pods in namespace {namespace}')
-    continue_token = None
+    continue_token = ''
     while True:  # pylint: disable=too-many-nested-blocks
         pod_list = kube_client.list_namespaced_pod(namespace=namespace, 
limit=500, _continue=continue_token)
         for pod in pod_list.items:

Review comment:
       >:param str _continue: The continue option should be set when retrieving 
more results from the server. Since this value is server defined, clients may 
only use the continue value from a previous query result with identical query 
parameters (except for the value of continue) and the server may reject a 
continue value it does not recognize. If the specified continue value is no 
longer valid whether due to expiration (generally five to fifteen minutes) or a 
configuration change on the server, the server will respond with a 410 
ResourceExpired error together with a continue token. If the client needs a 
consistent list, it must restart their list without the continue field. 
Otherwise, the client may send another list request with the token received 
with the 410 error, the server will respond with a list starting from the next 
key, but from the latest snapshot, which is inconsistent from the previous list 
results - objects that are created, modified, or deleted after the first list 
 request will be included in the response, as long as their keys are after the 
\"next key\".  This field is not supported when watch is true. Clients may 
start a watch from the last resourceVersion value returned by the server and 
not miss any modifications.
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to