-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fixed #10540 - greatly improved Donate CPU section in documentation / cleaned up some donate-cpu scripts
#6455
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
base: main
Are you sure you want to change the base?
Conversation
|
@feelamee as you currently contributed to the section please have a look |
|
This essentially fixes https://trac.cppcheck.net/ticket/10540. |
1d62649 to
cddb43e
Compare
readme.md
Outdated
|
|
||
| # run the client for a limited amount of packages (adjust -j to the amount of cores to use) | ||
| .env/bin/python tools/donate-cpu.py --max-packages=1000 -j1 | ||
|
|
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.
possibly we should check exit codes here?
I'm not sure, but donate-cpu.py have some handling of unstable network.
So, If it although exit with error, we need to handle this and maybe stop.
To be honest, I am a little afraid not only of the endless loop here, but especially auto updated script.
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.
possibly we should check exit codes here?
Good point. Will take a look.
I'm not sure, but
donate-cpu.pyhave some handling of unstable network.
It does. Depending on the operation it might also exit if it was not able to perform it.
So, If it although exit with error, we need to handle this and maybe stop.
I do not think we need to handle this. If the network is not working the script will be restarted but won't do anything.
To be honest, I am a little afraid not only of the endless loop here, but especially auto updated script.
If it doesn't encounter any issues it will run infinitely. And if it does it just won't do much and still run infinitely.
The auto-update is actually important. The client always needs to run the latest version otherwise they might produce wrong or missing data which caused a range of problems so far. Outdated clients also make it harder to remove deprecated functionality - see #5907.
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.
it just won't do much
Why? It allow to execute arbitrary code for users, who has write access to this repo.
I understand that this is (endless loop) useful for running in isolated environment and check sometimes.
But I, as ordinary user, will prefer to know what I execute.
So, good that this part not in file and anyone can choose how to run it.
I do not think we need to handle this. If the network is not working the script will be restarted but won't do anything.
I meant all other errors except network, because network already handled by donate-cpu.py. Errors which we most likely can't fix by just restarting script. May be using counter of sequenced errors will a good compromise.
…r handling dropped commit on `main` branch (#6917)
|
I think I rather extract the script from the documentation and replace it with just add a |
…ome donate-cpu scripts [skip ci]
|
Will require some more reworking to make it better for causal users. |
Donate CPU section in documentation / cleaned up some donate-cpu scripts [skip ci]Donate CPU section in documentation / cleaned up some donate-cpu scripts
The suggested script now is based on git so we will always run the latest version. It also makes sure the Python dependencies are always up-to-date.