request_splitter: only allow devel/super followup for non-bootstrapped.
This commit is contained in:
parent
b085108aed
commit
dc40ec7ac4
@ -176,8 +176,9 @@ class RequestSplitter(object):
|
|||||||
def is_staging_mergeable(self, status, pseudometa):
|
def is_staging_mergeable(self, status, pseudometa):
|
||||||
return len(pseudometa['requests']) > 0 and 'splitter_info' in pseudometa
|
return len(pseudometa['requests']) > 0 and 'splitter_info' in pseudometa
|
||||||
|
|
||||||
def should_staging_merge(self, status, pseudometa):
|
def should_staging_merge(self, status, pseudometa, bootstrapped):
|
||||||
if (pseudometa['splitter_info']['strategy']['name'] in ('devel', 'super') and
|
if (not bootstrapped and
|
||||||
|
pseudometa['splitter_info']['strategy']['name'] in ('devel', 'super') and
|
||||||
status['overall_state'] not in ('acceptable', 'review')):
|
status['overall_state'] not in ('acceptable', 'review')):
|
||||||
# Simplistic attempt to allow for followup requests to be staged
|
# Simplistic attempt to allow for followup requests to be staged
|
||||||
# after age max has been passed while still stopping when ready.
|
# after age max has been passed while still stopping when ready.
|
||||||
@ -225,18 +226,19 @@ class RequestSplitter(object):
|
|||||||
for staging in stagings:
|
for staging in stagings:
|
||||||
project = self.api.prj_from_short(staging)
|
project = self.api.prj_from_short(staging)
|
||||||
status, pseudometa = self.staging_status_load(project)
|
status, pseudometa = self.staging_status_load(project)
|
||||||
|
bootstrapped = self.is_staging_bootstrapped(project)
|
||||||
|
|
||||||
# Store information about staging.
|
# Store information about staging.
|
||||||
self.stagings[staging] = {
|
self.stagings[staging] = {
|
||||||
'project': project,
|
'project': project,
|
||||||
'bootstrapped': self.is_staging_bootstrapped(project),
|
'bootstrapped': bootstrapped,
|
||||||
'status': status,
|
'status': status,
|
||||||
'pseudometa': pseudometa,
|
'pseudometa': pseudometa,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Decide if staging of interested.
|
# Decide if staging of interested.
|
||||||
if self.is_staging_mergeable(status, pseudometa) and (
|
if self.is_staging_mergeable(status, pseudometa) and (
|
||||||
should_always or self.should_staging_merge(status, pseudometa)):
|
should_always or self.should_staging_merge(status, pseudometa, bootstrapped)):
|
||||||
if pseudometa['splitter_info']['strategy']['name'] == 'none':
|
if pseudometa['splitter_info']['strategy']['name'] == 'none':
|
||||||
self.stagings_mergeable_none.append(staging)
|
self.stagings_mergeable_none.append(staging)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user