Fork me on GitHub

I kind of remember seeing an issue that an async interceptor that adds a :response to the context doesn't trigger the leave state; I'm seeing this, where interceptor #1 adds a valid :response key to the context inside a go block, and interceptor #2 still executes normally (causing big problems for my app).


I've added more logging, and in the enter of my second interceptor:

:parse-query :response {:status 400, :headers {}, :body {:errors [{:message "Stored query not found."}]}}
So my first interceptor is terminating correctly, by adding a valid :response key, but my second interceptor is still executing.


With more logging:

05.558 DEBUG io.pedestal.interceptor.chain - {:interceptor :com.walmartlabs.lacinia.pedestal/query-source, :stage :enter, :execution-id 11, :fn #object[com.walmartlabs.lacinia.pedestal$pass_query_through_query_source$fn__26193 0x3fff323d "[email protected]3fff323d"], :line 50}
:store-result #object[clojure.core.async.impl.channels.ManyToManyChannel 0x6778b666 "[email protected]"]
05.559 DEBUG io.pedestal.interceptor.chain - {:in process-all, :handling :enter, :execution-id 11, :line 154}
05.560 DEBUG io.pedestal.interceptor.chain - {:interceptor :com.walmartlabs.lacinia.pedestal/query-parser, :stage :enter, :execution-id 11, :fn #object[com.walmartlabs.lacinia.pedestal$query_parser_interceptor$fn__26164 0x310e7b84 "com.[email protected]310e7b84"], :line 50}
:parse-query :response {:status 400, :headers {}, :body {:errors [{:message "Stored query not found."}]}}
05.561 DEBUG io.pedestal.interceptor.chain - {:in check-terminators, :terminate? true, :execution-id 11, :line 96}
05.561 DEBUG io.pedestal.interceptor.chain - {:in leave-all, :execution-id 11, :line 241}
I'd expect the :in check-temrinators to occur after the query-source interceptor, but it get delayed until the query-parser interceptor. The first is async, the second is standard.


Note: this is in 0.5.3, I'm checking 0.5.4 now.


Seems to be present in 0.5.4


@U04VDKC4G sorry for the delayed response but I’ve been traveling. Not sure if you’ve opened a defect yet but I’ll try to reproduce later today. Thanks for posting the details of the issue!


I've added an issue with the same detail, and more ... but I still could have sworn I saw a mention of this problem elsewhere. Maybe a new form of Deja Vue?