New commits in an open pull request

I’ve got a gogs repo with an open pull request. The first time I opened the pull request, the webhook for drone was triggered and drone started a build.

After pushing more commits to pull request, I can see that gogs is dispatching the webhook and marks it as succsessfull. However in drone it does not trigger a new build. If I make “redelivery” from gogs, it still does not work. Is there a missing configuration or is a bug?

If I trigger the hook manually from gogs it works fine.
If I restart the build from drone it restarts the build but does not pull the updates.

So in order to make it work again, the only solution I’ve found is to close the pull request and open a new pull request…

Also I’m looking for a plugin or something that can publish back to the pull request the status of the build (something like travis does). Is there something available?

Also noted that the build does not correspond with the .drone.yml definition in the pull request, it seems that is getting the .drone.yml from main repo, however the git clone works fine:

git init
git remote add origin http://example.com/user/repo.git
git fetch --no-tags origin +refs/pull/5/head:
git checkout -qf FETCH_HEAD
git submodule update --init --recursive
cat .drone.yml

The output is:

workspace:
  base: /go

pipeline:
  pretest:
    image: node
    commands:
      - npm i
      - cp keys/TODO keys/secrets.js
  test:
    image: node
    commands:
      - npm run test
  
services:
  mongo:
    image: mongo:3.0
    command: [ --smallfiles ]
  node:
    image: node

Docker logs:

drone-server_1  | time="2017-10-13T17:51:12Z" level=error msg="pull queue item: 36: successfully removed from backup" 
drone-agent_1   | pipeline: received next execution: 36
drone-agent_1   | pipeline: finish uploading logs: application/json+logs: step 36: clone
drone-agent_1   | pipeline: finish uploading logs: 36: step clone
drone-agent_1   | pipeline: finish uploading logs: application/json+logs: step 36: node
drone-agent_1   | pipeline: finish uploading logs: 36: step node
drone-agent_1   | pipeline: finish uploading logs: application/json+logs: step 36: test
drone-agent_1   | pipeline: finish uploading logs: 36: step test
drone-agent_1   | pipeline: finish uploading logs: application/json+logs: step 36: mongo
drone-agent_1   | pipeline: finish uploading logs: 36: step mongo
drone-agent_1   | pipeline: execution complete: 36
drone-agent_1   | pipeline: cancel channel closed: 36
drone-agent_1   | pipeline: request next execution
drone-agent_1   | pipeline: cancel ping loop: 36

So there is no step called pretest, which is the main modification in the pull request.

This is likely because drone was looking for synchronize event actions instead of synchornized (with a d). We recently (2 days ago) merged https://github.com/drone/drone/pull/2240 to use the updated event action. This change is available in latest.

Ok thanks @bradrydzewski ! So hopefully it will be available in next release in docker or is there a way to update the docker in 0.7?

Is this solving also the problem of the source of .drone.yml? This is quite strange as normally the configuration should be taken from cloned pull request, and cloned pull request is fine… Maybe has something to do with pipeline name?

Note that when merging the pull request, the new .drone.yml config is being used and the log output is:

drone-agent_1   | pipeline: received next execution: 43
drone-agent_1   | pipeline: finish uploading logs: application/json+logs: step 43: clone
drone-agent_1   | pipeline: finish uploading logs: 43: step clone
drone-agent_1   | pipeline: finish uploading logs: application/json+logs: step 43: node
drone-agent_1   | pipeline: finish uploading logs: 43: step node
drone-agent_1   | pipeline: finish uploading logs: application/json+logs: step 43: pretest
drone-agent_1   | pipeline: finish uploading logs: 43: step pretest
drone-agent_1   | pipeline: finish uploading logs: application/json+logs: step 43: test
drone-agent_1   | pipeline: finish uploading logs: 43: step test
drone-agent_1   | pipeline: finish uploading logs: application/json+logs: step 43: mongo
drone-agent_1   | pipeline: finish uploading logs: 43: step mongo

The issue is that drone uses the API to fetch the yaml file. Gogs does not allow fetching a file via the API using the pull request ref. Note that this is not an issue for other providers (Github, Gitlab, etc). So this is a known limitation of Gogs, and there is nothing we can do about it within drone until their API provides this capability.