-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Abort functional tests early upon low drive space #23100
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
Conversation
Concept ACK |
@katesalazar just a few notes:
|
@meshcollider wrote:
Does agreeing come simply from trusting Marco, or |
Again, no one asked you to trust me. Everything is in the source code, which you can read or execute yourself: #23100 (comment) |
You keep not proving your point, |
That's fine, you don't have to do anything you don't want to. However, this Pull Request is not going to be merged with the review comments left unaddressed, or the |
I've watched example_test.py failing to run successfully, |
See also: Line 146 in 9e530c6
In: Lines 144 to 150 in 9e530c6
|
I think it can refuse to boot with 'Disk space too low' with more than |
cd1b1dc
to
471b970
Compare
test/functional/test_runner.py
Outdated
@@ -27,6 +27,11 @@ | |||
import logging | |||
import unittest | |||
|
|||
# Should (in general but not always) fail testing and immediately stop if free space falls below. | |||
# Constant value 50M comes from `bool CheckDiskSpace(2)` at | |||
# `src/util/system.h` via uses in `src/node/blockstorage.cpp`. |
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.
Please don't put source file names / C++ implementation details here, as they are likely to just become outdated in regards to the code. Also, comments like "in general but not always" are not really useful, unless they are elaborated on (and that would be overkill here), as the reader is just left wondering about the "but not always" conditions.
Please squash your commits again :) It is good practice to squash after every fixup so that the PR is immediately ready to review and merge. Otherwise, squashing later will invalidate the ACKs on that commit hash. |
Conceptually it'd be cleaner if you could detect Bitcoin Core complaining about free space once and then abort the test, but I don't know if that's feasible. |
Understood and grabbed this advice for urgent changes. I'll squash on demand, because that's the rules. * Let's imagine for a while the references log does not exist.
Could spawn a thread which monitors outputs looking for "Disk space too low". That is a great idea if a test can take a very long time to naturally abort once |
BTW I very much appreciate your patience with my |
You should, because in general people don't review PRs that look WIP - and unsquashed fixup commits immediately signal WIP. PRs are required to be clean and tidy for merge. There's no need to worry about loss because the new commit should always be an improvement over the old. Feel free to keep a backup of your old commits on a separate branch locally though if you want to. |
@meshcollider wrote:
I pushed 4b41e9d on top of dc43901. I don't know what's the software allowing to push an As the code should be the same and only the commit message should If that's a manual process as I suspect, then this tool fails to provide |
@katesalazar I don't understand your previous comment. In any case, you need to squash your commits. You should just be doing that by default. |
@fanquake wrote:
Don't worry, I'm surely missing some task you do when you review. Let's suppose there is a rev A changing 1000 lines, it's acknowledged. Submitting B on top of A is straight forward and safe. You want me to directly push B fixed up in A, i.e. rev C, so that I just need you to teach me what's the command that tells you that How do you compare A to C and get the equivalent to B without me even |
Clarification, |
You probably want |
Oh, we stand on the shoulders of giants! But even if range-diff works, how would you make sure that the old A reviewed rev is worth a lot more an asset than an unreviewed rev. Don't you need to reconfigure the references log or the garbage Or what you do is to just never update your local copy of a feature |
You can create a branch or tag to make sure git doesn't gc it |
Understood. Good enough, thanks. |
Concept ACK. I tend to run functional tests on a RAM disk which occasionally runs out of space, resulting in weird behavior. Hopefully this PR helps. |
save dev time good :)
code review ack is invested time ;D
thanks for the necromancy, cheers
…On Thu, Dec 9, 2021 at 11:45 AM Sjors Provoost ***@***.***> wrote:
Concept ACK. I tend to run functional tests on a RAM disk which
occasionally runs out of space, resulting in weird behavior. Hopefully this
PR helps.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23100 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMRS4WZBYMCU4X3DRKAEJRDUQCCGHANCNFSM5EY4R27A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
d30a78e
to
2c98a20
Compare
shutil_disk_usage_stat_ = shutil.disk_usage(testdir) | ||
try: # XXX | ||
shutil_disk_usage_stat_ = shutil.disk_usage(testdir) | ||
except FileNotFoundError: # XXX |
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.
have to investigate why this fixed CI
As an exception, last functional tests to be run do not impose drive space requirements. Some neighboring lines do not follow PEP8 strictly, so neither does some of the lines in this change. Includes many suggestions courtesy of MarcoFalke and fanquake and theStack.
What is the status of this? Are you still working on it? It's not mergable in it's current state. |
This was finished at some point, but I failed to keep up
I don't have the time, hardware and drive I'd want |
That's fine. We'll close it as "Up for Grabs". |
This change rushes a fix for #23099.
This approach works for test/functional/test_runner.py in my system,
changes to test/fuzz/test_runner.py are untested at the time of writing
(I don't know how to run this command).