[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Scap clean: abort if a branch is still in use
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/340250 ) Change subject: Scap clean: abort if a branch is still in use .. Scap clean: abort if a branch is still in use It's easy to accidentally hose the whole site if we don't validate our input first :) Change-Id: Id7c77b6cc9f16736b57bba88740de82ba8b6d2a9 --- M scap/plugins/clean.py 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Thcipriani: Looks good to me, but someone else must approve Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/scap/plugins/clean.py b/scap/plugins/clean.py index 50116eb..83e8712 100644 --- a/scap/plugins/clean.py +++ b/scap/plugins/clean.py @@ -34,6 +34,9 @@ help='Only keep static assets (CSS/JS and the like).') def main(self, *extra_args): """ Clean old branches from the cluster for space savings! """ +if self.arguments.branch in self.active_wikiversions(): +raise ValueError('Branch "%s" is still in use, aborting' % + self.arguments.branch) self.cleanup_branch(self.arguments.branch, self.arguments.keep_static) def cleanup_branch(self, branch, keep_static): -- To view, visit https://gerrit.wikimedia.org/r/340250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7c77b6cc9f16736b57bba88740de82ba8b6d2a9 Gerrit-PatchSet: 4 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Chad Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Scap clean: abort if a branch is still in use
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/340250 ) Change subject: Scap clean: abort if a branch is still in use .. Scap clean: abort if a branch is still in use It's easy to accidentally hose the whole site if we don't validate our input first :) Change-Id: Id7c77b6cc9f16736b57bba88740de82ba8b6d2a9 --- M scap/plugins/clean.py 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/50/340250/1 diff --git a/scap/plugins/clean.py b/scap/plugins/clean.py index 6ac6003..dd42acc 100644 --- a/scap/plugins/clean.py +++ b/scap/plugins/clean.py @@ -32,6 +32,9 @@ help='Only keep static assets (CSS/JS and the like).') def main(self, *extra_args): """ Clean old branches from the cluster for space savings! """ +if self.arguments.branch in self.active_wikiversions(): +self.get_logger().fatal('Branch "%s" is still in use, aborting' % +self.arguments.branch) self.cleanup_branch(self.arguments.branch, self.arguments.keep_static) def cleanup_branch(self, branch, keep_static): -- To view, visit https://gerrit.wikimedia.org/r/340250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7c77b6cc9f16736b57bba88740de82ba8b6d2a9 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits