• j

    Julio Venegas

    1 year ago
    Hi everyone, trying to get an external postgres instance running for prefect 0.14.19. Postgres instance is running on Azure, it’s postgresql 11. Long story short, all Azure postgres usernames are in the format
    username@server-name
    . In order to get hasura running I have to escape the
    @
    in the username with
    %40
    but that leads to the following graphql error
    graphql_1  | Could not upgrade the database!
    graphql_1  | Error: invalid interpolation syntax in '<postgres://prefectpgadmin>%40sql-dev-prefect:REDACTED_PSWD@sql-dev-prefect.postgres.database.azure.com:5432/sqldb-dev-prefect' at position 25
    Any suggestions about what I can to avoid the graphql interpolation issue?
    j
    Chris White
    26 replies
    Copy to Clipboard
  • j

    jaehoon

    1 year ago
    Hi prefect family! I use parameterized flow run with 'idempotency_key' like this
    test_flow.run(parameters=dict(account_id=account.id), idempotency_key=str(account.id))
    I wanna run flows with new unique idempotency_key every time what's the best practice? Is there any good method in Prefect module? plz help me!
    j
    Kevin Kho
    +1
    3 replies
    Copy to Clipboard
  • c

    Charles Leung

    1 year ago
    Hey prefect team, Is there a parameter that allows a task to fail, yet still continue with the rest of the flow?
    c
    Kevin Kho
    2 replies
    Copy to Clipboard
  • n

    Noah Guilbault

    1 year ago
    Hi prefect -- i'm attempting to submit a job out to a dask cluster and am encountering an error that seems somewhat obtuse. Prefect flow is registered and submitted with a LocalAgent and DaskExecutor(address="scheduler:8786") LOCAL_AGENT Submitted for execution: PID: 159 CloudFlowRunner Beginning Flow run for 'dask_test' DaskExecutor Connecting to an existing Dask cluster at scheduler:8786 CloudFlowRunner Unexpected error: CancelledError('graph_created_address_file_name-d5a25dd2f2624316b837fb11c5077a2e')
    n
    Kevin Kho
    +1
    16 replies
    Copy to Clipboard
  • c

    Charles Leung

    1 year ago
    Hey Prefect Team, i see through automations i can add a cloud hook to send to pagerduty. However, is it possible to PD alert on an individual task fail? e.g., one of our tasks uses triggers to continue even if some optional tasks fail.
    c
    Kevin Kho
    2 replies
    Copy to Clipboard
  • 김응진

    1 year ago
    Hi I have a problem running a test flow. when i run a test code below.
    def test_flow():
        client = prefect.Client(api_token="dddd")
        id = client.register(google_ads_flow, project_name='pipeline-test')
        client.create_flow_run(
            flow_id=id,
            parameters=dict(account_id=46)
        )
    got
    Failed to load and execute Flow's environment: TypeError("missing a required argument: 'date'")
    error. There is nothing like date parameter or something in my flow.
    Kevin Kho
    12 replies
    Copy to Clipboard
  • Stéphan Taljaard

    Stéphan Taljaard

    1 year ago
    Hi. I have a Linux VM hosted on GCP that I 'm using as a single node for running Prefect Server + a LocalAgent. I added a unit file for each to auto-start them. I SSH'ed into the VM, installed docker + docker-compose, then _pip install_ed prefect. However, prefect is now only available under my user (GCP SSH logs into your GCP user by default). (
    which prefect
    ==
    /home/staljaard/.local/bin/prefect
    ) How would you recommend installing/configuring my prefect CLI and _pip install_ed prefect (agent) to be available for all users SSH'ing into the VM?
    Stéphan Taljaard
    Kevin Kho
    +2
    49 replies
    Copy to Clipboard
  • Raúl Mansilla

    Raúl Mansilla

    1 year ago
    Hello, I´m testing with codecommit storage and I have the next error:
    Failed to retrieve task state with error: ClientError([{'message': 'Expected type UUID!, found ""; Could not parse UUID: ', 'locations': [{'line': 2, 'column': 5}], 'path': ['get_or_create_task_run_info'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': 'Expected type UUID!, found ""; Could not parse UUID: '}}}])
    Traceback (most recent call last):
    File "/home/ubuntu/.local/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 "/home/ubuntu/.local/lib/python3.8/site-packages/prefect/client/client.py", line 1399, in get_task_run_info
    result = self.graphql(mutation)  # type: Any
    File "/home/ubuntu/.local/lib/python3.8/site-packages/prefect/client/client.py", line 319, in graphql
    raise ClientError(result["errors"])
    prefect.utilities.exceptions.ClientError: [{'message': 'Expected type UUID!, found ""; Could not parse UUID: ', 'locations': [{'line': 2, 'column': 5}], 'path': ['get_or_create_task_run_info'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': 'Expected type UUID!, found ""; Could not parse UUID: '}}}
    This only happen when I try to run the flow:
    from prefect import task, Flow, Parameter
    from prefect.executors import LocalExecutor
    from prefect.run_configs import LocalRun
    from prefect.storage import CodeCommit
    @task()
    def say_hello(name):
    print("Hello, {}!".format(name))
    with Flow("flow",run_config=LocalRun(),storage=CodeCommit(repo="prefect_flows", path="flows/hello_world.py", commit = "master"),executor=LocalExecutor()) as flow:
    name = Parameter('name')
    say_hello(name)
    flow.run(name='world') # "Hello, world!"
    flow.run(name='Marvin') # "Hello, Marvin!"
    Does anyone has any clue?
    Raúl Mansilla
    Kevin Kho
    +1
    61 replies
    Copy to Clipboard
  • Matthew Neary

    Matthew Neary

    1 year ago
    Hey everybody, I'm working on a CI/CD pipeline for Prefect using CircleCI. When building the flows I'm getting an error when trying to pull in secrets that are stored on Prefect Cloud. It's looking for them locally but can't find them (because they're not there), is there a way to pull cloud secrets into a CI environment?
    Matthew Neary
    Zach Angell
    2 replies
    Copy to Clipboard
  • Mariusz Olszewski

    Mariusz Olszewski

    1 year ago
    Hi, can somebody share with me example how to connect prefect with external postgres? currently evey single time i restart the postgres i loose all history and tasks 😦
    Mariusz Olszewski
    Zach Angell
    2 replies
    Copy to Clipboard