buildbot / buildbot/buildbot

triggerable step with docker latent worker

Open
#6,638 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.5k
Forks
1.7k
Avg merge
2d 7h
Merged PRs (30d)
6

Description

Python version: 3.10.4
Buildbot version: 3.5.0
Twisted version: 22.4.0

In my buildbot setup I have added Docker Latent worker with custom docker image.

```
worker.DockerLatentWorker('fw-build-docker-sign', '',
docker_host='tcp://fw-build-d2:2375',
image='buildbot-worker/sign',
volumes=['/home/build/.azure:/home/build/.azure',
'/home/build/packages:/home/build/packages',
'/mnt/artifacts:/mnt/artifacts'],
hostconfig={'network_mode': 'host'},
followStartupLogs=True,
max_builds=1,
hostname='signing_docker_worker'),

```

All is working as expected except for the triggerable step which is in use to call the builder on this worker, sometimes the step returns success without actually running the triggered build. The main build is waiting for some time (20-40 seconds) to get the worker available and sometimes returns success without invoking the build.

```
f.addStep(steps.Trigger(name="Signing %s packages" % t1,
schedulerNames=['signing_docker_scheduler'],
waitForFinish=True,
sourceStamps=[{'revision': Property('sdk'), 'codebase': ''}],
set_properties={'factory': util.Property('%sfactorypackage' % t1),
'field': util.Property('%sfieldpackage' % t1),
'target': Property('target'),
'TYPE': t1,
'dst_folder': Property('nbf'),
'action': azure_sign_action,
},
haltOnFailure=True))
```

When there are more than one request for the build, sometimes the build does not run and it returns success and no build URL in the buildbot webUI shows up.
![image](https://user-images.githubusercontent.com/34251479/191377119-60d68d20-1069-4a29-913b-729f27630170.png)

I have been using steps.Trigger for a while and have not seen any issues with not docker based workers.

Might it be a buildbot issue ?

Contributor guide

Open the contributing guide

Research direction

Start with the DockerLatentWorker configuration and the steps.Trigger usage shown in the report. Reproduce the behavior with multiple queued requests while checking whether the latent worker becomes available and whether the triggered build is created. Done means identifying why Trigger can report success without a build URL and adding coverage for the failure case.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.