https://prefect.io logo
Title
b

Ben Muller

01/04/2023, 10:08 PM
Any chance we can get a release of
prefect-aws
so that the recently merged PR is available to play around with ? πŸ™
πŸ‘€ 1
a

Andrew Huang

01/04/2023, 10:31 PM
It has been released! https://github.com/PrefectHQ/prefect-aws/releases/tag/v0.2.2 should be available on pypi in a few
πŸ™Œ 1
b

Ben Muller

01/04/2023, 10:45 PM
Thank you!!!
Hey @Andrew Huang - after trying to upgrade I get an error in my CI
File "/opt/code/./deploy/prefect/infrastructure.py", line 7, in <module>
    from prefect_aws.ecs import ECSTask
  File "/usr/local/lib/python3.10/site-packages/prefect_aws/__init__.py", line 2, in <module>
    from .credentials import AwsCredentials, MinIOCredentials
  File "/usr/local/lib/python3.10/site-packages/prefect_aws/credentials.py", line 7, in <module>
    from mypy_boto3_s3 import S3Client
ModuleNotFoundError: No module named 'mypy_boto3_s3'
a

Andrew Huang

01/04/2023, 11:21 PM
b

Ben Muller

01/04/2023, 11:22 PM
ah so this will fix it ?
a

Andrew Huang

01/04/2023, 11:23 PM
yeah
b

Ben Muller

01/04/2023, 11:23 PM
cool - I will wait for it to merge in and re-deploy for you πŸ™‚
πŸ‘€ 1
a

Andrew Huang

01/04/2023, 11:23 PM
maybe I can release a post.1
πŸ‘€ 1
b

Ben Muller

01/04/2023, 11:27 PM
Is this related? When I upgraded to 0.2.2 on my agent this was the logs I saw:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/prefect/agent.py", line 262, in cancel_run
    infrastructure = await self.get_infrastructure(flow_run)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/prefect/agent.py", line 355, in get_infrastructure
    infrastructure_block = Block._from_block_document(infra_document)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/prefect/blocks/core.py", line 548, in _from_block_document
    else cls.get_block_class_from_schema(block_document.block_schema)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/prefect/blocks/core.py", line 579, in get_block_class_from_schema
    return lookup_type(cls, block_schema_to_key(schema))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/prefect/utilities/dispatch.py", line 186, in lookup_type
    raise KeyError(
KeyError: "No class found for dispatch key 'ecs-task' in registry for type 'Block'."
could be due to the lag in my flows still being on
0.2.1
a

Andrew Huang

01/04/2023, 11:28 PM
that usually means the block isn’t registered
prefect block register -m prefect_aws.ecs
b

Ben Muller

01/04/2023, 11:29 PM
it is definitely registered πŸ˜†
I have been running everything smoothly for months
yeah all my flows are failing now!
reverting to the old version
I also upgraded from 2.7.1 -> 2.7.4 at the same time
a

Andrew Huang

01/04/2023, 11:33 PM
b

Ben Muller

01/04/2023, 11:34 PM
I can confirm that downgrading back to
prefect-aws
0.2.1 fixes the issue
so i would be surprised if it is anything to do with that
so maybe I need to register the block with
0.2.2
again and then upgrade my agent?
a

Andrew Huang

01/04/2023, 11:36 PM
b

Ben Muller

01/04/2023, 11:41 PM
hope so, will let you know
a

Andrew Huang

01/04/2023, 11:50 PM
It should be released now
b

Ben Muller

01/04/2023, 11:51 PM
think the build is still running, but yeah will be done in a few mins
πŸ‘€ 1
k

Kalise Richmond

01/04/2023, 11:55 PM
Hi @Ben Muller, you should also update from 2.7.4 to 2.7.6 which just got released. There was a bug in 2.7.4
b

Ben Muller

01/04/2023, 11:56 PM
thanks - will do
0.2.3 still not released 🀷
a

Andrew Huang

01/04/2023, 11:58 PM
strange
`Successfully installed prefect-aws-0.2.3`it seems to work for me with
pip install -U prefect-aws
b

Ben Muller

01/04/2023, 11:59 PM
just this minute it works for me
βœ… 1
upgrading fixed all those issues
πŸ™Œ 1
a

Andrew Huang

01/05/2023, 12:10 AM
glad to hear!
b

Ben Muller

01/05/2023, 12:11 AM
best of all it creates the new task definition with the same revision πŸ’ͺ !!!
:party-parrot: 2