atrbgithub opened a new pull request, #36130:
URL: https://github.com/apache/airflow/pull/36130

   This fixes the issue raised 
[here](https://github.com/apache/airflow/pull/34919#issuecomment-1846993082) 
against https://github.com/apache/airflow/pull/34919
   
   When testing locally the list only appears to be required when a delimiter 
is passed in. 
   
   A sample test can be performed with:
   
   ```python
   from airflow.providers.google.cloud.hooks.gcs import GCSHook
   res = GCSHook().list(
           bucket_name='a-testbucket',
           prefix='a/prefix/in/the/bucket/'
   )
   print(res)
   ```
   
   With this fix, the code no longer fails with:
   
   ```
   ValueError: ('Iterator has already started', 
<google.api_core.page_iterator.HTTPIterator object at 0x7efe067c3880>)
   ```
   
   To confirm that this block:
   
   ```
                   if delimiter:
                       list(blobs)
   ```
   
   Is still required, when this is removed, and this is ran:
   ```
   res = GCSHook().list(
           bucket_name='a-testbucket',
           prefix='a/prefix/in/the/bucket/',
           delimiter='.csv'
   )
   print(res)
   ```
   
   No results are returned. Everything works as expected however once the block 
is in place. 
   
   
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a 
newsfragment file, named `{pr_number}.significant.rst` or 
`{issue_number}.significant.rst`, in 
[newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to