-
Notifications
You must be signed in to change notification settings - Fork 67
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
CSV file size is funbounded when append option is true #70
Comments
Thanks for opening the issue and the comprehensive explanation, @jensck! I'm also totally going to steal that term funbounded. :) The same issue came up internally but we decided to defer working on a solution so far. To me, the second risk was actually more important than the first as the whole point of the plugin was to lead to faster builds - while this could lead to the exact opposite. I'd like to avoid reinventing the wheel here and log truncation and rotation seems like it should be a pretty well researched topic. Do you - or anyone else - have any suggestions on what could be used here? |
Glad you liked "funbounded" -- that's a gem from my former colleagues at Code42 which I thought deserved to enter the broader hacker lexicon. :) As for the solution, some kind of log rollover approach is what came to mind for me. There might be more sophisticated approaches that are worth exploring if needed, but here's a simple first cut: Add a config option specifying the number of days worth of events to keep. While this isn't a perfect solution for predicting log size, it's arguably the most useful, relatable measurement.
I don't have any specific thoughts about implementation, but the performance of the JVM and the availability of great IO libraries like Okio should make it fairly straightforward? |
Browsing through the code, it looks like the CSV records file is "funbounded". (Funbounded, because what's more fun than a mystery file with an unbounded size silently filling up your disk? ;)
I see two issues with this:
CSVSummaryReporter
will get slower. If the file is big enough, this means that the build time plugin could, ironically, slow down the build by a meaningful amount (e.g.: more than a 1-2 seconds).This isn't stopping me from using the plugin personally, but my team (and by extension, lots of other devs, I imagine) are uncomfortable adding a plugin which requires manual maintenance, since users will naturally forget to do it until the situation becomes unbearable, like running out of disk space, or build times going up by tens of seconds because it has to process a multi-gigabyte file.
The text was updated successfully, but these errors were encountered: