[16.01] Allow override of job shell (for conda resolver).#1473
[16.01] Allow override of job shell (for conda resolver).#1473bgruening merged 3 commits intogalaxyproject:release_16.01from
Conversation
There was a problem hiding this comment.
s/getattr(self.app.config, 'default_job_shell', DEFAULT_JOB_SHELL)/self.app.config.get('default_job_shell', DEFAULT_JOB_SHELL)/
There was a problem hiding this comment.
def get( self, key, default ):
return self.config_dict.get( key, default )
I strongly prefer my version. I want the processed value on the config object itself. Also, I like my access pattern assumes less about config in terms of a required interface.
There was a problem hiding this comment.
I think that if they are not equivalent in this case, then that should be fixed. Isn't it the whole point of an interface to hide where the property is actually stored?
There was a problem hiding this comment.
In this particular case because the property is a string and the config property matches the name in galaxy.ini - these two are likely equivalent. But for booleans, numbers, etc... the config object attributes and not the dictionary contains the processed value - it is however for this reason that the canonical source of the information should be assumed to be the object attribute.
Most places in the code that I have seen access config options as attributes and via .get() - I don't think this is a problem and I don't think we promise get() does anything other than access the raw values in a dictionary like way. Instead of modifying get, I would rather see code that accesses config options this way access them via attributes instead.
|
It seems to me that |
|
Updated the comment. I had to modify one test tool because this breaks backward compatiblity on how the literal We could alternatively replace instances of Update: |
|
@nsoranzo You care a good deal about backward compatibility - what do you think about the fact that we need to make the change. Are you okay with it, since the original shell foo I was using wasn't very portable? Update: I'll switch to the printf version. |
|
@jmchilton Isn't that just in a test? |
|
I mean the test is indicating the PR is changing the behavior of Galaxy tools in a backward incompatible way. Is it okay to change Galaxy because the tool was poorly written and not very portable. |
|
Probably the default shell should remain '/bin/sh' since conda is not in real use yet and conda may be fixed to support other shells in the mean time. |
|
Ping @bgruening - do you thing we should delay the default switch one release or fix conda now? |
|
Sorry was travelling. We ship conda with this release so I would welcome the switch, but I can understand the concerns from @nsoranzo. @nsoranzo do you have any insider news about anaconda to support /bin/sh in the near future? Following suggestion: We leave bash for this release but deprecate it and announce the switch for the next release. Hopefully a few galaxy-admins will test this during this release cycle and provide feedback. I don't think this switch is will case much trouble as most of us already using bash but we probably don't know. This is a SL6.6: |
|
Okay - switched the default back but this fix is still required for conda to work so I think this PR should still be merged and I would propose docker-galaxy-stable and usegalaxy.org switch the default to /bin/bash for this release cycle. |
|
Indeed! I will make this default in Docker! |
config/galaxy.ini.sample
Outdated
There was a problem hiding this comment.
Fixed, sorry about that.
|
@bgruening No, I don't have any news, actually I've never used conda! |
7533320 to
8a058cb
Compare
|
👍 |
Use user's conda environment for planemo - this way if conda_init, conda_install will setup subsequent test and serve calls. Also use /bin/bash as the default job shell - requires merging galaxyproject/galaxy#1473.
I'm making more things configurable in case someday the BSD user wants to use Galaxy - the default shell for jobs can be configured at the galaxy or job destination level now.
dash will convert the literal characters \t to a tab, bash doesn't seem to do this. Use portable printf as suggested by nicola.
|
@galaxybot test this |
|
@erasche the assigned milestone is wrong Thanks! |
|
@bgruening It has been rebased, thanks for the heads up. |
[16.01] Allow override of job shell (for conda resolver).
|
Thanks @jmchilton and @nsoranzo! |
|
Thanks for the detailed review @nsoranzo and the merge @bgruening. |
|
Could you create an issue on usegalaxy-playbook noting the need for a config change on Test/Main please? |
common_startup assumes bashisms anyway. I'm making more things configurable in case someday the BSD user wants to use Galaxy - the default shell for jobs can be configured at the galaxy or job destination level now.