Hi, we have suddenly getting these errors in our c...
# prefect-aws
a
Hi, we have suddenly getting these errors in our cluster
ImportError: cannot import name 'SecretField' from 'pydantic' (/usr/local/lib/python3.8/dist-packages/pydantic/__init__.py)
โœ… 1
c
that looks like an import error with Pydantic
Did your package installs change recently?
n
We started getting this too. No dependencies changed on our end.
๐Ÿ‘€ 1
c
are you using a default prefect image? are you using a pinned version, or latest?
n
For our flows, we are using a pinned version.
prefect==2.8.0
For the prefect-agent (running in AWS) we are using the latest image.
c
are you installing pydantic?
Iโ€™m not sure if itโ€™s something that changed in container, or in the build or elsewhere - checking Pydantic, https://docs.pydantic.dev/dev-v2/changelog/#v1100-2022-08-30
Copy code
v1.10.0 - 2022-08-30 - Adds the SecretField abstract class so that all the current and future secret fields like SecretStr and SecretBytes will derive from it, #3409 by @expobrain
n
did we figure this out? those docs linked are for pydantic v2 which is very different (written in rust etc) perhaps an upper bound
pydantic<2.0
would be a temporary fix - i would anticipate prefect breaking if it tried to use v2, but we have an upper bound
perhaps the agent is spawning jobs that don't pin and are pulling pydantic v2
a
I explicitly added pydantic==1.10.6 to fix this
We use prefect 2.8.4 pinned tag, just started breaking but fixed with ^
๐Ÿ™Œ 1
t
itโ€™s breaking since the release of Pydantic 2. this issue has been fixed (with a pin to Pydantic<2) in the latest releases of Prefect or you can add the constraint yourself as Ankit has
๐Ÿ‘ 2
๐Ÿ™Œ 1
581 Views