-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flow run logs csv download #14703
Flow run logs csv download #14703
Conversation
CodSpeed Performance ReportMerging #14703 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally understand the motivation here, and your implementation makes a lot of sense if it ran client-side. However, while True:
style loops like this have big performance implication (and risk) when run server side, and in addition this could eat up a lot of memory depending on the size of the logs being requested, so I think we're going to need to consider other alternatives.
@chrisguidry or @zangell44 let me know if you disagree with my take here
It looks like this is using a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll be good since you're using the StreamingResponse
, but can we get a unit test in for this one?
Awesome, makes sense - deferring my review to @chrisguidry in that case 🫡 |
@cicdw and @chrisguidry thank you! I'll work on some tests. Also @chrisguidry and @zangell44 curious about cloud and if this same solution would work there. |
Yep I think streaming would work just fine on Prefect Cloud too, although there are a few more layers of load balancers/proxies involved. When we get there, let's set aside some time to design a load test for it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for that extra time on the testing!
Description
Adds a new endpoint
/api/flow_runs/{id}/download-logs-csv
which downloads a csv of all logs a flow run created. This csv looks likeExample
Going to
"api/flow_runs/{id}/download-logs-csv
downloads a csv file to the browser.Checklist
maintenance
,fix
,feature
,enhancement
,docs
.<link to issue>
"mint.json
.