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/12 17:12:30 UTC

[GitHub] [airflow] tauzen opened a new pull request, #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   Synchronous tasks killed by execution timeout weren't canceled
   due to wrong assignment of job_id property.
   
   


-- 
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] tauzen commented on pull request #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   Thanks @potiuk! That's odd that `mypy` is complaining about this now, and wasn't before πŸ€”. Will try to fix this. 


-- 
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 #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   Static checks need fixing


-- 
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] tauzen commented on pull request #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   Awesome, thank you very much @potiuk πŸ˜„ 


-- 
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 #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main 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] tauzen commented on pull request #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   Thanks for the guidance @potiuk! :bow: Ok, so this PR is approved and labeled with `okay to merge`, tests are green - can I assume it will be merged at your convenience? 


-- 
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 #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   Add it - you will see that it's going to be cleaner. And then you can even move self.job_id = new_job_id closer to the end of the function - and separate variabe will suddenly make a lot more sense


-- 
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] tauzen commented on pull request #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   > Comments are overrated on the other hand.
   Definitely :+1:
   
   Could you please clarify if you are ok with the current PR, or do you prefer to `s/job_id/new_job_id` and add `:str` to the definition of `new_job_id`. Either way is ok with me.


-- 
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 #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   > Thanks @potiuk! That's odd that `mypy` is complaining about this now, and wasn't before thinking. Will try to fix this.
   
   Mypy does seem to work a bit "unstable'y" - I think I know why and might be we will soon fix it.


-- 
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] boring-cyborg[bot] commented on pull request #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on PR #22955:
URL: https://github.com/apache/airflow/pull/22955#issuecomment-1099254589

   Awesome work, congrats on your first merged pull request!
   


-- 
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 #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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


-- 
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] boring-cyborg[bot] commented on pull request #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on PR #22955:
URL: https://github.com/apache/airflow/pull/22955#issuecomment-1096985111

   Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
   Here are some useful points:
   - Pay attention to the quality of your code (flake8, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/BREEZE.rst) for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices).
   Apache Airflow is a community-driven project and together we are making it better πŸš€.
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://s.apache.org/airflow-slack
   


-- 
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 #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   Done :)


-- 
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] tauzen commented on pull request #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   It's a bit sad that we need to have this additional `job_id` variable to keep `mypy` happy, it might be confusing for future contributors. Do you want me to add some additional comment about this in the code? On the bright side - fewer line changes in this PR.


-- 
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 #22955: Fix cancel_on_kill after execution timeout for DataprocSubmitJobOperator

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

   > It's a bit sad that we need to have this additional `job_id` variable to keep `mypy` happy, it might be confusing for future contributors. Do you want me to add some additional comment about this in the code? On the bright side - fewer line changes in this PR.
   
   I don't find it wrong. It's not to keep mypy happy, it's to make sure you don't accidentally use None.  There is nothing wrong with the way you've done and it needs no explanation
   
   I think in this case `mypy` gave you hint on how to make your code more redable and less error prone.
   
   Contraray to popular belief peeople should optimise their code for easines of reading and correctness not to "Avoid" creating variables. Compileres and interpreters will optimise it away and creating extra, properly named variable is often much better solution than .. adding a comment about it. I often do that. In this case maybe even name it "new_job_id" and even expilcitly mark it as `: str` -> that will be the best "explanation" of what it is for and why it's there.
   
   Comments are overrated on the other hand. 
   
   


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