@@ -154,7 +154,7 @@ func (p ParallelEnricher) waitForResults(log *logrus.Entry, errChannel chan erro
154
154
timeout = true
155
155
}
156
156
default :
157
- p .taskError (log , err , 1 )
157
+ p .taskError (log . WithField ( "task" , "waitForResults" ) , err , 1 )
158
158
}
159
159
}
160
160
}
@@ -169,22 +169,25 @@ func (p ParallelEnricher) initializeClients(ctx context.Context, log *logrus.Ent
169
169
if err != nil {
170
170
unsuccessfulEnrichers [servicePrincipal ] = true
171
171
unsuccessfulEnrichers [ingressProfile ] = true
172
- p .taskError (log , err , 2 )
172
+ p .taskError (log . WithField ( "task" , "setupK8sClient" ) , err , 2 )
173
173
}
174
174
machineclient , err = p .setupMachineClient (ctx , oc )
175
175
if err != nil {
176
176
unsuccessfulEnrichers [machineClient ] = true
177
- p .taskError (log , err , 1 )
177
+ p .taskError (log . WithField ( "task" , "setupMachineClient" ) , err , 1 )
178
178
}
179
179
operatorclient , err = p .setupOperatorClient (ctx , oc )
180
180
if err != nil {
181
181
unsuccessfulEnrichers [ingressProfile ] = true
182
- p .taskError (log , err , 1 )
182
+ p .taskError (log . WithField ( "task" , "setupOperatorClient" ) , err , 1 )
183
183
}
184
184
configclient , err = p .setupConfigClient (ctx , oc )
185
185
if err != nil {
186
186
unsuccessfulEnrichers [clusterVersion ] = true
187
- p .taskError (log , err , 1 )
187
+ p .taskError (log .WithField ("task" , "setupConfigClient" ), err , 1 )
188
+ }
189
+ if len (unsuccessfulEnrichers ) > 0 {
190
+ log .WithField ("enrichers" , unsuccessfulEnrichers ).Error ("one or more enrichers were unsuccessful" )
188
191
}
189
192
return k8s , machineclient , operatorclient , configclient , unsuccessfulEnrichers
190
193
}
0 commit comments