Skip to content

Commit 31150ba

Browse files
committed
cmd/coordinator: clarify in logs which reverse clients are using legacy config
We want to kill off the --reverse vs --reverse-host code. This will point out any clients still using the old way. There might not be any. Updates golang/go#21260 Change-Id: Ic4b283b02891655ee43f2b7db76088df3f12065a Reviewed-on: https://go-review.googlesource.com/52633 Reviewed-by: Sarah Adams <[email protected]>
1 parent 240bc6e commit 31150ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/coordinator/reverse.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,10 @@ func handleReverse(w http.ResponseWriter, r *http.Request) {
495495

496496
// For older builders using the buildlet's -reverse flag only,
497497
// collapse their builder modes down into a singular hostType.
498+
legacyNote := ""
498499
if hostType == "" {
499500
hostType = mapBuilderToHostType(modes)
501+
legacyNote = fmt.Sprintf(" (mapped from legacy modes %q)", modes)
500502
}
501503

502504
conn, bufrw, err := w.(http.Hijacker).Hijack()
@@ -506,7 +508,8 @@ func handleReverse(w http.ResponseWriter, r *http.Request) {
506508
}
507509

508510
revDialer := revdial.NewDialer(bufrw, conn)
509-
log.Printf("Registering reverse buildlet %q (%s) for host type %v", hostname, r.RemoteAddr, hostType)
511+
log.Printf("Registering reverse buildlet %q (%s) for host type %v%s",
512+
hostname, r.RemoteAddr, hostType, legacyNote)
510513

511514
(&http.Response{StatusCode: http.StatusSwitchingProtocols, Proto: "HTTP/1.1"}).Write(conn)
512515

0 commit comments

Comments
 (0)