Closed
Bug 699219
Opened 13 years ago
Closed 12 years ago
Add automated clean up of hg-shared directory
Categories
(Release Engineering :: General, defect, P5)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: nthomas, Assigned: catlee)
Details
(Whiteboard: [buildslaves])
Attachments
(2 files, 1 obsolete file)
3.42 KB,
patch
|
nthomas
:
review+
catlee
:
checked-in+
|
Details | Diff | Splinter Review |
1.92 KB,
patch
|
nthomas
:
review+
catlee
:
checked-in+
|
Details | Diff | Splinter Review |
We currently accumulate repositories when shared repositories is enabled, and need some way to bound the disk usage. We could remove repositories in which the tip is older than some age, or limit the space the whole of hg-shared is allowed to use and expire the oldest repo's first. purge_builds.py may be a good place to do this, but would have to be taught how to look up hg revisions, and the way directories are mapped out in hg-share (eg mozilla-central, releases/mozilla-beta, rather than flat in a master dir).
Assignee | ||
Comment 1•12 years ago
|
||
This isn't quite as smart as your suggestion, but easier to write. It looks for directories under $HG_SHARE_BASE_DIR with a .hg subdirectory, and then calls the regular purge() logic on that set. This means that max_age will be enforced for these directories as well. HG_SHARE_BASE_DIR must be set in the environment for this to work (requires a buildbotcustom change)
Attachment #588855 -
Flags: feedback?(nrthomas)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → catlee
Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 588855 [details] [diff] [review] use purge_builds.py to delete hg shared dirs >+ # Clean up empty directories >+ for d in hg_dirs: >+ if not os.path.exists(os.path.join(d, '.hg')): >+ print "Deleting", d Maybe say |'Cleaning up', d| since there will already be a log line with "Deleting d" from purge(). So how might this go in practice ? We delete a lot of shared clones before we zap *any* builds, and so might do a lot more cloning ? Having a longer max-age may be useful for hg-shared.
Attachment #588855 -
Flags: feedback?(nrthomas) → feedback+
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #588855 -
Attachment is obsolete: true
Attachment #589255 -
Flags: review?(nrthomas)
Reporter | ||
Comment 4•12 years ago
|
||
Comment on attachment 589255 [details] [diff] [review] use purge_builds.py to delete hg shared dirs Lets give it a go.
Attachment #589255 -
Flags: review?(nrthomas) → review+
Assignee | ||
Updated•12 years ago
|
Attachment #589255 -
Flags: checked-in+
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #589954 -
Flags: review?(nrthomas)
Reporter | ||
Updated•12 years ago
|
Attachment #589954 -
Flags: review?(nrthomas) → review+
Assignee | ||
Updated•12 years ago
|
Attachment #589954 -
Flags: checked-in+
Comment 6•12 years ago
|
||
Merged to production today.
Assignee | ||
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: mozilla.org → Release Engineering
You need to log in
before you can comment on or make changes to this bug.
Description
•