Open puggan opened 8 years ago
Looks like then restarts the build every 2minutes. phpci.yml.txt phpci_build_35.log.txt
I have the same problem. It always starts another build with the same build number. It also happens with successful builds in my case.
Its a huge issue in fact. If you run acceptance tests, its going crazy every n
minutes. It can run even foreign project in current build, just because it thinks that queue is ready for new one... And yeah, build id is staying the same.
This is an issue for us as well. Not sure if this is related but occasionally the build will restart (do another git clone and begin the process again) but with the same build number with a different hash. This leaves the older build folder in place which causes the build to restart as described above.
I think this is due to the 'time to run' setting when reserving the Beanstalk job. http://beanstalkc.readthedocs.io/en/latest/tutorial.html#basic-operation
In BuildWorker https://github.com/Block8/PHPCI/blob/master/PHPCI/Worker/BuildWorker.php#L101 reserve() is called without a timeout set so it uses the default of 120 seconds.
$job = $this->pheanstalk->reserve();
This causes beanstalk to re-queue the job and it's picked up again by another worker.
I think this should be set to whatever the build.failed_after setting is. Alternatively configuring beanstalk so it has a much higher TTR value might be a temporary solution.
Expected behaviour
When build is done, or removed, the data in the build folder gets removed.
Actual behaviour
There is alot of folders for old build, not just one per build, multiple:
Operating System: Ubuntu PHPCI version: tag/1.7.1 PHP Version: 7.0.8-0ubuntu0.16.04.2 MySQL Version: 5.7.15-0ubuntu0.16.04.1 Supervisor Version: 3.2.0-2
Logs or other output that would be helpful
(If logs are large, please upload as attachment).