• Danny Vilela

    Danny Vilela

    1 year ago
    Hi! If we want to have a parameter within a flow like
    snapshot_date = Parameter(name="snapshot_date", default=dt.datetime.today())
    and pass that into another (class-based) task, how should we do that? Should we pass it to the task initialization (e.g.,
    my_task = MyTask(snapshot_date=snapshot_date)
    ) or task call (i.e.,
    my_task(snapshot_date=snapshot_date)
    )? This is assuming that
    MyTask
    uses
    snapshot_date
    within its
    run
    method.
    Danny Vilela
    Kevin Kho
    12 replies
    Copy to Clipboard
  • Aric Huang

    Aric Huang

    1 year ago
    I want to implement Slack notifications on flow state change that can notify/@-mention a specific Slack user, which can be different between flow runs. I see documentation for using the
    slack_notifier
    (https://docs.prefect.io/core/advanced_tutorials/slack-notifications.html#slack-notifications) or creating your own state handler to attach to a flow (https://docs.prefect.io/core/concepts/notifications.html#state-handlers) but don't see a straightforward way to change the Slack message based on some runtime value other than
    old_state
    and
    new_state
    . Is there any recommended way to do this? I think if there's some way for a state handler to read a Parameter value that would work for me, but not sure if that's possible.
    Aric Huang
    Kevin Kho
    9 replies
    Copy to Clipboard
  • s

    Simon Gasse

    1 year ago
    Hi! I am currently coding up a linear workflow which has only a few data-dependencies but many non-data dependencies. My current approach does not look too clean to me - maybe I am missing some other way to do it? Details in the thread.
    s
    s
    7 replies
    Copy to Clipboard
  • Kien Nguyen

    Kien Nguyen

    1 year ago
    Hi guys, is there anyway I can prevent the flow to register with host name as a label?
    Kien Nguyen
    1 replies
    Copy to Clipboard
  • Thomas Weatherston

    Thomas Weatherston

    1 year ago
    Hey everyone! I have a question relating to Prefect Cloud and authenticating with AWS. We're attempting to add an S3 results backend to our flows but we're running into:
    ClientError('An error occurred (AccessDenied) when calling the PutObject operation: Access Denied')
    Thomas Weatherston
    Billy McMonagle
    +2
    34 replies
    Copy to Clipboard
  • Kien Nguyen

    Kien Nguyen

    1 year ago
    Hi guys, anybody have this issue? Stack trace in the reply I think it happens after I add S3Result 😒miling_face_with_tear:
    Kien Nguyen
    Kevin Kho
    26 replies
    Copy to Clipboard
  • Kien Nguyen

    Kien Nguyen

    1 year ago
    Hi guys, has anyone have experience building the CI/CD pipeline for the flows, for example for every git push will re-register the flow? Cuz right now every times I push the code I will run register for all the flows again, even though the source code of the flows doesn't change
    Kien Nguyen
    Kevin Kho
    12 replies
    Copy to Clipboard
  • Anze Kravanja

    Anze Kravanja

    1 year ago
    Hello! I have a quick question about signals.ENDRUN. Based on my testing even if I raise ENDRUN in a task other tasks are still try being executed. Other signals behave as I would expect them, but with ENDRUN my expectation is that once raised the pipelines stops executing at that time. Am I missing something about ENDRUN? And, is there a mechanism where I could stop the execution of the flow or task that would get around the retrying? (Sometimes an error is of such sort that one knows retrying won’t help and it’s best to just stop)
    Anze Kravanja
    Kevin Kho
    +1
    6 replies
    Copy to Clipboard
  • Joshua S

    Joshua S

    1 year ago
    is anyone else not able to accept invitations? i created a account a send invites to my team, and they are getting the invitation is not valid
    Joshua S
    1 replies
    Copy to Clipboard
  • Danny Vilela

    Danny Vilela

    1 year ago
    Hi! I have a somewhat flaky Prefect task that runs some ETL. I’ve already decorated the task with retry logic (
    max_retries
    ,
    retry_delay
    , etc), and there’s a task after the ETL task to send a notification to slack (not quite using the Slack integration, but querying the Slack API directly). That said, is it possible to hook into the retry logic such that whenever that ETL task gets retried, I can execute some logic? For example, “whenever this task is going to be put into the
    RETRY
    state, run this code”? Would this be a state handler like the
    terminal_state_handler
    on the
    Flow
    , but for the specific task? Or just a state handler passed to
    Flow(state_handlers=[send_slack_message_on_retry])
    ?
    Danny Vilela
    Kevin Kho
    7 replies
    Copy to Clipboard