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 2020/05/31 21:24:05 UTC

[GitHub] [airflow] mik-laj opened a new pull request #9084: Remove TaskInstance.log_filepath attribute

mik-laj opened a new pull request #9084:
URL: https://github.com/apache/airflow/pull/9084


   This method returns incorrect values. We have a different way of determining this path that uses the template. But more important to me is that you can't write a method that works in every case, because we're starting to support more advanced tools that don't use files, so it is impossible to determine the correct file path in every case e.g. Stackdriver doesn't use file but identifies logs based on labels.
   
   ---
   Make sure to mark the boxes below before creating PR: [x]
   
   - [X] Description above provides context of the change
   - [X] Unit tests coverage for changes (not needed for documentation changes)
   - [X] Target Github ISSUE in description if exists
   - [X] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [X] Relevant documentation is updated including usage instructions.
   - [X] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+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 [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   


----------------------------------------------------------------
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] ashb commented on pull request #9084: Remove TaskInstance.log_filepath attribute

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


   One such example I've used in the past was to read the log file and include it (or the last 100 lines) in the failure email: at the point this ran it was looking at the local file do remote or not didn't matter.


-- 
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] potiuk commented on pull request #9084: Remove TaskInstance.log_filepath attribute

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


   Whil I agree with the idea, there should be an UPDATING.md entry for that one.


----------------------------------------------------------------
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] mik-laj closed pull request #9084: Remove TaskInstance.log_filepath attribute

Posted by GitBox <gi...@apache.org>.
mik-laj closed pull request #9084:
URL: https://github.com/apache/airflow/pull/9084


   


-- 
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] dimberman commented on pull request #9084: Remove TaskInstance.log_filepath attribute

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


   @kaxil @ashb it seems there is disagreement over whether to remove this or not. What should the resolution to https://github.com/apache/airflow/issues/9036 be?


-- 
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] mik-laj commented on pull request #9084: Remove TaskInstance.log_filepath attribute

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #9084:
URL: https://github.com/apache/airflow/pull/9084#issuecomment-812892115


   @kaxil Could you please say a little more about your use case? Maybe this will allow us to develop a solution that works in all configurations/for all users, and is not good for just one particular environment.


-- 
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] kaxil commented on a change in pull request #9084: Remove TaskInstance.log_filepath attribute

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #9084:
URL: https://github.com/apache/airflow/pull/9084#discussion_r433204306



##########
File path: airflow/models/taskinstance.py
##########
@@ -382,13 +382,6 @@ def generate_command(dag_id: str,
             cmd.extend(["--cfg-path", cfg_path])
         return cmd
 
-    @property
-    def log_filepath(self):
-        iso = self.execution_date.isoformat()
-        log = os.path.expanduser(conf.get('logging', 'BASE_LOG_FOLDER'))
-        return ("{log}/{dag_id}/{task_id}/{iso}.log".format(
-            log=log, dag_id=self.dag_id, task_id=self.task_id, iso=iso))
-

Review comment:
       We should still support it, we can check if we are using a remote_logging or not.
   
   Let's not remove this - I know of many people/companies that are using this 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] stale[bot] commented on pull request #9084: Remove TaskInstance.log_filepath attribute

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


   This issue has been automatically marked as stale because it has not had recent activity. It will be closed 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #9084: Remove TaskInstance.log_filepath attribute

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


   @mik-laj Can you fix the conflicts -- and then we can merge 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org