• Saurabh Sharma

    Saurabh Sharma

    5 months ago
    Hi, I am trying to use S3 storage for the flow code as follows
    STORAGE = S3(
        bucket="prefect-pipelines",
        key=f"flows/forecaster/flow.py",
        stored_as_script=True,
        # this will ensure to upload the Flow script to S3 during registration
        local_script_path=f"flow.py",
    )
    The following command is used for registering the flow:
    prefect register --project forecaster -p forecaster/
    But for some reason, all the modules under the
    forecaster
    directory is not getting uploaded under the S3 key specified. Need help in solving this. Thanks in advance!
    Saurabh Sharma
    Anna Geller
    10 replies
    Copy to Clipboard
  • Marc Lipoff

    Marc Lipoff

    5 months ago
    Whats the best way to have complex trigger logic? For example, I have 3 upstream tasks. I want the target task to run if: • upstream A. is a mapped task. it must have at least 1 successful child task • upstream B is success. • upstream C can be state.
    Marc Lipoff
    Kevin Kho
    7 replies
    Copy to Clipboard
  • Lana Dann

    Lana Dann

    5 months ago
    is there a way to always trigger a downstream task after its upstream task has completed (regardless of its state)?
    Lana Dann
    Anna Geller
    2 replies
    Copy to Clipboard
  • kevin

    kevin

    5 months ago
    Can I parameterize checkpointing at the task level? ex:
    with Flow('foo') as f:
        chck = Parameter('checkpointing') # Let's say we pass in False
        do_stuff = task(some_python_callable, checkpoint=chck)()
    kevin
    Kevin Kho
    2 replies
    Copy to Clipboard
  • Saurabh Indoria

    Saurabh Indoria

    5 months ago
    Hi All, Our stack: Prefect Cloud + K8s + LocalDask When trying to trigger a flow using GraphQL API (within our Python backend service), we are seeing these errors sometimes..
    requests.exceptions.RetryError: HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Max retries exceeded with url: / (Caused by ResponseError('too many 502 error responses'))
    And
    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",))
    Are there any API limits, throttling, etc?
    Saurabh Indoria
    Kevin Kho
    5 replies
    Copy to Clipboard
  • Saurabh Indoria

    Saurabh Indoria

    5 months ago
    Hi All, We are recently seeing these issues while running some of our flows:
    Failed to retrieve task state with error: ClientError([{'path': ['get_or_create_task_run_info'], 'message': 'Expected type UUID!, found ""; Could not parse UUID: ', 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': 'Expected type UUID!, found ""; Could not parse UUID: ', 'locations': [{'line': 2, 'column': 101}], 'path': None}}}])
    Traceback (most recent call last):
      File "/var/www/.venv/lib/python3.8/site-packages/prefect/engine/cloud/task_runner.py", line 154, in initialize_run
        task_run_info = self.client.get_task_run_info(
      File "/var/www/.venv/lib/python3.8/site-packages/prefect/client/client.py", line 1479, in get_task_run_info
        result = self.graphql(mutation)  # type: Any
      File "/var/www/.venv/lib/python3.8/site-packages/prefect/client/client.py", line 473, in graphql
        raise ClientError(result["errors"])
    prefect.exceptions.ClientError: [{'path': ['get_or_create_task_run_info'], 'message': 'Expected type UUID!, found ""; Could not parse UUID: ', 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': 'Expected type UUID!, found ""; Could not parse UUID: ', 'locations': [{'line': 2, 'column': 101}], 'path': None}}}]
    Can someone please help with this? Flow run: https://cloud.prefect.io/quiltai/flow-run/f17f2795-af8f-415e-9db7-c6c0643111bd
    Saurabh Indoria
    Anna Geller
    2 replies
    Copy to Clipboard
  • Chu Lục Ninh

    Chu Lục Ninh

    5 months ago
    Hi, I faced the problem with
    kubernetes.RunNamespacedJob
    , when run a long-running job (in my case half of the day). I got huge memory leak. My suspect is this job use
    ThreadPoolExecutor
    to poll job log every 5s using
    ReadNamespacedPodLogs
    , since ReadNamespacedPodLogs executed in other thread context, its refCount didn't reduce to 0 to trigger GC when we assign new value to
    read_pod_logs
    , and that leads to orphan object and leak the memory https://github.com/PrefectHQ/prefect/blob/14644fa5fe129b7fa8385d58df82e6f27332b04a/src/prefect/tasks/kubernetes/job.py#L773
    Chu Lục Ninh
    Anna Geller
    9 replies
    Copy to Clipboard
  • Daniel Nilsen

    Daniel Nilsen

    5 months ago
    Is it possible to create a tenant with the graphql api?
    Daniel Nilsen
    2 replies
    Copy to Clipboard
  • Tomás Emilio Silva Ebensperger

    Tomás Emilio Silva Ebensperger

    5 months ago
    HI everyone, I was wondering about slack notifications (or any other type of notification), when i set up a number of retries > 0, is there a way to only trigger the notification if the task fails after all the retries.
    Tomás Emilio Silva Ebensperger
    Kevin Kho
    2 replies
    Copy to Clipboard
  • Pinakpani Mukherjee

    Pinakpani Mukherjee

    5 months ago
    Hello. I was trying to run prefect locally with a local postgres install. I set up the config.toml
    [server.database]
    connection_url = "<postgres://prefect:prefect@localhost:5432/postgres>"
    The problem that I am currently having now is that after putting in
    prefect server start -ep
    , Hasura is not able to connect properly and throws errors. Is there anyway I can rectify and solve this issue?
    Pinakpani Mukherjee
    1 replies
    Copy to Clipboard