You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/28 16:10:53 UTC

[GitHub] [airflow] kostiantyn-lab commented on pull request #23046: Use JiraHook instead of JiraOperator for JiraSensor

kostiantyn-lab commented on PR #23046:
URL: https://github.com/apache/airflow/pull/23046#issuecomment-1112395439

   > I opened a PR according to what @potiuk explained. This is my first ever contribution and I would really appreciate it if you take a look at it and give your feedbacks.
   
   @kianelbo I've found error in your patch
   ```
     File "/usr/local/lib/python3.7/site-packages/airflow/sensors/base.py", line 234, in execute
       while not self.poke(context):
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow_contrib/sensors/jira.py", line 110, in poke
       return JiraSensor.poke(self, context=context)
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/providers/jira/sensors/jira.py", line 64, in poke
       return self.result_processor(context, jira_result)
   TypeError: issue_field_checker() takes 2 positional arguments but 3 were given
   ```
   
   I see two ways to fix it
   1. Add `context: Dict` as parameter to `def issue_field_checker(self, issue: Issue) -> Optional[bool]`
   2. Remove `context` parameter from the `return self.result_processor(context, jira_result)`
   


-- 
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-unsubscribe@airflow.apache.org

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