Skip to content

Conversation

@d-fence
Copy link
Contributor

@d-fence d-fence commented Jun 19, 2025

No description provided.

@d-fence d-fence requested a review from Xavier-Do June 19, 2025 13:46
@C3POdoo C3POdoo requested a review from a team June 19, 2025 13:54
@d-fence d-fence force-pushed the 18.0-runbot-batch-missing-tiggers-moc branch from 85a7683 to 3a7a355 Compare June 19, 2025 14:31
When creating a new trigger, especially for nightly builds, it's
convenient to test the trigger. One way of doing that is by starting the
trigger manually on the desired bundle instead of waiting for a new
batch. But as the slot with the new trigger does not exists yet on
batches it's not possible.

With this commit, a button is added on the batch form in order to create
the missing slots in the last batches of the sticky bundles.
Comment on lines +513 to +531
for trigger in missing_trigger_ids:
params_value = {
'version_id': self.bundle_id.version_id.id,
'project_id': self.bundle_id.project_id.id,
'create_batch_id': self.id,
'config_id': trigger.config_id.id,
'trigger_id': trigger.id,
'config_data': dict(trigger.config_data or {}),
'modules': bundle.modules,
'dockerfile_id': dockerfile_id.id,
'commit_link_ids': [(6, 0, self.commit_link_ids.ids)],
}
params = self.env['runbot.build.params'].create(params_value)
self.env['runbot.batch.slot'].create({
'batch_id': self.id,
'trigger_id': trigger.id,
'params_id': params.id,
'link_type': 'created',
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this logic shouldn't be refactored with the prapare logic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants