Setting error levels in <stdio>
Hi all, Regarding https://bitbucket.org/galaxy/galaxy-central/issue/325 and the new <stdio> tag is described on the wiki here: http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax The wiki text is unclear - it suggests square brackets might be needed, but the example lacks them: 1 <stdio> 2 <exit_code range="2" level="fatal" description="Out of Memory" /> 3 <exit_code range="3:5" level="warning" description="Low disk space" /> 4 <exit_code range="6:" level="fatal" description="Bad input dataset" /> 5 </stdio> In particular the less-than syntax might be being miss-rendered by the wiki. I've tried this as a way to say non-zero (i.e. more than one, or less than zero), but had an error in the Galaxy log from this: <stdio> <exit_code range="1:" /> <exit_code range="://0" /> </stdio> Thanks, Peter
You should be able to use the following: <stdio> <exit_code range="1:" /> <exit_code range=":0" /> </stdio> Square brackets are not supported in the range. However, note that many shells will not return an exit code that is less than 0. Instead, the lowest 8 bits (i.e., value mod 256) will be returned. So returning -1 will give you -1 mod 256 = 255, returning -2 will give -2 mod 256 = 254, and so on. This should be true, as far as I know, for Linux and OS X. That means that you should only need one such range to support "not equal to 0" semantics (though your mileage may vary): <exit_code range="1:"> There is the issue of supporting negated ranges such as "not equal to 2". Another possibility is a set of comma-delimited ranges. I wanted to keep the syntax as simple as possible (but no simpler), put the functionality out there and then add whatever makes it significantly easier to use. Supporting all exit codes could be done with a single range, so it didn't seem as useful to add those ranges at the time. -Scott ----- Original Message -----
Hi all,
Regarding https://bitbucket.org/galaxy/galaxy-central/issue/325 and the new <stdio> tag is described on the wiki here: http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax
The wiki text is unclear - it suggests square brackets might be needed, but the example lacks them:
1 <stdio> 2 <exit_code range="2" level="fatal" description="Out of Memory" /> 3 <exit_code range="3:5" level="warning" description="Low disk space" /> 4 <exit_code range="6:" level="fatal" description="Bad input dataset" /> 5 </stdio>
In particular the less-than syntax might be being miss-rendered by the wiki. I've tried this as a way to say non-zero (i.e. more than one, or less than zero), but had an error in the Galaxy log from this:
<stdio> <exit_code range="1:" /> <exit_code range="://0" /> </stdio>
Thanks,
Peter
My apologies: <stdio> <exit_code range="1:" /> <exit_code range=":-1" /> </stdio> Again, note that the second range will not be useful as OS X and Linux (or at least the distros I've used) will never return a value less than 0. Sorry. -Scott ----- Original Message -----
You should be able to use the following:
<stdio> <exit_code range="1:" /> <exit_code range=":0" /> </stdio>
Square brackets are not supported in the range.
However, note that many shells will not return an exit code that is less than 0. Instead, the lowest 8 bits (i.e., value mod 256) will be returned. So returning -1 will give you -1 mod 256 = 255, returning -2 will give -2 mod 256 = 254, and so on. This should be true, as far as I know, for Linux and OS X. That means that you should only need one such range to support "not equal to 0" semantics (though your mileage may vary): <exit_code range="1:">
There is the issue of supporting negated ranges such as "not equal to 2". Another possibility is a set of comma-delimited ranges. I wanted to keep the syntax as simple as possible (but no simpler), put the functionality out there and then add whatever makes it significantly easier to use. Supporting all exit codes could be done with a single range, so it didn't seem as useful to add those ranges at the time.
-Scott
----- Original Message -----
Hi all,
Regarding https://bitbucket.org/galaxy/galaxy-central/issue/325 and the new <stdio> tag is described on the wiki here: http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax
The wiki text is unclear - it suggests square brackets might be needed, but the example lacks them:
1 <stdio> 2 <exit_code range="2" level="fatal" description="Out of Memory" /> 3 <exit_code range="3:5" level="warning" description="Low disk space" /> 4 <exit_code range="6:" level="fatal" description="Bad input dataset" /> 5 </stdio>
In particular the less-than syntax might be being miss-rendered by the wiki. I've tried this as a way to say non-zero (i.e. more than one, or less than zero), but had an error in the Galaxy log from this:
<stdio> <exit_code range="1:" /> <exit_code range="://0" /> </stdio>
Thanks,
Peter
The wiki markup was also fixed. The "//" is not supported. -Scott ----- Original Message -----
My apologies:
<stdio> <exit_code range="1:" /> <exit_code range=":-1" /> </stdio>
Again, note that the second range will not be useful as OS X and Linux (or at least the distros I've used) will never return a value less than 0.
Sorry.
-Scott
----- Original Message -----
You should be able to use the following:
<stdio> <exit_code range="1:" /> <exit_code range=":0" /> </stdio>
Square brackets are not supported in the range.
However, note that many shells will not return an exit code that is less than 0. Instead, the lowest 8 bits (i.e., value mod 256) will be returned. So returning -1 will give you -1 mod 256 = 255, returning -2 will give -2 mod 256 = 254, and so on. This should be true, as far as I know, for Linux and OS X. That means that you should only need one such range to support "not equal to 0" semantics (though your mileage may vary): <exit_code range="1:">
There is the issue of supporting negated ranges such as "not equal to 2". Another possibility is a set of comma-delimited ranges. I wanted to keep the syntax as simple as possible (but no simpler), put the functionality out there and then add whatever makes it significantly easier to use. Supporting all exit codes could be done with a single range, so it didn't seem as useful to add those ranges at the time.
-Scott
----- Original Message -----
Hi all,
Regarding https://bitbucket.org/galaxy/galaxy-central/issue/325 and the new <stdio> tag is described on the wiki here: http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax
The wiki text is unclear - it suggests square brackets might be needed, but the example lacks them:
1 <stdio> 2 <exit_code range="2" level="fatal" description="Out of Memory" /> 3 <exit_code range="3:5" level="warning" description="Low disk space" /> 4 <exit_code range="6:" level="fatal" description="Bad input dataset" /> 5 </stdio>
In particular the less-than syntax might be being miss-rendered by the wiki. I've tried this as a way to say non-zero (i.e. more than one, or less than zero), but had an error in the Galaxy log from this:
<stdio> <exit_code range="1:" /> <exit_code range="://0" /> </stdio>
Thanks,
Peter
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
On Thu, Sep 20, 2012 at 4:59 PM, Scott McManus <scottmcmanus@gatech.edu> wrote:
My apologies:
<stdio> <exit_code range="1:" /> <exit_code range=":-1" /> </stdio>
Great. Something like <exit_code range="!0" /> would be shorter but I appreciate wanting to keep the syntax simple.
Again, note that the second range will not be useful as OS X and Linux (or at least the distros I've used) will never return a value less than 0.
I'm sure I've had return code -9 to mean a job died from signal 9 (SIGKILL), but I forget now which OS exactly this was on but I think CentOS Linux. This use of negative return codes -N when killed by signal N could be a Python specific convention, but if so I think it could show up in Galaxy: http://docs.python.org/library/subprocess.html Peter
participants (2)
-
Peter Cock
-
Scott McManus