You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if the expression is not currently being compiled, it might have already been compiled
272
+
ifval, ok:=cel.compiledStore.Get(accessor.GetExpression()); ok {
273
+
ifval!=nil {
274
+
res:=val.(compileResult)
275
+
returnres, nil
276
+
}
280
277
281
-
// if the expression is not currently being compiled, it might have already been compiled
282
-
// either successfully or unsucessfully
283
-
ifval, ok:=cel.compiledStore.Get(accessor.GetExpression()); ok {
284
-
ifval!=nil {
285
-
res:=val.(compileResult)
286
-
returnres.err, res.warn
278
+
returnnil, nil
287
279
}
288
280
289
-
returnnil, ""
290
-
}
291
-
292
-
// expression is not currently being compiled, and has not been compiled before (or has been long enough since it was last compiled that we dropped it).
293
-
// Let's compile it.
294
-
warningString:=""
295
-
compiled:=make(chanerror)
296
-
deferclose(compiled)
281
+
// expression is not currently being compiled, and has not been compiled before (or has been long enough since it was last compiled that we dropped it).
282
+
// Let's compile it.
283
+
warningString:=""
284
+
compiled:=make(chanerror)
285
+
deferclose(compiled)
297
286
298
-
compiling:=make(chancompileResult, 1)
299
-
deferclose(compiling)
287
+
gofunc() {
288
+
deferfunc() {
289
+
ifr:=recover(); r!=nil {
290
+
// convert the panic into an error state for the expression
291
+
compiled<-fmt.Errorf("recovered from a panic while compiling expression %q: %v", accessor.GetExpression(), r)
Copy file name to clipboardExpand all lines: openshift-kube-apiserver/admission/customresourcevalidation/authentication/validate_authentication_test.go
0 commit comments