I’m really puzzled by something that feels like it must be super basic or an oversight on my part. I’ve created triggers on a collection, no match filter, and set to fire on insert, update, delete, and replace. They are getting fired, but only on changes to a last updated timestamp field we periodically update. They are not getting fired when I change a document in the collection in other ways, including manually in the atlas collection viewer/editor or via our other existing code paths besides the timestamp update.
When I first came across the issue, I tried to simplify and recreate the problem and think I have a minimal example. I made a function trigger that does nothing but log the change event (
console.log("Change event is: ", JSON.stringify(changeEvent));). All I get are update type changes on the single timestamp field I mentioned.
I expect unrelated, but I also noticed that I can’t create or edit a function to set “Skip Events on Re-Enable” to on. It won’t save - gives a “json: cannot unmarshal object into Go struct field dbConfigData.skip_catchup_events of type bool” error when saving.
Any thoughts? I’m happy to share more, but there’s just not much in the trigger. Feels like something else in the collection is getting in the way of trigger firing, but I don’t know where to go from here.