Fork me on GitHub
#datomic
<
2024-04-20
>
cch113:04:12

I have a lambda ion that is being invoked by an EventBride Schedule. The lambda is invoked correctly but the ion fails to run. The Cloudwatch log for the lambda shows this error:

Assert failed: (inst? t-last): datomic.ion.lambda.handler.exceptions.Incorrect
clojure.lang.ExceptionInfo: Assert failed: (inst? t-last) {:cognitect.anomalies/category :cognitect.anomalies/incorrect, :cognitect.anomalies/message "Assert failed: (inst? t-last)"}
	at datomic.ion.lambda.handler$throw_anomaly.invokeStatic(handler.clj:25)
	at datomic.ion.lambda.handler$throw_anomaly.invoke(handler.clj:21)
	at datomic.ion.lambda.handler.Handler.on_anomaly(handler.clj:175)
	at datomic.ion.lambda.handler.Handler.handle_request(handler.clj:205)
	at datomic.ion.lambda.handler$fn__3856$G__3781__3861.invoke(handler.clj:68)
	at datomic.ion.lambda.handler$fn__3856$G__3780__3867.invoke(handler.clj:68)
	at clojure.lang.Var.invoke(Var.java:399)
	at datomic.ion.lambda.handler.Thunk.handleRequest(Thunk.java:35)
Interesting mentions: • Several different EventBridge schedules with different lambda ion targets work correctly. • The same configuration of EventBridge schedule and the same Clojure code is deployed to a different AWS account and everything works correctly. It's as though this particular lambda has some state somewhere that has been corrupted. I've searched on ask.datomic and http://datomic.com but this exception does not seem to have been reported.

Joe Lane13:04:50

Hey @U0698L2BU I just searched all our codebases for t-last, inst? t-last, and assert.*inst\?.* and I've come up with nothing. Do you depend on a library which has this assertion?

cch113:04:36

I don't think so (but I'm checking now).

cch113:04:33

Yep, I find that in my codebase. I was confused by the error message since it seemed like my code never gets invoked. Clearly that's not the case. This is going to be a "doh" me problem I can tell.... thanks for setting me straight on a Saturday AM.

🎸 1
cch115:04:16

@U0CJ19XAM, definitely a me problem. But it would have been useful if that logged exception showed the cause's stacktrace. Not a big deal TBH.