cmd: report compiler version, not just flavor #4305

Closed
wants to merge 5 commits into
from

Conversation

Projects
None yet
1 participant
Contributor

davecheney commented Feb 5, 2016

Backport from master to 1.125

With the advent of Go 1.5 and newer on some build servers it is important
to record the version of the compiler, not simply its flavour: gc or gccgo.

(Review request: http://reviews.vapour.ws/r/3747/)

davecheney added some commits Feb 8, 2016

apiserver: remove testing helper method
apiserver.Server.Addr was only used in testing contexts, removed from
the public API.
Rejig the initalisation to log the "server is listening" message closer
to the point where the server starts listening.
apiserver: track number of active API connections
Track number of API connections.
Also, clean up logging around API server start and stop.
rcp: simplify serverError type
serverError was over compliated. It did not need to inherit from
requestError, and the way it did was overengineered. serverError just
needs to extend the error interface to match the ErrorCoder interface,
and as serverError only knows one status code, we can hard code that as
well.
rpc: use errors.Annotate
Use errors.Annotate to include the "request error: " boilerplate that
other code (almost always tests) expects. This lets callers use
errors.Cause to unwrap the error to recover the *rpc.RequestError type
without having to restort to string inspection of the .Error() value.
apiserver/params: remove ClientError helper
Updates LP#1538583

api/apiclient.APICall was the sole caller of params.ClientError.
params.Client error would rewrite the error value iff it was
rpc.RequestError, claiming that it was leaking unnecessary information
to the caller, specfically the "request error: " prefix. In b4e2785
the error prefix was convered to an errors.Annotate wrapper removing
the requirement to convert the error type.

Now, by removing params.ClientError, we can also remove the
errors.Annotate wrapper as the _type of the error_ tells us what it is.

So, callers get

a. A nice annotate error backtrace using errors.Trace
b. Access to the original *rpc.RequestError to inspect if they want.

@davecheney davecheney closed this Feb 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment