Open jggatter opened 1 day ago
hi @jggatter - thanks for the issue!
what appears to be happening here is that since you've selected prefecthq/prefect3.0-python3.12
, you're getting the last patch release of 3.0.x
which does not have this Integration
schema.
so should be able to update your base image to just prefecthq/prefect3-python3.12
or prefecthq/prefect3.1-python3.12
to end up with prefect==3.1.5
» docker run --rm -it prefecthq/prefect:3.0-python3.12 /bin/bash
root@98896b712d36:/opt/prefect# prefect version
Version: 3.0.11
API version: 0.8.4
Python version: 3.12.7
Git commit: a17ccfcf
Built: Thu, Oct 24, 2024 5:36 PM
OS/Arch: linux/aarch64
Profile: ephemeral
Server type: ephemeral
Pydantic version: 2.9.2
Server:
Database: sqlite
SQLite version: 3.40.1
root@98896b712d36:/opt/prefect# python -c "from prefect.client.schemas.objects import Integration"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name 'Integration' from 'prefect.client.schemas.objects'
rereading your issue, im not yet convinced I have the story perfectly straight, will keep digging
in particular, its surprising to me to see
Attempting uninstall: prefect
Found existing installation: prefect 3.0.11
Uninstalling prefect-3.0.11:
Successfully uninstalled prefect-3.0.11
...
prefect-3.1.5 prefect-aws-0.5.3
as this combination should work fine. @jggatter can you confirm where these logs came from? I assume the ECS flow run container, but just double checking
Thanks for the quick reply!
Yep, we run containers on ECS Fargate via our push pool.
Yeah, I was also confused to see the prefect-aws installation picking up prefect >= 3.1.3. Perhaps our prefect YAML deployment requiring prefect-aws >= 0.3.4 for the code pulling step causes this reinstallation.
Even then, I suppose it appears the setup steps continue with the original prefect version and do not use the newly installed prefect? Not sure if there are subprocesses/different Pythons runtimes being used in the deployment steps.
In any case I think it's likely just a problem with our setup then. It's better practice for us to keep up with latest docker images or I suppose keep pins in our Prefect YAML files that don't allow for installation of newer, possibly incompatible, versions e.g. prefect-aws 0.5.3.
Bug summary
A user from my organization reported a crash this morning. It appears that Prefect is unable to pull our code from S3 due to an ImportError.
CloudWatch Logs:
Yesterday, before the prefect-aws 0.5.3 release, things appeared to be working for this developer. Given the ImportError and recent prefect-aws release, I assume that the release has some incompatibilities with the latest Prefect version, 3.1.5.
Dockerfile:
Requirements.txt
Our stop gap solution that seems to have worked was: 1) Upgrading the image to prefecthq/prefect:3.1-python3.12 (Just some housekeeping, perhaps not the solution) 2) In requirements.txt pinning
prefect == 3.1.4
andprefect-aws == 0.5.2
Unfortunately I do not have time to confirm my suspicions by looking through the Prefect codebase or trying to reproduce with different versions. Please let me know whether any further information is needed.
Version info
Additional context
Was using the prefecthq/prefect3.0-python3.12 image ECS Fargate runtime.