#483 Bail after failed compose in nightly-modular.sh
Merged 6 years ago by puiterwijk. Opened 6 years ago by adamwill.
adamwill/pungi-fedora nightly-modular-checkfail  into  master

file modified
+3
@@ -52,6 +52,9 @@ 

  fi

  

  time $CMD "$@"

+ if [ "$?" != "0" ]; then

+     exit 1

+ fi

  

  NEWCOMPOSE_ID=$(cat $TARGET_DIR/latest-Fedora-Modular-Bikeshed/COMPOSE_ID)

  SHORTCOMPOSE_ID=$(echo $NEWCOMPOSE_ID|sed -e 's|Fedora-Modular.*-||g')

When nightly-modular.sh was added, it wasn't set to check the
exit code from pungi-koji, as nightly.sh does. This was I guess
because it didn't do much after the compose finished at that
time, and the author thought it was OK for the few things it
did do to happen on both successful and failed composes.

However, it now does more stuff after compose completion, like
nightly.sh, including trying to generate changelog files and
send out a compose report email. But because the pungi-koji
exit code check is missing, it tries to do these things even
for failed composes. Changelog generation will fail when the
compose failed, and the email that gets sent out will have a
missing compose ID (because NEWCOMPOSE_ID and SHORTCOMPOSE_ID
can't be set properly and will be blank), and will be empty
because the changelog file that's supposed to be read in as the
content of the email isn't there. This is why we are getting
an empty mail with subject "Fedora Modular bikeshed compose
report: changes" every time a compose fails.

So, let's put that check in just like nightly.sh does.

Signed-off-by: Adam Williamson awilliam@redhat.com

Pull-Request has been merged by puiterwijk

6 years ago

Note, this will also mean we only try to send out fedmsgs for successful composes, as opposed to attempting to send them for all composes, as the script currently does. But I think that's correct. We shouldn't be sending out rsync.start, rsync.complete and complete fedmsgs for failed composes, and we don't do that for non-modular composes.

Metadata