Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

iguessthislldo
Copy link
Member

@iguessthislldo iguessthislldo commented Dec 13, 2018

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
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
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

common/utility.pm Outdated Show resolved Hide resolved
common/utility.pm Outdated Show resolved Hide resolved
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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants