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/10/10 06:42:11 UTC
[GitHub] [airflow] shokosanma opened a new issue, #26960: can't see failed sensor task log on webpage
shokosanma opened a new issue, #26960:
URL: https://github.com/apache/airflow/issues/26960
### Apache Airflow version
2.4.1
### What happened
![image](https://user-images.githubusercontent.com/24224756/194797283-6c26ad63-d432-4c41-9f91-2dbc47417ec7.png)
when the sensor running, I can see the log above, but when I manual set the task state to failed or the task failed by other reason, I can't see log at here
![image](https://user-images.githubusercontent.com/24224756/194797633-0c7bf825-8e83-42af-8298-03491a26b7c9.png)
In other version airflow, like 2.3/2.2, this still happens
### What you think should happen instead
_No response_
### How to reproduce
_No response_
### Operating System
Ubuntu 20.04.4 LTS (Focal Fossa)
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] bbovenzi commented on issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
bbovenzi commented on issue #26960:
URL: https://github.com/apache/airflow/issues/26960#issuecomment-1273549210
@shokosanma I think I've replicated the issue. But can you check if the logs for that task instance show up in the grid view?
We calculate the try number in a different way for each view. We should probably make that more consistent.
--
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] shokosanma commented on issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
shokosanma commented on issue #26960:
URL: https://github.com/apache/airflow/issues/26960#issuecomment-1272875019
> When the tasks runs and fails you will see the logs you must have made a mistake..
>
> When you manually set it to failed you will not see logs. This is expected behaviour because when you set the tasks to failed before manually runing the task it does not produce any log.
there may be some misunderstanding, I want to express that the sensor has been running for a while and produce some log, when the error happen or manually set to failed, the old produced log can't be seen on webpage but can be found in /opt/airflow/logs.
--
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 issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26960:
URL: https://github.com/apache/airflow/issues/26960#issuecomment-1272878008
Can you see if there are any errors in the console of your browser? Without it it is impossible to diagnose 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] shokosanma commented on issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
shokosanma commented on issue #26960:
URL: https://github.com/apache/airflow/issues/26960#issuecomment-1274030477
@bbovenzi thanks.
And in version 2.4, I can see log in grid view, but it is hard to view log in old version airflow, so it helps for debugging in old versions.
![image](https://user-images.githubusercontent.com/24224756/194988023-4524fcb0-7bd3-4ff5-9fd6-499a58e63d84.png)
--
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 closed issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
potiuk closed issue #26960: can't see failed sensor task log on webpage
URL: https://github.com/apache/airflow/issues/26960
--
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] shokosanma commented on issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
shokosanma commented on issue #26960:
URL: https://github.com/apache/airflow/issues/26960#issuecomment-1272888892
My dag is like 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 issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26960:
URL: https://github.com/apache/airflow/issues/26960#issuecomment-1272880566
Generally - please explain more details what you do - otherwise it might be impossible to solve.
(BTW,. The more information you provide the higher chance you will get that someone wiil help to solve your problem - for example you never mentioned that the logs are there, were there and disappeared - hence it was not "misunderstanding" but lack of sufficient 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.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] bbovenzi closed issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
bbovenzi closed issue #26960: can't see failed sensor task log on webpage
URL: https://github.com/apache/airflow/issues/26960
--
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] shokosanma commented on issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
shokosanma commented on issue #26960:
URL: https://github.com/apache/airflow/issues/26960#issuecomment-1272940150
sorry, let me post more detail, my dag is like this
```
from airflow.utils.dates import days_ago
from airflow.decorators import dag
from airflow.sensors.python import PythonSensor
import time
args = {
# Airflow above 1.8.0 require a fixed start_date
"start_date": days_ago(1),
"catchup": None,
"provide_context": True,
"queue": "",
}
@dag(
dag_id="test_sensor",
default_args=args,
schedule_interval=None,
max_active_runs=2,
tags=["test"],
)
def test():
def bo():
for i in range(10):
time.sleep(1)
print(i)
return False
ob = PythonSensor(
task_id="ob",
poke_interval=60,
mode='reschedule',
python_callable=bo,
timeout=3600*6
)
ob
d = test()
```
when the task is in running/up_for_reschedule state, checking log will send a get requests to http://localhost:8080/get_logs_with_metadata?dag_id=test_sensor&task_id=ob&map_index=-1&execution_date=2022-10-10T07%3A27%3A13.805132%2B00%3A00&try_number=1&metadata=null
![image](https://user-images.githubusercontent.com/24224756/194822370-e58cc1ca-5c4e-4d26-b06c-b0596ba9f423.png)
when the task in up_for_reschedule state, manually set task to failed or the task change to failed state with some unknown reason, the brower will not send the requests above
![image](https://user-images.githubusercontent.com/24224756/194822042-0a97af95-dd53-4699-8993-f3011b68fb58.png)
the console
![image](https://user-images.githubusercontent.com/24224756/194822532-25609bc7-853d-4166-87d3-9490373308fa.png)
--
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 issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26960:
URL: https://github.com/apache/airflow/issues/26960#issuecomment-1272852349
When the tasks runs and fails you will see the logs you must have made a mistake..
When you manually set it to failed you will not see logs. This is expected behaviour because when you set the tasks to failed before manually runing the task it does not produce any log.
--
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 issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #26960:
URL: https://github.com/apache/airflow/issues/26960#issuecomment-1272847136
Thanks for opening your first issue here! Be sure to follow the issue template!
--
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 issue #26960: can't see failed sensor task log on webpage
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26960:
URL: https://github.com/apache/airflow/issues/26960#issuecomment-1272996742
cc: @bbovenzi / @pierrejeambrun -> this one seems interesting (no time to verify it though before going for vacation).
--
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