Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem:
makeresourcescommand, which generates PDFs (Printables) for resources, takes so long that the task needs to be split into 11 different jobs on Travis.Main Changes:
makeresourcescommandupdate_liteinstead ofupdatefor making resources in dev_deploy scripts that use themakeresourcescommand(prod_deploy is unchanged presently)
Secondary Changes:
makeresourcethumbnailscommand (resolves Parallelise makeresourcethumbnails command #855)Effects:
On my PC (6c12t) using 6 threads
makeresourcescommand (details below)makeresourcethumbnailscommandupdatecommandsqlite3.ProgrammingErrorwhen attempting to run over multiple threads. I couldn't figure why these 6 had an sqlite3 object that the others didn't have, so I added code that reverted to processing in series when a problem was detected. Further improvements should be possible if we can get a nicer solution.Binary to Alphabetresource is the only one that is successfully parallelised yet consistently takes longer to generate.Travis
Sadly I have no way to check in advance how any of these changes will affect our actual deployment
update_liteinstead ofupdateis a ~90% reduction in time to complete for (as far as I can tell) the same resultKnown Issues
When Travis runs tests on this branch (
continuous-integration/travis-ci/pr,continuous-integration/travis-ci/push), it can get a 'file already exists' error when running themakeresourcespart of the tests.My theory is that it's related to Modify tests to not write to build/static/staticfiles directories #700 – Travis runs these test jobs in parallel so it might be possible to (for example) have the management tests fail when creating a file because the test backwards had already created the file and not yet removed it. This would explain why I haven't seen any test fail when run in series. However, entirely different builds shouldn't interfere with each other so I don't know for sure
None of the tests replicate the issue that prevents multithreading when creating resources/thumbnails, so the exception handlers don't get hit in codecov