Repository navigation
nightwatcher: add purging old nightlies - #187
Merged
Merged
Conversation
Frenzie
marked this pull request as draft
October 4, 2026 08:58
Frenzie
marked this pull request as ready for review
October 4, 2026 11:17
Member
|
We should get rid of docker/ubuntu/nightswatcher/nightswatcher.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git i/docker/ubuntu/nightswatcher/nightswatcher.py w/docker/ubuntu/nightswatcher/nightswatcher.py
index b82c124..8758716 100644
--- i/docker/ubuntu/nightswatcher/nightswatcher.py
+++ w/docker/ubuntu/nightswatcher/nightswatcher.py
@@ -180,8 +180,6 @@ class Manifest:
self.nightlies_dir = Path(nightlies_dir)
self.stables_dir = Path(stables_dir)
self.ota = {}
- self.stable = {}
- self.nightly = {}
self.by_sha256 = defaultdict(set)
def ensure_dirs(self):
@@ -189,10 +187,12 @@ class Manifest:
d.mkdir(parents=True, exist_ok=True)
def initial_update(self):
+ stable = {}
+ nightly = {}
for manifest, directory in (
(self.ota, self.ota_dir),
- (self.nightly, self.nightlies_dir),
- (self.stable, self.stables_dir),
+ (nightly, self.nightlies_dir),
+ (stable, self.stables_dir),
):
for dirpath, _dirnames, filenames in directory.walk():
for name in filenames:
@@ -205,8 +205,8 @@ class Manifest:
manifest[path.name] = sha256
self.by_sha256[sha256].add(realpath)
logger.info('ota: %u files', len(self.ota))
- logger.info('stable: %u files', len(self.stable))
- logger.info('nightly: %u files', len(self.nightly))
+ logger.info('stable: %u files', len(stable))
+ logger.info('nightly: %u files', len(nightly))
def update_asset(self, asset):
logger.info('Updating asset: %s', asset.name) |
benoit-pierre
approved these changes
Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For reference, here's the old purge script (2024 version; I lost the poc 2026 update):
Details
This change is