Skip to content

Exit Early for Several Commands When A Child Process Fails#4

Draft
iguessthislldo wants to merge 13 commits into
DOCGroup:masterfrom
iguessthislldo:igtd/shell_cmd_failure
Draft

Exit Early for Several Commands When A Child Process Fails#4
iguessthislldo wants to merge 13 commits into
DOCGroup:masterfrom
iguessthislldo:igtd/shell_cmd_failure

Conversation

@iguessthislldo

@iguessthislldo iguessthislldo commented Dec 13, 2018

Copy link
Copy Markdown
Member

Brought up by OpenDDS#1011 where apt-get install failed so OpenDDS configure script failed but every single other command was run anyway, even though they were all failures. I changed several autobuild commands which create child processes so that they fail when their child processes fail.

Shares some commits with #3 .

@iguessthislldo

Copy link
Copy Markdown
Member Author

I created a way to try to make this behavior controllable via an XML attribute:

<command name="whatever" required="true"/>

Means that if the command fails, then autobuild stops without processing anymore commands. However I'm not quite sure which way the default should go.

I'm also considering a required tag and/or a optional tag:

<required>
  <command name="build core library"/>
</required>
<optional>
  <command name="build supplement program"/>
  <command name="run test"/>
</optional>

Or maybe a default setting:

<configuration>
<required default="true"/>
</configuration>
@jwillemsen

Copy link
Copy Markdown
Member

The XML attribute is the least intrusive, we have a lot of autobuild xml files. I think the default is to be false, can't really predict what happens when you set the default to true

Comment thread common/utility.pm Outdated
Comment thread common/utility.pm Outdated
iguessthislldo added a commit to iguessthislldo/autobuild that referenced this pull request Apr 20, 2021
Created a new command error return mechanism that distinguishes between
fatal and non-fatal errors. This is indented to work with the `required`
attribute from DOCGroup#4.
@iguessthislldo iguessthislldo marked this pull request as draft April 20, 2021 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants