• Sean Harkins

    Sean Harkins

    1 year ago
    I'm completely new to Prefect and had some questions about pickling dependencies for containerized execution environments. We are working on a project that uses a thin wrapper over Prefect Flows to include some additional input and output information https://github.com/developmentseed/example-pipeline/blob/fargate_test/recipe/pipeline.py. My question is about how
    cloudpickle
    serializes my Flow's dependencies with S3 storage. Based on some information outlined here https://prefect-community.slack.com/archives/C014Z8DPDSR/p1605200879483400 I've got S3 storage configured and working but it seems that my Flow's upstream dependencies are not pickled when I register the flow as indicated in https://docs.prefect.io/core/advanced_tutorials/task-guide.html#task-inputs-and-outputs. Specifically I receive the following dependency error
    Unexpected error: ModuleNotFoundError("No module named 'h5netcdf'")
    . I can build an image with the necessary dependencies for use with the
    DaskExecutor
    and everything works correctly but our goal is to decouple our execution environment from Flows. Am I misunderstanding how Flow dependencies should be serialized by
    cloudpickle
    . Is there another approach I should be considering in this case? Thanks in advance.
    Sean Harkins
    Jim Crist-Harif
    +1
    7 replies
    Copy to Clipboard
  • r

    Riley Hun

    1 year ago
    Hi everyone, I'm using Prefect Core Server on a Compute Engine instance on Google Cloud Platform. Even though I specified the backend to be server, it keeps running my flows on the cloud backend. I'm just guessing that this could be the reason why my prefect tasks have failed. i.e. Here are the logs
    [2020-11-18 17:51:18+0000] INFO - prefect.CloudFlowRunner | Beginning Flow run for 'ETL'
    [2020-11-18 17:51:20+0000] INFO - prefect.CloudFlowRunner | Flow run FAILED: some reference tasks failed.
    Also when I look into the kubernetes pod logs, it references Prefect Cloud.
    [2020-11-18 17:51:22+0000] CRITICAL - CloudHandler | Unable to write logs to Prefect Cloud
    Any guidance would be much appreciated!
    r
    Michael Adkins
    2 replies
    Copy to Clipboard
  • Marco Palmeri

    Marco Palmeri

    1 year ago
    Hi. I have a question. I've tried rearranging my flow in a few different ways, but I still cannot get a mapped task to wait for all the proceeding mapped tasks to finish. Basically I have a flow where sometimes I will need to decrypt files, some sometimes not (based on a config). So I have a case() control flow task to do the "decryption branch." I start with a dict with some partition keys and a list of URIs for each. In the "decryption branch" I do two things to this dict. (1) transform the URIs to the new output paths (2) make a flat list of all the unique URIs. For (2) I map this and run the decryption task in parallel as a mapped task - this part is working just fine. Then I merge the dict from (1) with the an unchanged version of the dict for the cases where running the decryption should be skipped - this part is working just fine. My issue is then, I pass the resulting dict to mapped task to parallelize for each key. But the task starts up before the decryption mapping task is done. I need it to wait until all of the workers are done. - You can see I have even tried a "dummy" skip task, so I could merge the decrypting task with something from the false branch, and pass that to the final task. This didn't work.
    extract_region_transactions
    starts running as soon as any of the
    decrypt_file_task
    worker tasks complete. -- See code snippet in thread. ``````
    Marco Palmeri
    Jim Crist-Harif
    21 replies
    Copy to Clipboard
  • Gabriel Montañola

    Gabriel Montañola

    1 year ago
    I found a related PR: https://github.com/PrefectHQ/prefect/pull/3649 Hi there my good people, how you doing today? I'm trying to get
    dbt
    error logs sent to my task log but they are coming up as blank and I've already set
    log_stderr
    to True in the task definition.
    Does someone know if I'm doing something wrong or is this a limitation/bug?
    Gabriel Montañola
    Jim Crist-Harif
    5 replies
    Copy to Clipboard
  • i

    Isaac Brodsky

    1 year ago
    I’m also seeing an issue with
    'PrefectSecret' object has no attribute 'secret_name'
    which started around November 11. Possibly there was a change to my execution environment like using a newer/different Prefect agent at that point. Do I need to reinstall the Prefect Agent?
    i
    Jim Crist-Harif
    16 replies
    Copy to Clipboard
  • d

    Dolor Oculus

    1 year ago
    Hi, I am working on a slack handler where I want to be notified only if the overall flow failed, not individual tasks. This is for a flow that is being registered via an agent, not run directly. I was looking at https://docs.prefect.io/core/advanced_tutorials/slack-notifications.html#customizing-your-alerts but it appears to be at task level, not flow level. Is there a good example in the docs for being notified on flow failure? ty!
    d
    Michael Adkins
    9 replies
    Copy to Clipboard
  • d

    Dolor Oculus

    1 year ago
    Logging -- we've added
    log_stdout=True
    to all of our tasks, and the log messages are showing up just fine in the agent's stdout, but we'd like them to also be available on the web ui. We've discovered that by getting the logger from the context, we can do this, but this is a pretty invasive change for our codebase (most of our modules are using standard logging and we don't want to change that). Is there any magic we can invoke to get our logger messages to show up on the web ui?
    d
    Jim Crist-Harif
    +1
    29 replies
    Copy to Clipboard
  • John Grubb

    John Grubb

    1 year ago
  • John Grubb

    John Grubb

    1 year ago
    Hi, I'm attempting to register a flow from the CLI to the cloud, and keep meeting with this error, and I'm hoping someone has seen this before and can tell me what mistake I'm making.
    John Grubb
    nicholas
    16 replies
    Copy to Clipboard
  • r

    Riley Hun

    1 year ago
    How do we add add 
    host.docker.internal
     to 
    /etc/hosts
     via 
    --add-host
    ? Is this something we add to the running agent or the config.toml?
    r
    Jim Crist-Harif
    +1
    44 replies
    Copy to Clipboard