-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Use /tmp for test repositories #11126
Conversation
|
SQLite test from #11032: SQLite test (also on ARM) from this PR: PGSQL test (also on ARM) from this PR: |
It would be nice if anyone can test this in other environments (e.g. Windows, FreeBSD, etc.) |
Tests from #11032: Tests from this PR: |
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.
This appears to work as much in Windows as it did before, at least on my machine.
That is to say, certain tests fail, but they have never worked on my machine. So this PR didn't break anything further as far as I can tell. 🙃
Not going to explicitly approve, just so we can have others test as well before merging. (I might test it later on my Linux machine as well if I have some time)
Codecov Report
@@ Coverage Diff @@
## master #11126 +/- ##
==========================================
+ Coverage 43.42% 43.48% +0.05%
==========================================
Files 600 600
Lines 85022 85108 +86
==========================================
+ Hits 36922 37005 +83
+ Misses 43541 43536 -5
- Partials 4559 4567 +8
Continue to review full report at Codecov.
|
@jolheiser have you tested? |
I'm all for storing things in RAM here though this PR assumes /tmp is tmpfs and not on disk but that usually isn't the case unless it has been configured that way. The two systems I have access to (Debian Jessie and MacOS) don't mount /tmp as tmpfs by default so this PR wouldn't reduce disk I/O in any way for those and /tmp is just another folder on disk. Since the test run times here are the same as every other current PR I'm skeptical that it is doing anything different in our CI system either since @6543 claimed in a test that using tmpfs reduced the run time by 10 minutes. Maybe @techknowlogick would know and could say if /tmp in whatever environment our CI runs is mounted as /tmpfs and if not maybe there is a better location for that (or it could be reconfigured to do so if this is even possible). |
I understand what you mean as it's not guaranteed that /tmp is a tmpfs/ramdisk however, it's definitely better form for our tests to create tmp repositories in /tmp. At least now the drone-cli could be set up to use a tmpfs for /tmp and gain generally from that. |
@mrsdizzie Usage of This PR could be expanded, for instance by accepting a directory name, or making the |
@mrsdizzie it seems you're right. After merging with this PR, you PR is still taking a long time. 😟 |
@guillep2k hm where do you see a high reduced test time in our CI? The average builds for this PR and anything after it was merged don't show any consistent decrease (some show increases, but seems like normal fluctuation probably) and #11032 is still hitting the same file write limiting. Apline linux does not seem to mount /tmp as tmpfs either in a quick check
I see how this PR works and I think this change is good and not suggesting it should be different I just don't think it is yet making any change to disk I/O in our CI builds. @zeripath is right we should now try and make sure /tmp is mounted as tmpfs and then it should 'just work' because of changes in this PR. Not sure how involved that is if it means changing something about the default docker image used. |
So the gain in time was apparently just a fluke? |
* Add option to use /tmp for test repositories * Fix exit status * Add feedback about using tmp repos Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This PR modifies the build process so test repositories are created in a temporary directory by means of
mktemp
. This happens when theUSE_REPO_TEST_DIR
environment variable has a value of1
.The goal is to avoid too much I/O overhead as observed recently, especially in ARM builds.
I've also changed
.drone.yml
in order to use this new setting.Inspired in this SO answer.