I can't tell if this is intermittent or something ...
# ask-community
c
I can't tell if this is intermittent or something new on the server side of things, but when I run some of my functional tests I'm seeing:
Copy code
Client error '404 Not Found' for url '<http://ephemeral-prefect/api/automations/filter>'
Response: {'detail': 'Automations are not enabled. Please enable the PREFECT_EXPERIMENTAL_EVENTS and PREFECT_API_SERVICES_TRIGGERS_ENABLED settings.'}
Did something change?
1
How can Automations not be enabled? They've always been enabled.
c
Hi Constantino, which version of Prefect are you seeing this on?
c
Copy code
Version:             2.19.0
API version:         0.8.4
Python version:      3.9.18
Git commit:          92a982fe
Built:               Mon, May 13, 2024 3:32 PM
OS/Arch:             darwin/arm64
Profile:             default
Server type:         cloud
c
Thanks, this is surprising, do you have a bit more of the stack trace? Feel free to redact anything sensitive, just interested in the Prefect part of the stack you're seeing
I notice that your server type says "cloud" but in the error message, we're seeing
<http://ephemeral-prefect/>...
which tells me we're hitting the in-memory server, probably during tests
c
hmmm indeed - let me do a bit more digging on my end
c
First off, thanks for being on 2.19 and for using automations! 🙇 We've been bringing the events and automations subsystem to the open-source self-hosted version in the last few releases, so it's possible we've broken this for you inadvertently. If part of your functional tests is to check how you're creating automations, that can definitely be tested against the ephemeral/in-memory API server now. Let me know if that's what you're trying to do, I think you'd just enable those two settings the error mentions
c
Actually, this looks like it was an issue on my end; I moved a pytest fixture which uses
prefect_test_harness
to a place where it was being autoused during our functional tests; moving those fixtures back (so they're only used in unit tests) resolved the issue for me.
👍 1
Sorry for the false alarm.
c
aha!
prefect_test_harness
jiggles a few handles to set up the ephemeral API
c
sneaky, but useful
c
no no no, thank you for raising it, we're paying close attention for regressions here
Also, I would LOVE to take a peek at your test suite if you were inclined to share (privately is fine)