From 45c90320f953302e1d175860e1abc0c1744b21ee Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Sep 06 2024 16:51:21 +0000 Subject: Only generate compose changelogs once per day This will save one compose per day as the comparison base and then will only publish the results of the comparison on a new calendar day. The comparison logs will still be generated and available in the compose tree, but they won't be mailed to the lists. Signed-off-by: Stephen Gallagher --- diff --git a/eln-nightly.sh b/eln-nightly.sh index 780c155..0092c63 100755 --- a/eln-nightly.sh +++ b/eln-nightly.sh @@ -24,7 +24,8 @@ RSYNCALTTARGET="/pub/alt/development/$RELEASE" RSYNCSECTARGET="/pub/fedora-secondary/development/$RELEASE" OSTREESRCREPO="/mnt/koji/compose/ostree/repo/" OSTREEDESTREPO="/mnt/koji/ostree/repo/" -OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-$RELEASE_TITLE/COMPOSE_ID) +OLDCOMPOSE_ID=$(cat $TARGET_DIR/LAST_COMPOSE_ID) +OLDCOMPOSE_DATE=$(echo $OLDCOMPOSE_ID|sed -e 's|Fedora-.*-||g'|cut -d "." -f1) # uncomment and edit for resuming a failed compose #COMPOSE_ID="Fedora-23-20150530.n.0" @@ -61,6 +62,7 @@ if [ "$?" != "0" ]; then fi NEWCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-$RELEASE_TITLE/COMPOSE_ID) +NEWCOMPOSE_DATE=$(echo $NEWCOMPOSE_ID|sed -e 's|Fedora-.*-||g'|cut -d "." -f1) SHORTCOMPOSE_ID=$(echo $NEWCOMPOSE_ID|sed -e 's|Fedora-.*-||g') # Set this to use later for a few items include depcheck @@ -86,7 +88,7 @@ if ! compose-changelog -p "$DESTDIR/logs/" "$TARGET_DIR/$OLDCOMPOSE_ID/" "$DESTD -e 'set envelope_from=yes' \ -s "Generating changelog for $NEWCOMPOSE_ID failed (with $VERSION)" \ rel-eng@lists.fedoraproject.org \ - < "$DESTDIR/changelog.stderr" + < "$DESTDIR/logs/changelog.stderr" fi [ -z "$ARCH" ] && { @@ -101,11 +103,18 @@ send_fedora_message "${fedora_message_json_done}" ${RELEASE} complete # Tell everyone by email about the compose # "$DESTDIR/logs/depcheck" lets not cat out depcheck for now as it does # not understand rich dependencies -SUBJECT='Fedora '$RELEASE' compose report: '$SHORTCOMPOSE_ID' changes' -for tomail in $TOMAIL ; do - cat $DESTDIR/logs/*verbose | \ - mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail -done +if [[ $NEWCOMPOSE_DATE -gt $OLDCOMPOSE_DATE ]]; then + # Only send one compose report per day or we'll be spamming + # the devel list. + SUBJECT='Fedora '$RELEASE' compose report: '$SHORTCOMPOSE_ID' changes' + for tomail in $TOMAIL ; do + cat $DESTDIR/logs/*verbose | \ + mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail + done + + # Save the new compose ID so we don't resend again until the next day + echo -n $NEWCOMPOSE_ID > $TARGET_DIR/LAST_COMPOSE_ID +fi # Copy the metadata to the non-garbage-collected metadata archive YEAR=$(echo "${SHORTCOMPOSE_ID}" | cut -c1-4)