Skip to content

Commit

Permalink
PR: comments, logentry
Browse files Browse the repository at this point in the history
Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
  • Loading branch information
helsaawy committed Mar 15, 2023
1 parent a59f7a6 commit 081c6d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 0 additions & 3 deletions internal/gcs/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ type rpc struct {
ch chan struct{}
}

// todo(helsaawy): remove bridge.log entry and log based on per-request context, not
// the context that started the bridge

// bridge represents a communcations bridge with the guest. It handles the
// transport layer but (mostly) does not parse or construct the message payload.
type bridge struct {
Expand Down
2 changes: 0 additions & 2 deletions internal/gcs/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ func (typ msgType) String() string {
return s + ")"
}

// todo: move this to .\internal\oc and unify with host request?

// ocspancontext is the internal JSON representation of the OpenCensus
// `trace.SpanContext` for forwarding to a GCS that supports it.
type ocspancontext struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/guest/bridge/bridge_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (b *Bridge) negotiateProtocolV2(r *Request) (_ RequestResponse, err error)
// This is allowed only for protocol version 4+, schema version 2.1+
func (b *Bridge) createContainerV2(r *Request) (_ RequestResponse, err error) {
ctx := r.Context
log.G(ctx).Trace("opengcs::bridge::createContainerV2")
logEntry(ctx, r).Trace("opengcs::bridge::createContainerV2")

var request prot.ContainerCreate
if err := commonutils.UnmarshalJSONWithHresult(r.Message, &request); err != nil {
Expand Down Expand Up @@ -417,7 +417,7 @@ func (b *Bridge) resizeConsoleV2(r *Request) (_ RequestResponse, err error) {

func (b *Bridge) modifySettingsV2(r *Request) (_ RequestResponse, err error) {
ctx := r.Context
log.G(ctx).Trace("opengcs::bridge::modifySettingsV2")
logEntry(ctx, r).Trace("opengcs::bridge::modifySettingsV2")

request, err := prot.UnmarshalContainerModifySettings(r.Message)
if err != nil {
Expand Down Expand Up @@ -447,7 +447,7 @@ func (b *Bridge) dumpStacksV2(r *Request) (_ RequestResponse, err error) {

func (b *Bridge) deleteContainerStateV2(r *Request) (_ RequestResponse, err error) {
ctx := r.Context
log.G(ctx).Trace("opengcs::bridge::deleteContainerStateV2")
logEntry(ctx, r).Trace("opengcs::bridge::deleteContainerStateV2")

var request prot.MessageBase
if err := commonutils.UnmarshalJSONWithHresult(r.Message, &request); err != nil {
Expand Down

0 comments on commit 081c6d9

Please sign in to comment.