@@ -37,7 +37,7 @@ func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inC
37
37
38
38
createChan , err := c .CreateWorkload (ctx , opts )
39
39
if err != nil {
40
- logger .Errorf (ctx , err , "[RunAndWait] Create workload error %+v" , err )
40
+ logger .Error (ctx , err , "[RunAndWait] Create workload error" )
41
41
return workloadIDs , nil , err
42
42
}
43
43
@@ -58,7 +58,7 @@ func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inC
58
58
// we don't need to remove this non-existing workload
59
59
// so just send the error message and return
60
60
if message .Error != nil || message .WorkloadID == "" {
61
- logger .Errorf (ctx , message .Error , "[RunAndWait] Create workload failed %+v" , message . Error )
61
+ logger .Error (ctx , message .Error , "[RunAndWait] Create workload failed" )
62
62
return & types.AttachWorkloadMessage {
63
63
WorkloadID : "" ,
64
64
Data : []byte (fmt .Sprintf ("Create workload failed %+v" , message .Error )),
@@ -77,7 +77,7 @@ func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inC
77
77
}
78
78
defer func () {
79
79
if err := commit (); err != nil {
80
- logger .Errorf (ctx , err , "[RunAndWait] Commit WAL %s failed: %s, %v " , eventCreateLambda , message .WorkloadID , err )
80
+ logger .Errorf (ctx , err , "[RunAndWait] Commit WAL %s failed: %s" , eventCreateLambda , message .WorkloadID )
81
81
}
82
82
}()
83
83
@@ -87,7 +87,7 @@ func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inC
87
87
ctx , cancel := context .WithCancel (utils .InheritTracingInfo (ctx , context .TODO ()))
88
88
defer cancel ()
89
89
if err := c .doRemoveWorkloadSync (ctx , []string {message .WorkloadID }); err != nil {
90
- logger .Errorf (ctx , err , "[RunAndWait] Remove lambda workload failed %+v" , err )
90
+ logger .Error (ctx , err , "[RunAndWait] Remove lambda workload failed" )
91
91
} else {
92
92
logger .Infof (ctx , "[RunAndWait] Workload %s finished and removed" , utils .ShortID (message .WorkloadID ))
93
93
}
@@ -97,7 +97,7 @@ func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inC
97
97
// this is weird, we return the error directly and try to delete data
98
98
workload , err := c .GetWorkload (ctx , message .WorkloadID )
99
99
if err != nil {
100
- logger .Errorf (ctx , err , "[RunAndWait] Get workload failed %+v" , err )
100
+ logger .Error (ctx , err , "[RunAndWait] Get workload failed" )
101
101
return & types.AttachWorkloadMessage {
102
102
WorkloadID : message .WorkloadID ,
103
103
Data : []byte (fmt .Sprintf ("Get workload %s failed %+v" , message .WorkloadID , err )),
@@ -115,7 +115,7 @@ func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inC
115
115
Stdout : true ,
116
116
Stderr : true ,
117
117
}); err != nil {
118
- logger .Errorf (ctx , err , "[RunAndWait] Can't fetch log of workload %s error %+v " , message .WorkloadID , err )
118
+ logger .Errorf (ctx , err , "[RunAndWait] Can't fetch log of workload %s" , message .WorkloadID )
119
119
return & types.AttachWorkloadMessage {
120
120
WorkloadID : message .WorkloadID ,
121
121
Data : []byte (fmt .Sprintf ("Fetch log for workload %s failed %+v" , message .WorkloadID , err )),
@@ -130,7 +130,7 @@ func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inC
130
130
var inStream io.WriteCloser
131
131
stdout , stderr , inStream , err = workload .Engine .VirtualizationAttach (ctx , message .WorkloadID , true , true )
132
132
if err != nil {
133
- logger .Errorf (ctx , err , "[RunAndWait] Can't attach workload %s error %+v " , message .WorkloadID , err )
133
+ logger .Errorf (ctx , err , "[RunAndWait] Can't attach workload %s" , message .WorkloadID )
134
134
return & types.AttachWorkloadMessage {
135
135
WorkloadID : message .WorkloadID ,
136
136
Data : []byte (fmt .Sprintf ("Attach to workload %s failed %+v" , message .WorkloadID , err )),
@@ -156,7 +156,7 @@ func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inC
156
156
// wait and forward exitcode
157
157
r , err := workload .Engine .VirtualizationWait (ctx , message .WorkloadID , "" )
158
158
if err != nil {
159
- logger .Errorf (ctx , err , "[RunAndWait] %s wait failed %+v " , utils .ShortID (message .WorkloadID ), err )
159
+ logger .Errorf (ctx , err , "[RunAndWait] %s wait failed" , utils .ShortID (message .WorkloadID ))
160
160
return & types.AttachWorkloadMessage {
161
161
WorkloadID : message .WorkloadID ,
162
162
Data : []byte (fmt .Sprintf ("Wait workload %s failed %+v" , message .WorkloadID , err )),
0 commit comments