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/29 08:06:50 UTC

[GitHub] [airflow] kianelbo opened a new pull request, #23352: Fix the error caused by passing unused context in JiraSensor.poke

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

   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   #### This tiny PR attempts to fix the error caused by https://github.com/apache/airflow/pull/23046
   (original issue: #22810 )


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


[GitHub] [airflow] potiuk commented on pull request #23352: Fix the error caused by passing unused context in JiraSensor.poke

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #23352:
URL: https://github.com/apache/airflow/pull/23352#issuecomment-1160197685

   Thanks @kianelbo !


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


[GitHub] [airflow] ashb commented on pull request #23352: Fix the error caused by passing unused context in JiraSensor.poke

Posted by GitBox <gi...@apache.org>.
ashb commented on PR #23352:
URL: https://github.com/apache/airflow/pull/23352#issuecomment-1158957401

   Could you add a test case to prevent future regressions?


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


[GitHub] [airflow] potiuk commented on pull request #23352: Fix the error caused by passing unused context in JiraSensor.poke

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #23352:
URL: https://github.com/apache/airflow/pull/23352#issuecomment-1159824278

   Rebased to rebuild. @kianelbo - please ping us if you see it's green or when you fix it, if it is red :).


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


[GitHub] [airflow] kianelbo commented on pull request #23352: Fix the error caused by passing unused context in JiraSensor.poke

Posted by GitBox <gi...@apache.org>.
kianelbo commented on PR #23352:
URL: https://github.com/apache/airflow/pull/23352#issuecomment-1159245297

   > Could you add a test case to prevent future regressions?
   
   Good idea! However I couldn't find a neat way to add a new case to the test. Instead, I thought it would be worthwhile to use the original `field_checker_func` of `JiraTicketSensor` and have a more realistically mocked ticket object.


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


[GitHub] [airflow] github-actions[bot] commented on pull request #23352: Fix the error caused by passing unused context in JiraSensor.poke

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #23352:
URL: https://github.com/apache/airflow/pull/23352#issuecomment-1158313145

   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.


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


[GitHub] [airflow] jhtimmins commented on a diff in pull request #23352: Fix the error caused by passing unused context in JiraSensor.poke

Posted by GitBox <gi...@apache.org>.
jhtimmins commented on code in PR #23352:
URL: https://github.com/apache/airflow/pull/23352#discussion_r863205922


##########
airflow/providers/jira/sensors/jira.py:
##########
@@ -60,7 +60,7 @@ def poke(self, context: 'Context') -> Any:
         jira_result = getattr(resource, self.method_name)(**self.method_params)
         if self.result_processor is None:
             return jira_result
-        return self.result_processor(context, jira_result)

Review Comment:
   Is there a reason we're not removing `context` from the `poke` method signature?



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


[GitHub] [airflow] uranusjr commented on a diff in pull request #23352: Fix the error caused by passing unused context in JiraSensor.poke

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23352:
URL: https://github.com/apache/airflow/pull/23352#discussion_r863248769


##########
airflow/providers/jira/sensors/jira.py:
##########
@@ -60,7 +60,7 @@ def poke(self, context: 'Context') -> Any:
         jira_result = getattr(resource, self.method_name)(**self.method_params)
         if self.result_processor is None:
             return jira_result
-        return self.result_processor(context, jira_result)

Review Comment:
   `poke` on other sensors take `context`, so this probably should as well.



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


[GitHub] [airflow] potiuk merged pull request #23352: Fix the error caused by passing unused context in JiraSensor.poke

Posted by GitBox <gi...@apache.org>.
potiuk merged PR #23352:
URL: https://github.com/apache/airflow/pull/23352


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