Add button to download task logs as a text file#49412
Add button to download task logs as a text file#49412aarochuk wants to merge 3 commits intoapache:mainfrom
Conversation
| const element = document.createElement("a"); | ||
|
|
||
| element.href = URL.createObjectURL(file); | ||
| element.download = `taskInstanceLogs.txt`; |
There was a problem hiding this comment.
This looks the filename for the downloaded log file. This should include dagId and taskInstance details in the name like Airflow 2 else this might keep overwriting the file on disk or create something like taskInstanceLogs(1).txt
There was a problem hiding this comment.
+1 on ${dagId}-${taskId}-${runId}-${mapIndex}-${tryNumber}.txt
| ) => { | ||
| const refetchInterval = useAutoRefresh({ dagId }); | ||
|
|
||
| const { data, ...rest } = useTaskInstanceServiceGetLog( |
There was a problem hiding this comment.
I guess you can pass text/plain in the accept here and get the raw value of the log file in the storage which is the value users usually want to reduce the code for formatting.
accept?: "application/json" | "text/plain" | "*/*";
airflow/airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py
Lines 136 to 153 in 96c6daa
|
@aarochuk mind rebasing and addressing PR comments? |
|
@bbovenzi I will make sure to make another push by the end of the week sorry it has taken so long |
|
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. |
|
@aarochuk are you still able to finish this PR? |
|
@aarochuk just checking in to see if you need help with this PR? |
|
Removing from 3.1.0 due to lack of response and the PR not in a working state. Please comment if anyone is interested in picking this up, we can add it back if possible. |
|
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. |
Added ability to download task instance logs in airflow 3 ui as described in issue #47689
closes: #47689