• s

    Scarlett King

    10 months ago
    Hey, so I’m using prefect server on AKS. For the job run, I want to pass a few environmental variables to the image by default. What is the best way to add this? On my local machine, I start the kubernetes agent with —env, can I do similar thing for the Kubernetes agent deployed on AKS?
    s
    1 replies
    Copy to Clipboard
  • Lana Dann

    Lana Dann

    10 months ago
    Hi there! I’m attempting to set up an ECS Agent as an ECS Fargate service but I need to scope the IAM permissions to the minimum requirements. I was wondering if someone could explain why we need these permissions so that I can figure out how to scope them out:
    "ec2:AuthorizeSecurityGroupIngress",
    "ec2:CreateSecurityGroup",
    "ec2:CreateTags",
    "ec2:DescribeNetworkInterfaces",
    "ec2:DescribeSecurityGroups",
    "ec2:DescribeSubnets",
    "ec2:DescribeVpcs",
    "ec2:DeleteSecurityGroup"
    Lana Dann
    Anna Geller
    10 replies
    Copy to Clipboard
  • Joël Luijmes

    Joël Luijmes

    10 months ago
    Hey there! I’m trying out the artifact task, and I think it works well. However, I’m trying to get it work with larger artifacts. I submitted earlier a PR to make Apollo’s body size configurable. But I’m now running into another limitation. In the code there is a hard coded limit of 1Mb. I’m willing to submit a PR, but am unfamiliar with this codebase (with graphql in general actually). Can someone point me how to make this limit check configurable?
    if data_size > 1000000:  # 1 mb max
        raise ValueError("Artifact data payload exceedes 1Mb limit.")
    Joël Luijmes
    Anna Geller
    8 replies
    Copy to Clipboard
  • Alexis Lucido

    Alexis Lucido

    10 months ago
    Hi all. Another question. Sorry for bothering. So I am trying to use a custom PostgreSQL database. I have set the a prefectdb postgre db with a username prefect and a given password. I have add the following lines of code into my config.toml file: [server.database] connection_url = "postgres://prefect:mypassword@0.0.0.0:5432/prefectdb" I launch my server with the command : prefect server start --external-postgres --expose However, I have the following error log coming up: hasura_1 | {"internal":"could not connect to server: Connection refused\n\tIs the server running on host "0.0.0.0" I believe there is a mistake in my host definition, or a docker container link issue. I have tried to replace 0.0.0.0 with localhost and the hostname of my virtual machine, but I still find the same problem. Is there any more changes to add to the prefect server config file? Moreover, I have another error with the graphql container: Error: Can't load plugin: sqlalchemy.dialects😛ostgres And I am wondering whether I should set the connection_url element in config.toml as connection_url = "postgresql😕/...", as stated here: https://stackoverflow.com/questions/62688256/sqlalchemy-exc-nosuchmoduleerror-cant-load-plugin-sqlalchemy-dialectspostgre Could you please help me solve that issue? Thanks in advance, again!
    Alexis Lucido
    Anna Geller
    2 replies
    Copy to Clipboard
  • Mariusz Olszewski

    Mariusz Olszewski

    10 months ago
    Hi, I can not find anywhere info about how to upgrade prefect server and UI to the latest version. Can someone paste here the snippet?
    Mariusz Olszewski
    1 replies
    Copy to Clipboard
  • Sylvain Hazard

    Sylvain Hazard

    10 months ago
    Hello there ! I'm having trouble using
    get_task_run_result
    to access data from a subflow. This example should reproduce the issue :
    from prefect import Flow, task, Parameter, unmapped
    from prefect.tasks.prefect import create_flow_run, get_task_run_result
    
    @task(slug="plus-one")
    def plus_one(x: int):
        return x+1
    
    with Flow("Child") as child_flow:
        x = Parameter("x", default=10)
        po = plus_one(x)
    
    @task
    def get_params():
        return [{"x": i} for i in range(5)]
    
    with Flow("Parent") as parent_flow:
        params = get_params()
        flow_run_ids = create_flow_run.map(flow_name=unmapped("Child"), parameters=params)
        results = get_task_run_result.map(flow_run_ids, unmapped("plus-one"))
    When running the parent flow, I get issues that look like :
    Error during execution of task: ValueError("No task runs found while querying for task runs where {'task': {'slug': {'_eq': 'plus-one'}}, 'flow_run_id': {'_eq': '3316e187-adda-461d-814f-29a6ffc059a4'}, 'map_index': {'_eq': -1}}")
    Is there something I'm missing with how slugs work ?
    Sylvain Hazard
    Anna Geller
    6 replies
    Copy to Clipboard
  • Aleksandr Glushko

    Aleksandr Glushko

    10 months ago
    Hi all! Could anyone explain please, if I register flow with some parameters, for example: a=10. And in the flow i have:
    with Flow('flow_name') as flow:
      a = prefect.Parameter('a', 'required'=True)
      <http://logger.info|logger.info>(a)
    how can i get the parameter value to be used? So i want
    a
    to be 1, but I get:
    a = <Parameter: a>
    Im running the flow in the following way:
    prefect_client.graphql(query= """
                                    mutation{
                                        create_flow_run(input: { flow_id: %s , parameters: %s}) {
                                        id
                                        }
                                    }
                                    """ % (train_flow_id, json.dumps(flow_params).replace('"', '\"'))
                                    )
    where flow_params is a dictionary
    Aleksandr Glushko
    Anna Geller
    4 replies
    Copy to Clipboard
  • Saurabh Indoria

    Saurabh Indoria

    10 months ago
    Hi All, We are using Prefect Cloud along with Kubernetes agent for our deployment. Right now, we just have one prefect-agent pod running in Kubernetes, which in turn creates Kubernetes Jobs for all flow runs. I was wondering if this is the best approach? Should we run multiple prefect-agent pods instead? We are very close to our production release, and would really appreciate your inputs!
    Saurabh Indoria
    Kevin Kho
    2 replies
    Copy to Clipboard
  • Ryan Sattler

    Ryan Sattler

    10 months ago
    Hi, I’m trying to connect the Prefect Server Helm Chart to an existing postgres database. I’ve configured the username and password fields inside the values file. However my pods fail to start with this error:
    Error: secret "prefect-server-postgresql" not found
    . I thought this secret would be created automatically? Am I supposed to create it manually and if so how?
    Ryan Sattler
    Kevin Kho
    +1
    13 replies
    Copy to Clipboard
  • q

    Qwame

    10 months ago
    Hi, I'm new to prefect here and my question about the server is anytime I start the server and UI in a docker container, my flows from the previous runs disappear. How do I get around this?
    q
    1 replies
    Copy to Clipboard