So I’ve got this issue with 1.0.0-rc2, Drone is getting my commits correctly from BitBucket Cloud and it queues the job correctly, but the job never actually starts, it’s just there with the hourglass icon forever, but if I stop it and retry it manually the job process as intended.
have you checked your logs? What is your configuration?
It is hard to diagnose a problem without any details, but the standard root cause for this be that perhaps you setup agents that are not properly configured or cannot connect to the Drone server to process a job (again, tough to say without any details)? If no agent can connect to the server, a job cannot be processed, and will sit in a pending state. Please provide as much info as possible (your server logs, agent logs, server and agent configuration, your yaml) for further assistance.
Nothing in my logs until I stop the stuck job, after stopping it the message it outputs is:
{"build":22,"error":"Build not found","level":"warning","msg":"api: cannot signal cancelled build is complete","name":"<site>","namespace":"<org>","request-id":"1EBOlafnaL6LCAQw8QG0dwqH9TY","time":"2018-12-10T22:57:57Z","user.login":"<my-user>"}
What’s weird is that if I start it again it works, so the connection to the agent should be successful right? if not how else would the job finish after the second attempt?
I don’t have any pending jobs at all when trying this, I’m running them all manually and they’ve all either passed or failed, I’ve got just one agent running at the moment and I’ve restarted both the server and agent before, the only thing that comes to mind that could be breaking this is traefik which I’m using as a reverse proxy, but then again it shouldn’t be working when I restart the job right?
Did you mark your repository as Protected which requires manual approval before the build will run if the yaml signature doesn’t match? This is the only way I can reproduce this behavior:
set my repository as protected
omit or provide an invalid yaml signature
the build will block pending approval via CLI
cancel the build
manually restart, which does not require approval
The protected mode flag should only be set if you plan to sign your yaml file and manually approve yaml files that fail signature verification. If you inadvertently enabled protected mode, you can disable and it should resolve the problem.
If you intentionally enabled protected mode, be sure to sign your yaml configuration file per the instructions and remember that you will need to manually approve all builds where the signature verification fails. Before we release 1.0-final we will include approve and decline buttons in the user interface, but in the meantime, if you are intentionally using this feature, manual approval via the CLI is required.