mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] runbot: use reference batch to define reference builds
This commit is contained in:
parent
53c2afaed4
commit
fe8c8e2c98
@ -890,9 +890,9 @@ class ConfigStep(models.Model):
|
||||
for next_version in next_versions:
|
||||
if bundle.version_id in upgrade_complement_step._get_upgrade_source_versions(next_version):
|
||||
target_versions |= next_version
|
||||
return target_versions.with_context(
|
||||
category_id=category_id, project_id=bundle.project_id.id,
|
||||
).mapped('base_bundle_id').filtered('to_upgrade').mapped('last_done_batch')
|
||||
|
||||
base_batch = batch if batch.reference_batch_ids else batch.base_reference_batch_id
|
||||
return base_batch.reference_batch_ids.filtered(lambda batch: batch.bundle_id.version_id in target_versions and batch.category_id.id == category_id)
|
||||
|
||||
def _reference_batches_upgrade(self, batch, category_id):
|
||||
if not batch.bundle_id.base_id.to_upgrade:
|
||||
@ -932,9 +932,9 @@ class ConfigStep(models.Model):
|
||||
from_versions(f_bundle)
|
||||
source_refs_bundles = source_refs_bundles.filtered('to_upgrade_from')
|
||||
|
||||
return (target_refs_bundles | source_refs_bundles).with_context(
|
||||
category_id=category_id
|
||||
).mapped('last_done_batch')
|
||||
ref_bundles = target_refs_bundles | source_refs_bundles
|
||||
base_batch = batch if batch.reference_batch_ids else batch.base_reference_batch_id
|
||||
return base_batch.reference_batch_ids.filtered(lambda batch: batch.bundle_id in ref_bundles and batch.category_id.id == category_id)
|
||||
|
||||
def _log_end(self, build):
|
||||
if self.job_type == 'create_build':
|
||||
|
@ -54,7 +54,7 @@ class Host(models.Model):
|
||||
[('host', 'in', self.mapped('name')), ('local_state', 'in', ('testing', 'running'))],
|
||||
['host', 'local_state'],
|
||||
['host', 'local_state'],
|
||||
lazy=False
|
||||
lazy=False,
|
||||
)
|
||||
count_by_host_state = {host.name: {} for host in self}
|
||||
for group in groups:
|
||||
|
Loading…
Reference in New Issue
Block a user