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 2021/06/25 12:22:11 UTC

[GitHub] [airflow] kushsharma opened a new pull request #16653: Refactor usage of unneeded function call

kushsharma opened a new pull request #16653:
URL: https://github.com/apache/airflow/pull/16653


   `ts` was created for `timezone.utcnow()` `dag_processor` but looks like it was not used for actual comparison.
   


-- 
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:
users@infra.apache.org



[GitHub] [airflow] uranusjr edited a comment on pull request #16653: Refactor usage of unneeded function call

Posted by GitBox <gi...@apache.org>.
uranusjr edited a comment on pull request #16653:
URL: https://github.com/apache/airflow/pull/16653#issuecomment-869819761


   I traced this wayyyy back to #100 when this block of code was first written, and there’s nothing in the commit message or PR description on why it’s done like this.
   
   It seems unintentional. Maybe we should accept this for now (and if it somehow causes issues we can confidently put down a comment describing the rationale).


-- 
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 #16653: Refactor usage of unneeded function call

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


   Not sure about the origin of this, but I think it was a deliberate decision to run utcnow with every loop, because you get then slighly more correct when detecting an SLA - remember that time flows while the loop is running  - so by the end it finished it could be couple of seconds but possibly even minutes) later - depending on how many tasks you have run in the last hour this loop might take quite some time. I think the way it was done was actually better.
   
   Now - even if this was a deliberate decision, I am not quite sure why ts (time at the beginning of the loop) is read and used in SLAMiss instead of the utcnow() (actual time now). Maybe there was a good reason why the "start" of SLA is used when we create SLAMiss .. Anyone can shed some light there? If anything, I'd rather use utcnow() also there.
   
   But maybe there are some good reasons for both choices?


-- 
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 #16653: Refactor usage of unneeded function call

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


   > It seems unintentional. Maybe we should accept this for now (and if it somehow causes issues we can confidently put down a comment describing the rationale).
   
   Agree. Following the comments from today's slack conversation, the whole SLA part needs to be reworked. https://apache-airflow.slack.com/archives/CCPRP7943/p1624882008272300


-- 
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 #16653: Refactor usage of unneeded function call

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


   > It seems unintentional. Maybe we should accept this for now (and if it somehow causes issues we can confidently put down a comment describing the rationale).
   
   Agree. Following the comments from today's slack conversation, the whole SLA part needs to be reworked. https://apache-airflow.slack.com/archives/CCPRP7943/p1624882008272300


-- 
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 #16653: Refactor usage of unneeded function call

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


   


-- 
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 pull request #16653: Refactor usage of unneeded function call

Posted by GitBox <gi...@apache.org>.
uranusjr commented on pull request #16653:
URL: https://github.com/apache/airflow/pull/16653#issuecomment-869819761


   I traced this to wayyyy back
   
   60f35c3aeca6206233eec8c3371c797824a9f2f8
   
   It seems unintentional. Maybe we should accept this for now (and if it somehow causes issues we can confidently put down a comment describing why this is done the way it is).


-- 
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 edited a comment on pull request #16653: Refactor usage of unneeded function call

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #16653:
URL: https://github.com/apache/airflow/pull/16653#issuecomment-868692975


   Not sure about the origin of this, but I think it was a deliberate decision to run utcnow with every loop, because you get then slighly more correct when detecting an SLA. Remember that time flows while the loop is running  - so by the end it finished it could be couple of seconds but possibly even minutes) later - depending on how many tasks you have run in the last hour this loop might take quite some time. I think the way it was done was actually better.
   
   Now - even if this was a deliberate decision, I am not quite sure why ts (time at the beginning of the loop) is read and used in SLAMiss instead of the utcnow() (actual time now). Maybe there was a good reason why the "start" of SLA is used when we create SLAMiss .. Anyone can shed some light there? If anything, I'd rather use utcnow() also there.
   
   But maybe there are some good reasons for both choices?


-- 
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 edited a comment on pull request #16653: Refactor usage of unneeded function call

Posted by GitBox <gi...@apache.org>.
uranusjr edited a comment on pull request #16653:
URL: https://github.com/apache/airflow/pull/16653#issuecomment-869819761


   I traced this wayyyy back to #100 when this block of code was first written, and there’s nothing in the commit message or PR description on why it’s done like this.
   
   It seems unintentional. Maybe we should accept this for now (and if it somehow causes issues we can confidently put down a comment describing the rationale).


-- 
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 #16653: Refactor usage of unneeded function call

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


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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 #16653: Refactor usage of unneeded function call

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


   


-- 
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 pull request #16653: Refactor usage of unneeded function call

Posted by GitBox <gi...@apache.org>.
uranusjr commented on pull request #16653:
URL: https://github.com/apache/airflow/pull/16653#issuecomment-869819761


   I traced this to wayyyy back
   
   60f35c3aeca6206233eec8c3371c797824a9f2f8
   
   It seems unintentional. Maybe we should accept this for now (and if it somehow causes issues we can confidently put down a comment describing why this is done the way it is).


-- 
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 #16653: Refactor usage of unneeded function call

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


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


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