Improve cleanup of tinderbox-builds

RESOLVED FIXED

Status

Release Engineering
Other
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: nthomas, Assigned: nthomas)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 8463182 [details] [diff] [review]
[svn] Moar cleanup

* we create latest symlinks now, but don't remove them when the target is expired.
* we've never removed empty directories in tinderbox-builds, which makes it hard to find things by creating a long list
Attachment #8463182 - Flags: review?(rail)
Comment on attachment 8463182 [details] [diff] [review]
[svn] Moar cleanup

rail is on pto, switching to hwine.
Attachment #8463182 - Flags: review?(rail) → review?(hwine)
Comment on attachment 8463182 [details] [diff] [review]
[svn] Moar cleanup

Review of attachment 8463182 [details] [diff] [review]:
-----------------------------------------------------------------

r- for uncertainty in last 'find' execution -- see notes

::: files/cron/ffxbld
@@ +4,4 @@
>  0 3 * * * (echo; date; nice -n 19 /usr/local/bin/archive-debug-builds.sh) >> $HOME/archive_debug_builds.log
>  
>  # Keep 30 days of on-change builds
> +@daily   for dir in /pub/mozilla.org/{firefox,mobile,b2g}/tinderbox-builds; do nice -n 19 find ${dir} -mindepth 2 -maxdepth 2 -type d -mtime +29 -name 1????????? -print0 | xargs -0 rm -rf && symlinks -d ${dir}/* > /dev/null && find ${dir} -mindepth 1 -maxdepth 1 -empty -delete; done

A few comments:
 - the 'nice' command now only applies to first 'find' command. Not sure that was intended.
 - I didn't see the exit codes of 'symlinks' defined, so it's unclear if the last 'find' will always be executed.
 - I don't understand why the statements are joined with '&&' instead of just ';' -- they shouldn't interact.

I wouldn't object at all if these issues were addressed and/or clarified by moving the logic to a script, and just invoking that from cron. :)
Attachment #8463182 - Flags: review?(hwine) → review-
Created attachment 8466838 [details] [diff] [review]
[svn] Moar cleanup, v2

* drops the nice all over the file. These used to run on the same box that uploads are going onto but no longer
* swaps from '&&' to ';', as the jobs are independent of each other, and can't make any earlier fail worse
* cleans up b2g/nightly/ a little harder
Attachment #8463182 - Attachment is obsolete: true
Attachment #8466838 - Flags: review?(hwine)
Comment on attachment 8466838 [details] [diff] [review]
[svn] Moar cleanup, v2

Review of attachment 8466838 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm
Attachment #8466838 - Flags: review?(hwine) → review+
Comment on attachment 8466838 [details] [diff] [review]
[svn] Moar cleanup, v2

Committed revision 91427
Attachment #8466838 - Flags: checked-in+
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
QA Contact: pmoore → mshal
You need to log in before you can comment on or make changes to this bug.