I encountered the same.
The error seems to come from
err = r.Manager.Accept(ctx, p.ID, r.Machine)
if err == db.ErrOptimisticLock {
return nil
} else if err != nil {
logger.WithFields(
logrus.Fields{
"stage-id": p.ID,
"build-id": p.BuildID,
"repo-id": p.RepoID,
}).Warnln("runner: cannot ack stage")
return err
}
go func() {
logger.Debugln("runner: watch for cancel signal")
done, _ := r.Manager.Watch(ctx, p.BuildID)
if done {
cancel()
logger.Debugln("runner: received cancel signal")
} else {
I can find the method Accept
only at
// to a client-side and server-side timeout. The timeout
// error is therefore expected behavior, and is not
// considered an error by the system.
if err == context.DeadlineExceeded {
return nil, nil // no error
}
return out, err
}
// Accept accepts the build stage for execution.
func (s *Client) Accept(ctx context.Context, stage int64, machine string) error {
in := &acceptRequest{Stage: stage, Machine: machine}
return s.send(noContext, "/rpc/v1/accept", in, nil)
}
// Netrc returns a valid netrc for execution.
func (s *Client) Netrc(ctx context.Context, repo int64) (*core.Netrc, error) {
in := &netrcRequest{repo}
out := &core.Netrc{}
err := s.send(noContext, "/rpc/v1/netrc", in, out)
return out, err
And
func NewServer(manager.BuildManager, string) *Server {
return &Server{}
}
// Request requests the next available build stage for execution.
func (Server) Request(ctx context.Context, args *manager.Request) (*core.Stage, error) {
return nil, errors.New("not implemented")
}
// Accept accepts the build stage for execution.
func (Server) Accept(ctx context.Context, stage int64, machine string) error {
return errors.New("not implemented")
}
// Netrc returns a valid netrc for execution.
func (Server) Netrc(ctx context.Context, repo int64) (*core.Netrc, error) {
return nil, errors.New("not implemented")
}
// Details fetches build details
func (Server) Details(ctx context.Context, stage int64) (*manager.Context, error) {
As you can see, the Accept
at the server side is unimplemented.
I didn’t log the running code so I am not 100% sure.
Edit: You mentioned that it didn’t happen on v1.1.0
So, the above analysis looks irrelevant.