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
client: add <ignore_tty> config file option (Unix) #3044
Conversation
TTY devices starting with the given string(s) will be skipped in checking for system idleness.
I know that the XML in cc_config.xml is not really XML compliant. But could we make new features use the correct syntax? This would mean that multiple tags are encapsulated in a "container" tag. The config for this feature would than look like this:
|
I think the syntax if fine as is. |
Can someone please merge this??? |
Besides my objection regarding the correct XML syntax the original requester already said that there are still problems with this:
|
That's a separate issue. BOINC has never looked for new devices after startup. |
Another reason why this should be handled dynamically: laptops with docking stations. https://boinc.berkeley.edu/forum_thread.php?id=12921&postid=91268#91268 |
The client currently has a hardwired list of directories. This PR makes it configurable. This is an improvement. Periodically looking for directories is a separate issue. |
USB devices (as per original problem) and docking stations are intended to be hot-swappable: KVMs might also come under that heading, too. We ought to move into the 21st century sometime. |
This PR is still an incremental improvement that would potentially help a great number of Linux users. Right now, I need to toggle GPU on and off whenever I want it to run on idle, which, is a much more painful experience than possibly having to restart the boinc client when I re-dock my laptop. |
@ChristianBeer and @RichardHaselgrove - This change improves the current function of the code and thus represents an improvement. You are both correct that a totally different approach to this code be better but that is a much larger change and should not invalidate the usefulness of merging this change. Can you guys agree to that so that this pull request can move forward? |
@ChristianBeer - both of these are valid XML based on https://www.xmlvalidation.com/
and
Both cases have a repeating element. Can you explain what you feel that this is not correct syntax? To put it a different way your solution repeats the <ignore_tty_devs> tag while David's repeats the <ignore_tty_dev> or more visually look this:
vs
Both are valid. If there were multiple related tags being used - then I would agree that @ChristianBeer solution is better. However, since it is only a single repeated tag - I see them as both valid and equivalent. |
Yes, I'm content to do this incrementally: fix the static/startup list now, return for dynamic device management in another PR. |
For the record my solution would look like this:
This is not an issue of validation but rather practicability. Parsing the XML into a proper tree and traversing through a proper tree is better than a self-cooked solution. This becomes more clear when you add other options to the XML. It's always better to encapsulate elements that can occur multiple times ( Because this is a central config file I believe at least this issue of encapsulating the XML elements should be dealt with in this PR and not put of until a alter time. This adds just more technical debt so I'm still opposed to this PR as is. |
@davidpanderson and @ChristianBeer - can you guys both be on the contributor call next Thursday (June 27th?) so that you two can discuss and move this forward? It would be better if you guys could meet and discuss before that so that we can get the final code into the 7.16 release. |
There is no advantage in having an enclosing tag. <alt_platform> Other than pedantry, I see no reason to change notation at this point. |
I wrote all my arguments and have nothing to add in a phone call. The argument that we should go with the quick to implement fix to a solution (and add a proper implementation later) is what lead us into the current situation. Where there this a horrific amount of technical debt that is not easily dealt with because of compatibility issues and nobody willing to do the proper implementation. If we continue in this way for the sake of speed, we run into the problem that the technical debt can never be fixed and BOINC needs to be rebuild from scratch (loosing compatibility). I'm not removing my "No" Vote and would refer to the Governance document on how to handle this: https://github.com/BOINC/boinc-policy/blob/master/Governance_Documents/Governance.md#511-consensus-voting |
I closed this PR by accident. Sorry |
@ChristianBeer While I don’t disagree with your desire to improve the XML, I feel that enforcing this PR to adhere to your proposed convention is unfair and creates friction for the development process. A convention to follow should first be agreed before it is enforced. If our desire is to improve the XML by a style guide or the use of a standard library, the approach should first be agreed in an issue before PRs are made to adhere to that convention. As such I don’t think that this should block the PR as it is following the defacto approach already employed in the code base. |
@AenBleidd @SETIguy (and anyone else) - what are your thoughts on this disagreement about the XML format? |
I should have invited any/all of the @BOINC/committer's to comment on the disagreement about the XML format. Please offer your comments on the right way to move forward on this. |
Having done a lot of work on preferences XML for GridRepublic and the Drupal integration, I very much agree that the formatting approach Christian offers is the right way to go. Since there is a dispute, I also agree with Laurence that this "right way" needs to be adopted prior to being a requirement for PRs, so this particular PR should not be blocked. If there is significant technical debt to overcome with regards to XML formatting and parsing, maybe that approach can just as easily be deprecated in favor of JSON or an otherwise more appropriate format for data exchange? It might not be worth fixing XML if, for instance, there is a use case for adding support for rapidjson instead. |
I agree with @ChristianBeer. The custom XML parser is causing a lot of issues all over the project. A standard library should have been used in the first place. I think we have to draw a line and not to merge any new quick fixes, but see the long-run and switch the XML parser to a standard library (XML, JSON whatever). |
Based on reviewing the comments above, I suggest the following is my summary and my recommendation based on the consensus above:
I recommend the following:
|
Codecov Report
@@ Coverage Diff @@
## master #3044 +/- ##
=========================================
Coverage ? 15.33%
=========================================
Files ? 40
Lines ? 6410
Branches ? 0
=========================================
Hits ? 983
Misses ? 5427
Partials ? 0 Continue to review full report at Codecov.
|
TTY devices starting with the given string(s) will be skipped
in checking for system idleness.
Fixes #3036