TTM: Add migration for the 'testing' status attribute
This commit is contained in:
parent
fcdd51b974
commit
f5220af12d
@ -160,6 +160,7 @@ class ToTestPublisher(ToTestManager):
|
||||
|
||||
def publish(self, project, force=False):
|
||||
self.setup(project)
|
||||
|
||||
try:
|
||||
current_snapshot = self.version_from_totest_project()
|
||||
except NotFoundException as e:
|
||||
@ -167,6 +168,11 @@ class ToTestPublisher(ToTestManager):
|
||||
self.logger.warn(e)
|
||||
current_snapshot = None
|
||||
|
||||
if not self.get_status('testing'):
|
||||
# migrating. Normally the releaser maintains that snapshot, but to differentiate
|
||||
# bootstrap of new project and migration we explicitly set 'NONE' if there is Nothing
|
||||
self.update_status('testing', current_snapshot if current_snapshot else 'NONE')
|
||||
|
||||
group_id = self.openqa_group_id()
|
||||
|
||||
if self.get_status('publishing') == current_snapshot or self.get_status('published') == current_snapshot:
|
||||
|
@ -28,6 +28,9 @@ class ToTestReleaser(ToTestManager):
|
||||
self.setup(project)
|
||||
|
||||
testing_snapshot = self.get_status('testing')
|
||||
if not testing_snapshot:
|
||||
self.logger.debug("No snapshot in testing, waiting for publisher to tell us")
|
||||
return None
|
||||
new_snapshot = self.version_from_project()
|
||||
|
||||
# not overwriting
|
||||
|
Loading…
x
Reference in New Issue
Block a user