Dev-iL commented on PR #65197:
URL: https://github.com/apache/airflow/pull/65197#issuecomment-4335649553

   Made another pass.
   
   Some patterns like `"{{ task_instance.xcom_pull('upload_sheet_to_gcs')[0] 
}}"` were not replaced because of an integer index (`[0]`) and since 
`XComArg.__getitem__` only accepts `str` keys:
   
   ```python
   # xcom_arg.py:216-220
   def __getitem__(self, item: str) -> XComArg:
       if not isinstance(item, str):
           raise ValueError(f"XComArg only supports str lookup, received 
{type(item).__name__}")
       return PlainXComArg(operator=self.operator, key=item)
   ```
   
   So `upload_sheet_to_gcs.output[0]` would raise at DAG parse time.


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

Reply via email to