Asteam and playercore file cleanup scripts needed.

RESOLVED FIXED in Q3 11 - Serrano

Status

defect
P3
normal
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: cpeyer, Assigned: jsudduth)

Tracking

unspecified
Q3 11 - Serrano
Bug Flags:
flashplayer-qrb +

Details

Attachments

(2 attachments, 4 obsolete attachments)

Reporter

Description

10 years ago
This is a tracker bug for qe to implement cleaning up / disk freeing scripts:

Asteam:
- delete all files > 4M and older than 4 weeks in redux (apx savings of 335M per build)

playercore:
- add a cleanup step in the build process that would delete and directories in the "builds" dir that are older than 4 weeks

- clean out analytic data regularly

Comment 1

10 years ago
playercore:
- only need to clean analytic data and log files older than 1 month

buildslaves:
- add a cleanup step in the build process that would delete directories in
the "builds" dir that are older than 4 weeks
Reporter

Comment 2

10 years ago
Pushed a python script that is run on asteam via the Task Scheduler every day @ 3:20AM:

http://asteam/hg/qe/file/tip/buildbot/scripts/clean_asteam_builds.py

The script removes files that are > 28 days old AND > 4 megs in size.

Updated

10 years ago
Assignee: nobody → cpeyer
Status: NEW → ASSIGNED
Flags: flashplayer-qrb+
Priority: -- → P3
Target Milestone: --- → flash10.2

Comment 3

9 years ago
can this be closed?

Updated

9 years ago
Whiteboard: for-jim

Comment 4

9 years ago
I think there should still be an automatic cleanup step in the build system that would delete builds from the slaves.

Proposal:
At the end of the "test" phase have a "clean" buildstep. This would delete all contents in the "builds" directory on the build slave. Could add smarts to the script to only delete build directories that are older that 1 week, leaving a buffer of builds in the event that you need to trouble shoot something.

Comment 5

9 years ago
Jim, please work with Chris to resolve this.
Assignee: cpeyer → jsudduth
Whiteboard: for-jim
Assignee

Comment 6

9 years ago
1. winmobile-performance doesn't have a util_process_clean step; does it need a util_clean_buildsdir step?

2. Does windows_frr need a util_clean_buildsdir step?

3. For the performance tests should the util_clean_buildsdir step go before bb_lockrelease, after, or does it matter?

4. Does android-performance need a util_clean_buildsdir step?
Attachment #437948 - Flags: review?(cpeyer)
Reporter

Comment 7

9 years ago
Comment on attachment 437948 [details] [diff] [review]
Clean test folders older than one week at the end of the test run.

Looks good.

Answers to questions in comment #6:

1. yes
2. yes
3. it needs to go after, as the bb_lockaquire steps prevent anything else from running on the machine until bb_lockrelease
4. yes

Additionaly:

In commonsteps.py, the description should sub builds folders for test folders.

In your clean-buildsdir.sh script, will find return a non-zero exitcode if no files/dirs are found?  If so we should explicitly exit with a zero exitcode

You mistakenly included changes to configure.py in the patch.
Attachment #437948 - Flags: review?(cpeyer) → review-
Assignee

Comment 8

9 years ago
Posted patch Second patch submission. (obsolete) — Splinter Review
Fixes to previously denied patch 437948.
Attachment #437948 - Attachment is obsolete: true
Attachment #438107 - Flags: review?
Reporter

Comment 9

9 years ago
Comment on attachment 438107 [details] [diff] [review]
Second patch submission.

Looks good to go.  Double checking with Brent in case he disagrees with buildstep order.
Attachment #438107 - Flags: review?(brbaker)
Attachment #438107 - Flags: review?
Attachment #438107 - Flags: review+

Updated

9 years ago
Attachment #438107 - Flags: review?(brbaker) → review+

Comment 10

9 years ago
Comment on attachment 438107 [details] [diff] [review]
Second patch submission.

+ with the following changes:

- /util_clean_buildsdir/ buildstep needs to 
a) define the /workdir/
b) should pass the env{} like all other steps
c) probably should always be run, alwaysRun="True"
- also apply to sandbox.py
Assignee

Comment 11

9 years ago
Posted patch Final changes as requested. (obsolete) — Splinter Review
Added changes requested by Brent in his last comment. Renamed shell file clean-buildsdir.sh to util-clean-buildsdir.sh to make it clearer that it's a utility file.
Attachment #438528 - Flags: review?(cpeyer)
Assignee

