add check to ensure that --robot argument specifies an existing directory#2086
Conversation
|
@damianam If my memory serves me right, you brought this up at some point... Please review? |
|
I remember hitting an issue with
In my opinion the order of the options shouldn't affect the behaviour of EB. It looks to me like we should make the parsing of options a bit smarter when grouping them together in a single switch. |
|
@damianam the problem is how to distinguish between the valid use case of giving The only way to distinguish is to actually check whether When Note that the problem is also wider than e.g. |
|
To me it looks more natural to have a space between the option and the argument (ie: I'd type Then, in the more general case of |
|
@damianam the space is irrelevant, you still have the same problem where We currently don't have the requirement that easyconfig files need to add in |
|
Also, not that |
Well, this looks like a good enough reason ;-P. Looking from the other side, is there a reason to don't require easyconfigs to end in |
|
There's no reason to require the This was sort of a (potentially unintentional at first) design choice, and I see no reason to diverge from that now (although in practice, most people probably use the |
|
Sure, but with that "restriction" in place you don't even have to read the contents for this kind of thing, which will make it a bit more efficient. Besides that, there are tons of examples in UNIX of similar things. The linux linkers just check for My point is that even if it is technically possible to accept any kind of extension (or lack of), that doesn't necessarily make it a good idea. #extensionsmatter ;-P. Putting that restriction in place will allow us to fix this issue quickly and efficiently, and will even enforce good practices. I've had people pointing me to a directory with a bunch of files without extensions, and I had to manually check which ones were easyconfigs and which ones weren't. That is bad practice I think, enforcing that everyone uses something standard that makes sense is not a bad thing IMO. Moreover, easybuild has in place way more stricter conventions for easyconfig files already ( |
|
In my opinion, activating the robot and settings the paths for the robot should be two different options. I've personally never used |
|
@damianam I agree that using a However, that's an orthogonal discussion to what is being done in this PR, imho, since that would not fix the problem where people use @wpoely86 w.r.t. I was hoping that this would be a trivially accepted change, not to trigger a giant discussion... Can you please let me know whether or not the actual change being made here is a good idea or not? |
|
@boegel I am ok with a big fat warning, I think it makes sense. I don't think it is an orthogonal discussion. Partly yes, but it is relevant to this one because it might help to solve the original issue in an easy way. What I would propose is:
With that we avoid this bug and break backwards compatibility in a very mild (and desirable?) way. Otherwise, if I understand the current fix right, you can no longer activate the robot without passing it an existing directory. That's not an issue for us, but some people might want to enable it without passing any extra directory. |
|
@damianam I see your point about allowing The proposed change is not supposed to break the use of just |
|
moving this to v3.2.0 milestone, not worth blocking the v3.1.0 release over this @damianam let's discuss this over a beer or two during the EUM ;-) |
… but only if it is a non-existing directory
…to avoid interpreting '-rD' as '--robot D'
|
Picking up on this again to try and get this merged for EasyBuild v4.0... @damianam I've made additional changes that should cover your suggestions:
|
fix for #955