• a

    Avi A

    1 year ago
    Hey people, Any thoughts on how to deploy “staging” flows? I mean suppose you have a prefect flow registered (on either server/cloud), and you’re making changes to it. You tested your changes locally but now you’d like to test it on remote execution without erasing your production flow. What is the best practice here?
    a
    Chris White
    4 replies
    Copy to Clipboard
  • m

    Mariusz Olszewski

    1 year ago
    hi all, where should I insert my custom functions to be visible by prefect?
    m
    a
    2 replies
    Copy to Clipboard
  • m

    Mariusz Olszewski

    1 year ago
  • m

    Mariusz Olszewski

    1 year ago
    i tried to use my Functions.py module in some task with no success
  • Priyan Chandrapala

    Priyan Chandrapala

    1 year ago
    Hi All, I’m trying to create a flow with Prefect which will only be triggered on demand, it should not be triggered on a schedule. I’m new to Prefect this is my first project. I could not find this in documentation. If anyone has done this before please help me out. Thanks in advance.
    Priyan Chandrapala
    a
    5 replies
    Copy to Clipboard
  • j

    Jasono

    1 year ago
    Hi I’m trying to define tasks imperatively based on a list. The challenge is that the list should be based on a Prefect parameter. Below is the stackoverflow link to the code I tried, but apparently it doesn’t work as task_dependency_pairs is a task, not a list. How do I make it work without breaking the dependency between the Parameter task, and the other dynamically generated tasks?
    j
    s
    6 replies
    Copy to Clipboard
  • Klemen Strojan

    Klemen Strojan

    1 year ago
    Hey all - is there a way to change the email of a user?
    Klemen Strojan
    Chris White
    2 replies
    Copy to Clipboard
  • Kilian

    Kilian

    1 year ago
    Hey, been using prefect for a while and am a big fan. Is it possible to get the error of an upstream task? I have a task that triggers on any_failed and it receives
    prefect.engine.signals.TRIGGERFAIL('Trigger was "all_successful" but some of the upstream tasks failed.')
    I would like to get the actual error message of the upstream task, in this case
    <Failed: "Unexpected error: NameError("name 'asd' is not defined")">
    @task(trigger=prefect.triggers.any_failed)
    def any_failed(data):
        logger = prefect.context.get('logger')
        print(data)
        <http://logger.info|logger.info>("Failed! Error message: %s", data)
    
    @task()
    def fail():
        asd
        return None
    
    @task
    def process(data):
        return True
    
    with Flow('test') as f:
        data = fail()
        result = process(data)
        any_failed(result)
        f.set_reference_tasks([result])
    
    state = f.run()
    And I would like to get the upstream error message in any_failed. I was also looking into state_handlers, but I would prefer this solution having a single point to catch any errors.
    Kilian
    s
    3 replies
    Copy to Clipboard
  • m

    Maura Drabik

    1 year ago
    Hello. I'm trying to register my flow to the cloud. It failed the deployment healthcheck with the following:
    Beginning health checks...
    System Version check: OK
    Traceback (most recent call last):
      File "/opt/prefect/healthcheck.py", line 121, in <module>
        flows = cloudpickle_deserialization_check(flow_file_path)
      File "/opt/prefect/healthcheck.py", line 43, in cloudpickle_deserialization_check
        flows.append(cloudpickle.load(f))
    ModuleNotFoundError: No module named 'utils'
    
    Removing intermediate container 1128b2fe7075
    The command '/bin/sh -c python /opt/prefect/healthcheck.py '["/opt/prefect/flows/scm-validation-flow.prefect"]' '(3, 6)'' returned a non-zero code: 1
    Any guidance on how to resolve? thanks in advance.
    m
    1 replies
    Copy to Clipboard