Build restart / follow buttons do not work

Trying to restart a build from a pr on my gogs server, and the restart button does not seem to do anything at all. The follow button changed it’s text to unfollow when clicked, but refreshing the page resets it.

Build pipeline config:

    image: ruby2.0.0
     - RAILS_ENV=test
      - bundle install
      - bin/rake db:create
      - bin/rake test:all
      - mysql

Drone config:

version: '2'

    image: drone/drone:0.6
      - 8080:8000
      - /var/lib/drone:/var/lib/drone/
    restart: always
      - DRONE_OPEN=true
      - DRONE_HOST=< redacted >
      - DRONE_SECRET=< redacted >

      - DRONE_GOGS=true
      - DRONE_GOGS_URL=https://< redacted >
      - DRONE_GOGS_SECRET=< redacted >

      - DRONE_SMTP_HOST=< redacted >
      - DRONE_SMTP_PORT=25
      - DRONE_SMTP_FROM=< redacted >
      - DRONE_SMTP_USER=< redacted >
      - DRONE_SMTP_PASS=< redacted >

    image: drone/drone:0.6
    command: agent
    restart: always
      - drone-server
      - /var/run/docker.sock:/var/run/docker.sock
      - DRONE_SERVER=ws://< redacted >:8080/ws/broker
      - DRONE_SECRET=< redacted >

This is the correct behavior. The follow button only follows (e.g auto scrolls) when the build is running and the content height exceeds the window frame. The value is not persisted so a page refresh resets the toggle. I can confirm this is working with my install.

I cannot repeat this. I am using drone+gogs and can restart builds without issue. If you upgraded drone from 0.5 to 0.6 (0.7 is the latest build FYI) you cannot restart build records created by drone 0.5 due to data changes.

Build was started on that fresh install (0.6)
I’ll update to 7 and try again

Build 0.7, button still does nothing

Clicking it produces this in the logs for the server:

time="2017-05-26T17:31:10Z" level=error msg="pull queue item: 106: successfully removed from backup"

And nothing in the agent logs

I am running the latest drone/drone:0.7 and cannot reproduce any restart issues. Unfortunately without the ability to reproduce there is not much more I can offer. But if you find an issue and can send a patch we can get it merged.

Also make sure you are logged-in. The restart button is always displayed but a build cannot be restarted by an unauthenticated user, or an authenticated user that does not have write access to the repository (as defined in gogs).

I was logged in, but logging out then in again solved it. Thanks

Hi Brad,

I am also having problem with the restart button.
I am logged in, and I do have write permission on the github repository. However, the restart button does not work. Inspecting the browser console, I see an error every time I click it:

Uncaught (in promise) TypeError: Cannot read property 'number' of null
at Rp (app.da7a5734.js:formatted:8123)
at d.BUILD_RETRY_SUCCESS (app.da7a5734.js:formatted:8402)
at chunk-vendors.f5840117.js:23
at chunk-vendors.f5840117.js:23
at Array.forEach (<anonymous>)
at chunk-vendors.f5840117.js:23
at d._withCommit (chunk-vendors.f5840117.js:23)
at d.commit (chunk-vendors.f5840117.js:23)
at commit (chunk-vendors.f5840117.js:23)
at app.da7a5734.js:formatted:6649

Any ideas ?