Ben Muller
11/16/2022, 11:31 PMFred Birchall
11/17/2022, 9:55 AMprefect-aws
block has any future scope to handle Lambda invokes, more specifically long running functions (over 300 seconds). The issue that my team is hitting is due to TCP keepalive
. We are self hosting our prefect instance using AWS EKS and seen that with some k8s magic (when using EC2 instances) you can redefine the system configuration to send the first TCP keepalive message after say 200 seconds instead of the Linux default of 2 hours, but this solution does not work using AWS Fargate (our current set-up). So I was wondering if this issue is shared with others and if there is a potential solution down the line? Thanks!Anna Geller
ĐНадиŃНав ĐОгŃŃаŃОв
11/17/2022, 2:14 PMVishnu Duggirala
11/17/2022, 4:30 PMClaire Herdeman
11/17/2022, 7:07 PMJames Zhang
11/21/2022, 2:40 PMprefect deployment build
with -sb
on S3 and -ib
of a DockerContainer, then I got
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
I guess it has to do with the IAM role, but I donâ know how to switch/use a IAM role during deployment build
, any ideas?Vishnu Duggirala
11/22/2022, 8:43 PMauto_deregister_task_definition
set to True? Is it normal for a deployment to create a new task-definition every time it runs an ECS task?Ikkyu Choi
11/22/2022, 11:55 PMSantiago Gonzalez
11/25/2022, 6:31 PMMain class from jar could not be found
⢠The output directory does not exists, so it could not be synchronize to AWS S3
Do you have any idea of why these types of issues happens time to time?
BTW: I am using boto3
SSM
agent to handle EC2 Instances creation, execution and terminationBen Muller
11/29/2022, 9:18 PMFlow ID: 693e7e52-1fe3-4957-bc43-d95dc4af9fe7
Flow run ID: b8c1d85a-ef64-4c4d-a25d-386bd9f4d3b0
Flow run URL: <https://app.prefect.cloud/account/xxx/workspace/xxx/flow-runs/flow-run/xxx>
State message: Submission failed. prefect_aws.ecs.TaskFailedToStart: Timeout waiting for network interface provisioning to complete.
I can confirm that I see the same issue on the ecs cluster task ( image ) - I see this is caused by this
Is there any way we could perhaps get some form of retry logic in the ECSTask infrastructure block? Is this something that should perhaps be a feature request?
Thanks in advanceChristopher
11/30/2022, 2:38 PMashish karan
12/01/2022, 1:25 PMFlow could not be retrieved from deployment.
Traceback (most recent call last):
File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\engine.py", line 255, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\client\utilities.py", line 47, in with_injected_client
return await fn(*args, **kwargs)
File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\deployments.py", line 157, in load_flow_from_flow_run
storage_block = Block._from_block_document(storage_document)
File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\blocks\core.py", line 540, in _from_block_document
else cls.get_block_class_from_schema(block_document.block_schema)
File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\blocks\core.py", line 571, in get_block_class_from_schema
return lookup_type(cls, block_schema_to_key(schema))
File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\utilities\dispatch.py", line 186, in lookup_type
raise KeyError(
KeyError: "No class found for dispatch key 's3-bucket' in registry for type 'Block'."
Vishnu Duggirala
12/02/2022, 8:46 PM18:51:43.512 | INFO | prefect.infrastructure.ecs-task - ECSTask 'tasteful-ringtail': Registering task definition...
Is it possible to avoid this?Kalise Richmond
12/05/2022, 8:54 PMAlex Turek
12/20/2022, 6:28 PMimport my_other_local_module
@flow
def foo():
pass
Kelvin DeCosta
12/21/2022, 3:05 PMinfra_overrides
for a deployment that uses an ECSTask
as its infrastructure block.
I couldn't find any example that uses Deployment.build_from_flow()
and ECSTask
block.
Also, I'm wondering whether specifying these overrides will register a new task definition at the time of flow runKelvin DeCosta
12/23/2022, 9:02 AMAlex Turek
12/30/2022, 9:51 PMAn error occured while monitoring flow run '793a0ee8-fe06-48d3-8858-31b2e99e4c50'. The flow run will not be marked as failed, but an issue may have occurred.
I think the Agent is trying to watch the created ECS Taskâs logs, and using the wrong parameters to watch themGabriela Palacios
01/03/2023, 9:16 PMBen Muller
01/04/2023, 10:08 PMprefect-aws
so that the recently merged PR is available to play around with ? đLawrence Lee
01/06/2023, 8:55 AMtask_definition
, containerDefinitions.name
must be âprefectâ. Otherwise the new registered task definition will contain two separate containerDefinitions
items and runs will fail.
2. I believe that the command
parameter has to be blank/null, otherwise your flow will not be run properly.
3. If using the task_customizations
parameter, you must cast your array(dict) as a JsonPatch
object otherwise the pydantic validation will fail. This conflicts with the documentation and the examples in the dataflow-ops
repo (@Anna Geller)
task_customizations=JsonPatch([
{
"op": "replace",
"path": "/networkConfiguration/awsvpcConfiguration/assignPublicIp",
"value": "DISABLED",
},
])
Mike Grabbe
01/10/2023, 3:33 PMSubmission failed. RuntimeError: Timed out after 240.94525742530823s while watching task for status {until_status or 'STOPPED'}
, and when flows fail like this, it doesn't trigger an automatic retry, even if the flow has been configured to do so. Any ideas how I can get the retries to kick in so we don't get these occasional errors?Samuel Hinton
01/12/2023, 2:57 AMClĂŠment Peyrard
01/15/2023, 1:50 PMbotocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
+
PermissionError: Access Denied
when doing
prefect deployment build flow-example.py:hi -q default -n flow-example-aws-d --apply -sb s3/aws-personal-s3
I am using a IAM user key/secret, it works well for uploading files via AWS CLI, and Prefect Cloud Blocks (named .
As I'm discovering both Prefect Blocks and AWS S3/IAM management ; I have a few questions:
⢠are there constraints regarding the S3 buckets ? (regions, public access ?)
⢠do I need both AWS Credential and S3 blocks created in ?
⢠do I need to use manually-created nested blocks ? (but I don't see the point)
⢠do I need to use IAM roles (which I haven't studied yet đ )
boto* libs
- boto3=1.26.50
- botocore=1.29.50
- aiobotocore==2.4.2
- mypy-boto3==1.26.50
- mypy-boto3-s3==1.26.0.post1
prefect* version
prefect==2.7.8+4.ge291d4c18
prefect-aws==0.2.3
Joshua Grant
01/25/2023, 4:33 PMbotocore.errorfactory.ClientException: An error occurred (ClientException) when calling the RegisterTaskDefinition operation: Too many concurrent attempts to create a new revision of the specified family.
Our workflow is that we are using an ECSTask
block with github storage.
prefect-aws==0.1.8
prefect==2.6.8
This is mainly caused when a mother flow fires off a subflow via run_deployment
, but can occur when trying to invoke a standalone flowKevin B
01/30/2023, 7:20 PMMaciej
02/03/2023, 9:02 PMKelvin DeCosta
02/07/2023, 12:06 PMECSTask
infra block by specifying custom values for cpu
and memory
.
Any help is appreciated!Stephen Lloyd
02/08/2023, 10:59 AMprefect_aws.ecs.TaskFailedToStart: Cannotpullcontainererror: ref pull has been retried 1 time(s): failed to copy: httpReadSeeker: failed open: unexpected status code <https://registry-1.docker.io/v2/prefecthq/prefect/blobs/sha256:209b7d3b67f9dca78847c83ea6f0a78b0f91672ea1ccedc00e9bd5eb46315807>: 400 Bad Request
⢠2nd and subsequent runs of the same flow gets a different error:
Flow could not be retrieved from deployment. Traceback (most recent call last): File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/opt/prefect/flows/atlan.py", line 5, in <module> from util import SnowflakeDestination File "/opt/prefect/flows/util.py", line 3, in <module> import pandas as pd ModuleNotFoundError: No module named 'pandas' The above exception was the direct cause of the following exception: ScriptError: Script at 'flows/atlan.py' encountered an exception: ModuleNotFoundError("No module named 'pandas'")
⢠it appears that Prefect is creating a new task definition but it is not derived from our agent and therefore does not have the same dependencies installed.
How can we resolve this?