Comment 12

9 years ago
Comment on attachment 438107 [details] [diff] [review]
Second patch submission.

Marking this patch obsolete (superceded by 438528).
Attachment #438107 - Attachment is obsolete: true
Reporter

Updated

9 years ago
Attachment #438528 - Flags: review?(cpeyer) → review+

Comment 13

9 years ago
I ended up commenting out the delete in the script since it was causing some failures in the build system because it was unable to delete the directory.

details:   http://hg.mozilla.org/tamarin-redux/rev/8878a85b0083
changeset: 4409:8878a85b0083
user:      Brent Baker <brbaker@adobe.com>
date:      Tue Apr 13 10:47:03 2010 -0400
description:
Bug 522525: this needs to be bullet proofed, being unable to delete a directory should NEVER fail the build. Commenting out for now (r=brbaker+)

Comment 14

9 years ago
Back to Jim.
Assignee

Comment 15

9 years ago
The util-clean-buildsdir.py script is designed to swallow exceptions, but in case something gets by it the util-clean-buildsdir.sh shell script always explicitly exits with zero.
Attachment #438528 - Attachment is obsolete: true
Attachment #439641 - Flags: review?(cpeyer)
Reporter

Comment 16

9 years ago
Comment on attachment 439641 [details] [diff] [review]
Modifications to ensure failure of the delete script never fails a build.

Pushed to argo/redux:
http://asteam/hg/tamarin-redux-argo/rev/0708c4f93442
Attachment #439641 - Flags: review?(cpeyer) → review+

Comment 17

9 years ago
Tested on windows using cygwin python and if I have a bash shell sitting in a directory that should be deleted I get the following when calling the python script, script does cleanly return but would be nice if there was a proper error saying that directory "c:/hg/builds/4137-f31a7772d807" could not be deleted.

Deleting all folders more than 7 days old under: c:/hg/builds
removing  c:/hg/builds/4137-f31a7772d807
'staticmethod' object is not callable

Might also be extremely useful if during such an error the following string was echoed out "buildbot_status: WARNINGS", the build system will look for this string and if found will mark the step as a warning, but will NOT fail the step/build. You will also need to change the definition of the "util_clean_buildsdir" buildstep to be a "BuildShellCommand" which is the modified version of ShellCommand that all of our build steps should be using.

Comment 18

9 years ago
Could you please remove the buildstep from the windows-frr builders. This builder is unique in the build system and does not have the exact same setup as all of the other builders. It does not have a "build/buildbot/slaves/scripts" directory and the scripts that are called are actually run from a different location.

Suggest that the buildstep be removed from the windows-frr builder and instead add a call to the python script (util-clean-buildsdir.py) from qe/buildbot/slaves/flashruntime-redux/windows-frr/scripts/build-frr.sh

Comment 19

9 years ago
(4/20/2010 3:26:44 PM) James Sudduth: Hi Brent - I was just implementing the changes to the builds delete script you recommended in bug 522525. The change to the windows-frr build where I add a call from build-frr.sh to util-clean-buildsdir.py raised a question: build-frr.sh line 74 reads: "rm -rf $buildsdir" so it looks like the script is already removing ALL past builds. Should I leave that or remove it and call util-clean-buildsdir.py instead? thnx

brbaker: just leave the current line in build-frr.sh and do not add the call. The machine that the windows-frr buildslave runs on has very little hd space and it is better to get rid of all of the builds once it finishes running.
Assignee

Comment 20

9 years ago
All requested enhancements were carried out except for adding a call from build-frr.sh to util-clean-buildsdir.py. I also added the folder date to the screen output when a folder is removed to make it easier to see what the script is doing.
Attachment #440566 - Flags: review?(cpeyer)
Attachment #440566 - Flags: feedback?(brbaker)
Reporter

Updated

9 years ago
Attachment #440566 - Flags: review?(cpeyer) → review+

Updated

9 years ago
Attachment #440566 - Flags: feedback?(brbaker) → feedback+
Assignee

Comment 21

9 years ago
Attachment #440566 - Attachment is obsolete: true
Attachment #443480 - Flags: review?(brbaker)

Comment 22

9 years ago
Comment on attachment 443480 [details] [diff] [review]
Further enhancements.

patch pushed:
tr-argo -> 4024:49fe8ae4ec4c
tr -> 4610:60796e1b0ca1
Attachment #443480 - Flags: review?(brbaker) → review+

Updated

9 years ago
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.