Skip to content

Conversation

@pierrejeambrun
Copy link
Member

closes: #47689
Attemps: #49412 and #54481 went stale.

This adds a button to download logs. This will download the 'filtered' view as a text file. This is not emitting any additional request and re-use the one we make for displaying logs in the details tab. Just the formatting is different.

Screen.Recording.2025-10-17.at.15.31.50.mov

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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 airflow-core/newsfragments.

@pierrejeambrun pierrejeambrun added this to the Airflow 3.2.0 milestone Oct 17, 2025
@pierrejeambrun pierrejeambrun added the type:new-feature Changelog: New Features label Oct 17, 2025
@boring-cyborg boring-cyborg bot added area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default labels Oct 17, 2025
@pierrejeambrun
Copy link
Member Author

renderStructuredLog can now renders log as jsx (as before for UI displaying purpose), or as text for download purposes.

@bbovenzi
Copy link
Contributor

Maybe like the other PRs we should move the download button to be in the corner of the logs? Or we need to rename Log Settings, because "Download" isn't really a setting

@pierrejeambrun
Copy link
Member Author

Yes, you're right, updated, the download button is not in the setting drop down anymore:
Screenshot 2025-10-17 at 18 16 28

@pierrejeambrun pierrejeambrun merged commit a2ee0d8 into apache:main Oct 20, 2025
56 checks passed
@pierrejeambrun pierrejeambrun deleted the download-task-logs branch October 20, 2025 13:22
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Oct 20, 2025
* Download Tasks Logs

* Update following code review
@r-richmond
Copy link
Contributor

r-richmond commented Oct 21, 2025

@pierrejeambrun would you be open to back porting this to 3.1.1?

My request is based upon on the fact that the same logic you used here would apply to this pr given downloading task logs was also in AF2.

@pierrejeambrun
Copy link
Member Author

pierrejeambrun commented Oct 21, 2025

@r-richmond I understand, but this one really feels like a new feature compared to previous version. Not supporting log download isn't really a bug IMO.

But if this is critical and others feel like it, I guess we can be opened to back porting, but I would recommend 3.2 in that instance.

Is that something that you urgently need?

@r-richmond
Copy link
Contributor

Could you clarify why it feels like a new feature? (Given it was in 2.x I'm missing something).

I don't think I can honestly make the case for urgent. And if I'm being honest I'm just advocating for getting a feature out faster so that the list of missing features in AF3 gets a little smaller. (I was raked over the coals for early upgrading to AF3, AF2 was such a big improvement over AF1 I didn't really consider waiting. And this is one of the items I got some extra flack for since the logs in 3 have a few usability/perf degradations).

@pierrejeambrun
Copy link
Member Author

pierrejeambrun commented Oct 22, 2025

Maybe my comment on the other PR was confusing but the way I see it is that things that 'were in AF2' and are added back in 'AF3' shouldn't automatically be considered a bug fix.

For the PR you referred too (#54677) this was a behavior that used to work in AF2, and was by mistake omitted in AF3, causing bugs to people using dynamic alerts. There was no workaround it because the server would just crash. Those are the two reasons why I figured a bug fix was appropriate.

On the other side, this 'download logs' button was purposely omitted when developing AF3 because of capacity and other priorities at the time. This piece is being added back now and I think it should be flagged as a feature, because it is a feature compared to previous iteration. In the meantime people can use the Rest endpoint to download logs if they want to.

All of that is subject to interpretation, and I guess it depends on how you see it, this is what I would recommend, but I am open to other opinions if the Release Manager wants to release it early.

@bbovenzi
Copy link
Contributor

It is a feature, but I could be swayed to move it forward as its not a large change.

@bbovenzi bbovenzi modified the milestones: Airflow 3.2.0, Airflow 3.1.2 Oct 22, 2025
TyrellHaywood pushed a commit to TyrellHaywood/airflow that referenced this pull request Oct 22, 2025
* Download Tasks Logs

* Update following code review
kaxil pushed a commit that referenced this pull request Oct 31, 2025
* Download Tasks Logs

* Update following code review

(cherry picked from commit a2ee0d8)
kaxil pushed a commit that referenced this pull request Oct 31, 2025
* Download Tasks Logs

* Update following code review

(cherry picked from commit a2ee0d8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default type:new-feature Changelog: New Features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No option to download task logs on Airflow 3 UI

3 participants