You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Khrol (via GitHub)" <gi...@apache.org> on 2023/07/12 16:05:53 UTC

[GitHub] [airflow] Khrol opened a new pull request, #32561: Skip served logs for non-running task try

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

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   If the task is running but is retried, the previous attempt logs opening tries to go to served logs. But the logs from there can be already moved to remote storage.
   <img width="480" alt="Screenshot 2023-07-12 at 18 39 51" src="https://github.com/apache/airflow/assets/3982146/d9e188ce-c2b5-45a9-b88d-c9ceaea3187e">
   
   We should skip served logs for non-running task try.
   
   <!--
   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


Re: [PR] Skip served logs for non-running task try [airflow]

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

   > From what I understand the original problem @Khrol had was that they have their logs in remote and then the server sends an "unnecessary" request trying to fetch logs from the worker. This can be also achieved with just checking if not remote_logs prior to trying to fetch from worker instead of never trying to fetch from the worker.
   
   Surely, If you would like to propose a PR for that where it could be discussed, and take a lead on that - that's the best way to move it forward.


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


Re: [PR] Skip served logs for non-running task try [airflow]

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

   This has caused a regression in our use case, as we currently store our logs on the worker with a [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) with a 2 week retention period. Now when looking at a DAG in our configuration with 2 fails and one retry running, logs of tries number 1 and 2 aren't visible. This happens because the current flow doesn't fetch logs from worker for a running task instance when the try number is not the most recent one.
   
   Sure, we could refactor to use remotes but I think there is a way of resolving this that works for both use cases.
   
   From what I understand the original problem @Khrol had was that they have their logs in remote and then the server sends an "unnecessary" request trying to fetch logs from the worker. This can be also achieved with just checking `if not remote_logs` prior to trying to fetch from worker instead of never trying to fetch from the worker.


-- 
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] pankajkoti commented on pull request #32561: Skip served logs for non-running task try

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

   Looks correct to 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] eladkal merged pull request #32561: Skip served logs for non-running task try

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal merged PR #32561:
URL: https://github.com/apache/airflow/pull/32561


-- 
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 #32561: Skip served logs for non-running task try

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

   cc: @dstandish ?


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