-
Notifications
You must be signed in to change notification settings - Fork 4k
Speed up CircleCI more #3025
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
Speed up CircleCI more #3025
Conversation
frontend/craco.config.js
Outdated
| // end-to-end tests, as well as our production builds, so adding an | ||
| // environment variable to disable it | ||
| if (!process.env.BUILD_AS_FAST_AS_POSSIBLE) { | ||
| // HardSourceWebpackPlugin adds aggressive build caching | ||
| // to speed up our slow builds. | ||
| // https://github.com/mzgoddard/hard-source-webpack-plugin | ||
| webpackConfig.plugins.unshift(new HardSourceWebpackPlugin()) | ||
| } |
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.
Am I right in guessing that hardsource slows down builds initially, but we get the benefits later when we actually get to utilize the cache (which is why it's useful in dev mode but not when building wheels since in that case things are only built once)?
If this isn't the case then I think we can probably just get rid of it judging from what the comment here says it's added for
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.
Am I right in guessing that hardsource slows down builds initially, but ...
Yes, exactly.
Truthfully, I also find the claim that it speeds up dev builds to be kind of dubious — I've turned it off and not noticed any difference — but that's a different beast to tame.
I've added a more concise and explanatory comment.
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.
@bh-streamlit, I'm +1 on removing it completely. I haven't noticed any difference with it being turned off.
| command: | | ||
| cd frontend | ||
| TEST=$(circleci tests glob ../e2e/specs/*.spec.js | circleci tests split --total=9 --split-by=timings) | ||
| TEST=$(circleci tests glob ../e2e/specs/*.spec.js | circleci tests split --split-by=timings) |
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.
Just checking, but does the --total flag here get to be removed due to the change to no longer always assign the hello / component-template tests to a single instance?
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.
Yes, before we had some asinine logic (written by me) that explicitly set --total to the number of instances minus 1. That way one instance wouldn't receive any tests, and that was its cue to just run the hello/component-template tests.
* develop: Set baseUrl to . Speed up CircleCI more (#3025) Add events to keep track of theme changes and other theme stats (#3012) Have MetricsManager enqueue events when disconnected (#3011) Fix for query param issue with base url (#2894) Add fuzzy search to selectbox (#2933) Informative repr methods for our python classes (#3027) ComponentInstance: handle iframe changes (#3015)
* st_form: Set baseUrl to . Speed up CircleCI more (streamlit#3025) Add events to keep track of theme changes and other theme stats (streamlit#3012) Have MetricsManager enqueue events when disconnected (streamlit#3011) Fix for query param issue with base url (streamlit#2894) Add fuzzy search to selectbox (streamlit#2933) Informative repr methods for our python classes (streamlit#3027) ComponentInstance: handle iframe changes (streamlit#3015)
Changes:
streamlit helloand component-template tests across instancesno_credentialsparameter inrun_test()inrun_e2e_scripts.pyas it was not being usedAn entire CircleCI build now takes about 5 minutes, down from 8-15. (This is assuming a warm CircleCI cache. It invalidates at midnight UTC, in which case creating the virtualenv takes an extra 2-3 minutes, and saving it to cache takes an extra 1-2 minutes. I don't know why.)