yuqian90 commented on a change in pull request #16167:
URL: https://github.com/apache/airflow/pull/16167#discussion_r643649217
##########
File path: airflow/models/taskinstance.py
##########
@@ -864,12 +864,14 @@ def are_dependencies_met(self, dep_context=None,
session=None, verbose=False):
for dep_status in
self.get_failed_dep_statuses(dep_context=dep_context, session=session):
failed = True
- verbose_aware_logger(
- "Dependencies not met for %s, dependency '%s' FAILED: %s",
- self,
- dep_status.dep_name,
- dep_status.reason,
- )
+ if self.state != State.RUNNING:
+ # Only log about dependencies for non-running tasks.
+ verbose_aware_logger(
+ "Dependencies not met for %s, dependency '%s' FAILED: %s",
+ self,
+ dep_status.dep_name,
+ dep_status.reason,
+ )
Review comment:
Hi @uranusjr , the log currently looks like this:
```
Dependencies not met for <TaskInstance: ... [running]>, dependency 'Task
Instance Not Running' FAILED: Task is in the running state
Dependencies not met for <TaskInstance: ... [running]>, dependency 'Task
Instance State' FAILED: Task is in the 'running' state which is not a valid
state for execution. The task must be cleared in order to be run.
Task is not able to be run
```
I've silenced the first two lines and changed the third line to "Task is
still running". I also tried to do what you suggested, but I'm still struggling
to think of a way to rephrase the first two lines to make them less confusing.
For running tasks, if the only action needed from the user is to wait, maybe
it's right to not log anything?
--
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:
[email protected]