[Piuparts-devel] [Git][debian/piuparts][develop] WIP: reduce number of mails per day, from 4 down to 3, see #912591.

Holger Levsen gitlab at salsa.debian.org
Thu Nov 29 09:52:09 GMT 2018


Holger Levsen pushed to branch develop at Debian / piuparts


Commits:
1808bc1e by Holger Levsen at 2018-11-29T09:50:43Z
WIP: reduce number of mails per day, from 4 down to 3, see #912591.

master-bin/report_untestable_packages: redirect logs to htdocs/logs to spare
one mail per day.

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- debian/changelog
- master-bin/report_untestable_packages.in


Changes:

=====================================
debian/changelog
=====================================
@@ -8,8 +8,8 @@ piuparts (0.95) UNRELEASED; urgency=medium
     - master-bin/master_shell_runner: new script to run python scripts to
       redirect logs to htdocs/logs.
     - master-bin/detect_archive_issues, detect_piuparts_issues,
-      detect_network_issues, reschedule_oldest_logs and rotate_master_logs:
-      redirect logs to htdocs/logs.
+      detect_network_issues, reschedule_oldest_logs, rotate_master_logs and
+      report_untestable_packages: redirect logs to htdocs/logs.
     - conf/crontab-master.in: run detect_well_known_errors, piuparts-report
       and piuparts-analyze through the new master_shell_runner script.
     - piuparts-report.py: add navigation link to https://piuparts.d.o/logs/


=====================================
master-bin/report_untestable_packages.in
=====================================
@@ -18,12 +18,16 @@
 
 
 . @sharedir@/piuparts/lib/read_config.sh
+. @sharedir@/piuparts/lib/write_log.sh
 
 get_config_value MASTER global master-directory
 get_config_value SECTIONS global sections
+get_config_value HTDOCS global output-directory
 get_config_value DAYS global reschedule-untestable-days 7
 
 STARTDATE=$(date -u +%s)
+LOG_OUTPUT=$(mktemp)
+LOG_PREFIX=$(mktemp)
 
 #
 # find packages which have been in untestable for more than $DAYS days and reschedule them for testing
@@ -41,13 +45,20 @@ done
 if [ -s $LOGS ] ; then
 	FINALDATE=$(date -u +%s)
 	RUNTIME=$(date -u -d "0 $FINALDATE seconds - $STARTDATE seconds" +%T)
-	echo "Runtime: $RUNTIME"
-	echo
-	echo "Untestable packages detected, which have been tested more than $DAYS days ago!"
-	echo "These packages have been rescheduled for piuparts testing."
-	echo
-	for package_log in $(cat $LOGS) ; do
-		rm -fv $package_log | sed "s#$MASTER/##g" | tr -d "'"
-	done
+	(
+		echo "Untestable packages detected, which have been tested more than $DAYS days ago!"
+		echo "These packages have been rescheduled for piuparts testing."
+		echo
+	) > $LOG_PREFIX
+	(
+		echo "$(date -u)"
+		echo "Runtime: $RUNTIME"
+		echo
+		for package_log in $(cat $LOGS) ; do
+			rm -fv $package_log | sed "s#$MASTER/##g" | tr -d "'"
+		done
+		echo
+	) > $LOG_OUTPUT
+	publish_logs $LOG_OUTPUT $LOG_PREFIX $HTDOCS report_untestable_packages
 fi
 rm $LOGS



View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/1808bc1e5f7625d1ee94177eafe604a4be5022d5

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/1808bc1e5f7625d1ee94177eafe604a4be5022d5
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20181129/dcbc5fc4/attachment-0001.html>


More information about the Piuparts-devel mailing list