You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "XD-DENG (via GitHub)" <gi...@apache.org> on 2023/02/02 03:48:50 UTC

[GitHub] [airflow] XD-DENG opened a new pull request, #29299: [KubernetesExecutor] make the number of log lines to read from the worker pod configurable

XD-DENG opened a new pull request, #29299:
URL: https://github.com/apache/airflow/pull/29299

   Now the `KubernetesExecutor` supports method `get_task_log()` (in `main` branch). However, the number of lines to read is hard-coded to be 100.
   
   It can be imagined that in many cases people may need more logs. And it would be nice to make this number of log lines to read from worker pod configurable. So that users can adjust according to their certain environment.
   
   <!--
   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 an 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/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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] XD-DENG commented on a diff in pull request #29299: [KubernetesExecutor] make the number of log lines to read from the worker pod configurable

Posted by "XD-DENG (via GitHub)" <gi...@apache.org>.
XD-DENG commented on code in PR #29299:
URL: https://github.com/apache/airflow/pull/29299#discussion_r1103720253


##########
airflow/config_templates/default_airflow.cfg:
##########
@@ -1313,6 +1313,9 @@ worker_pods_queued_check_interval = 60
 # You may want this higher if you have a very large cluster and/or use ``multi_namespace_mode``.
 worker_pods_pending_timeout_batch_size = 100
 
+# The number of lines (from the end) of the logs to read from the worker pod's base container.
+read_log_lines = 100

Review Comment:
   Thanks @dstandish . Renamed as suggested.
   
   I fully understand the concern about adding another config param, but I still find this necessary. `100` lines seems reasonable for most cases, but when user want to have more flexibility, e.g. debugging their jobs, more log lines will be needed (this happens to me often in real works).
   
   Comparing with different methods, like the one you shared above (class constant and monkey patch in local settings), I still find adding it as a config param is better.
   
   Please let me know if these clarify, or should you have any other concern. Thanks a lot!



-- 
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] closed pull request #29299: [KubernetesExecutor] make the number of log lines to read from the worker pod configurable

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #29299: [KubernetesExecutor] make the number of log lines to read from the worker pod configurable
URL: https://github.com/apache/airflow/pull/29299


-- 
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 #29299: [KubernetesExecutor] make the number of log lines to read from the worker pod configurable

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #29299:
URL: https://github.com/apache/airflow/pull/29299#issuecomment-1489507893

   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] dstandish commented on a diff in pull request #29299: [KubernetesExecutor] make the number of log lines to read from the worker pod configurable

Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on code in PR #29299:
URL: https://github.com/apache/airflow/pull/29299#discussion_r1098167088


##########
airflow/config_templates/default_airflow.cfg:
##########
@@ -1313,6 +1313,9 @@ worker_pods_queued_check_interval = 60
 # You may want this higher if you have a very large cluster and/or use ``multi_namespace_mode``.
 worker_pods_pending_timeout_batch_size = 100
 
+# The number of lines (from the end) of the logs to read from the worker pod's base container.
+read_log_lines = 100

Review Comment:
   maybe `running_pod_tail_lines`?
   
   because it seems pretty rare that you'd want to customize this, just to avoid another config param i'm tempted to suggest using a class constant that you could monkey patch in airflow local settings... but... i don't feel strongly about 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] XD-DENG commented on pull request #29299: [KubernetesExecutor] make the number of log lines to read from the worker pod configurable

Posted by "XD-DENG (via GitHub)" <gi...@apache.org>.
XD-DENG commented on PR #29299:
URL: https://github.com/apache/airflow/pull/29299#issuecomment-1416163935

   Hi @dstandish , mind helping take a look at this one? Thanks a lot!


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