hrkh opened a new issue #13481:
URL: https://github.com/apache/airflow/issues/13481


   **Apache Airflow version**: 1.10.12
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: Google Cloud (Cloud Composer)
   - **OS** (e.g. from /etc/os-release): Ubuntu 18.04.5 LTS
   - **Kernel** (e.g. `uname -a`): x86_64 GNU/Linux
   - **Install tools**:
   - **Others**:
     - apache-airflow-backport-providers-amazon version: '2020.10.29'
   
   **What happened**:
   
   When I tried to execute S3KeyUnchangedSensor, I got the following error.
   
   ```
   sensor = S3KeysUnchangedSensor(
       task_id="sensor",
       poke_interval=30,
       mode="poke",
       bucket_name="{{ var.value.s3_bucket }}",
       prefix="hogehoge",
       inactivity_period=60 * 2,
       allow_delete=False,
       dag=dag,
   )
   ```
   
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/airflow/airflow/models/taskinstance.py", line 966, in 
_run_raw_task
       self.render_templates(context=context)
     File "/usr/local/lib/airflow/airflow/models/taskinstance.py", line 1428, 
in render_templates
       self.task.render_template_fields(context)
     File "/usr/local/lib/airflow/airflow/models/baseoperator.py", line 706, in 
render_template_fields
       self._do_render_template_fields(self, self.template_fields, context, 
jinja_env, set())
     File "/usr/local/lib/airflow/airflow/models/baseoperator.py", line 711, in 
_do_render_template_fields
       content = getattr(parent, attr_name)
   AttributeError: 'S3KeysUnchangedSensor' object has no attribute 'bucket_name'
   ```
   
   **What you expected to happen**:
   
   I expected the sensor to run successfully.


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