blaklaybul opened a new issue, #42391:
URL: https://github.com/apache/airflow/issues/42391
### Apache Airflow Provider(s)
google
### Versions of Apache Airflow Providers
10.15.0
### Apache Airflow version
2.7.3
### Operating System
debian
### Deployment
Astronomer
### Deployment details
Using astro runtime 9.15.0
### What happened
The GCSToGCSOperator is throwing an error when trying to pass task output
into the `source_objects` field.
```
File
"/usr/local/lib/python3.11/site-packages/airflow/providers/google/cloud/transfers/gcs_to_gcs.py",
line 211, in __init__
if source_objects and any(WILDCARD in obj for obj in source_objects):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/airflow/models/xcom_arg.py",
line 268, in __iter__
raise TypeError("'XComArg' object is not iterable")
```
### What you think should happen instead
This operator should be able to handle xcom, and we have no issue using the
`GCSToBigQueryOperator` in the same way
### How to reproduce
```
@task
def return_files():
files = ['a','b','c','d']
return files
files = return_files()
extract_files = GCSToGCSOperator(
task_id="fetch_data",
source_bucket="source_bucket_name",
source_objects=files,
destination_bucket="dest_bucket_name",
destination_object="foo",
dag=dag,
)
files >> extract_files
```
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]