Skip to content

Commit de79dcd

Browse files
committed
Merge pull request #694 from helgi/ticket_674
ref(release): move RC / Secret cleanup message to emit as DEBUG information
2 parents 24a8292 + 5a7d331 commit de79dcd

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

rootfs/api/models/release.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,11 @@ def delete(self, *args, **kwargs):
176176
def cleanup_old(self):
177177
"""Cleanup all but the latest release from Kubernetes"""
178178
latest_version = 'v{}'.format(self.version)
179-
log_event(self.app, 'Cleaning up RCS for releases older than {} (latest)'.format(latest_version)) # noqa
179+
log_event(
180+
self.app,
181+
'Cleaning up RCS for releases older than {} (latest)'.format(latest_version),
182+
level=logging.DEBUG
183+
)
180184

181185
# Cleanup controllers
182186
controller_removal = []
@@ -192,13 +196,17 @@ def cleanup_old(self):
192196
controller_removal.append(current_version)
193197

194198
if controller_removal:
195-
log_event(self.app, 'Found the following versions to cleanup: {}'.format(', '.join(controller_removal))) # noqa
199+
log_event(
200+
self.app,
201+
'Found the following versions to cleanup: {}'.format(', '.join(controller_removal)), # noqa
202+
level=logging.DEBUG
203+
)
196204

197205
for version in controller_removal:
198206
self._delete_release_in_scheduler(self.app.id, version)
199207

200208
# find stray env secrets to remove that may have been missed
201-
log_event(self.app, 'Cleaning up orphaned environment var secrets')
209+
log_event(self.app, 'Cleaning up orphaned environment var secrets', level=logging.DEBUG)
202210
labels = {
203211
'app': self.app.id,
204212
'type': 'env'

0 commit comments

Comments
 (0)