Summary
File modified: steps/localserver/localserver.go
Change: In the serve() function, the condition checking the return value of srv.Serve(listener) was updated to exclude grpc.ErrServerStopped from being treated as an error:
// Before:
if err := srv.Serve(listener); err != nil {
return fmt.Errorf("step-runner server: %w", err)
}
// After:
if err := srv.Serve(listener); err != nil && err != grpc.ErrServerStopped {
return fmt.Errorf("step-runner server: %w", err)
}Root cause: When GracefulStop() is called (triggered by context cancellation in Stop()), the gRPC library's Serve() returns grpc.ErrServerStopped as a sentinel value indicating normal graceful shutdown — not an actual error. The previous code propagated this as a non-nil error into the done channel, causing TestStartStopRemove to fail at the require.NoError assertion. The fix treats grpc.ErrServerStopped as a normal termination signal and returns nil in that case. The grpc package was already imported in the file, so no new imports were needed.
Fixes failing pipeline
Session 5922124
Powered by Duo Fix Pipeline flow