Code Monkey home page Code Monkey logo

Comments (16)

bennnym avatar bennnym commented on June 5, 2024 2

from prefect-aws.

anna-geller avatar anna-geller commented on June 5, 2024 2

Closing the issue because we clarified the issue and added docs, thanks for all the help here, Ben

from prefect-aws.

zanieb avatar zanieb commented on June 5, 2024 1

Ah interesting. Why are they in Pending states instead of Scheduled, the work queue should not even be returning these. We allow Scheduled -> Pending transitions but not Pending -> Pending as that would indicate two agents attempted to submit the same run at once.

from prefect-aws.

bennnym avatar bennnym commented on June 5, 2024 1

from prefect-aws.

anna-geller avatar anna-geller commented on June 5, 2024

can you share how did you configure your agent and ecs task infra block? this got a little too sparse than I hoped, not even prefect version showing up here 😅 can you add that? we would want to reproduce the issue first before we can fix it

from prefect-aws.

bennnym avatar bennnym commented on June 5, 2024

Prefect version 2.6.7 prefect-aws 0.1.8

Agent is

FROM        prefecthq/prefect:2.6.7-python3.9


RUN         pip install prefect-aws==0.1.8

Then I run the command prefect agent start -q 'prod'

from prefect-aws.

bennnym avatar bennnym commented on June 5, 2024

ECSTask block

def build_and_save_ecs_task(repo_name: str):
    account_number = Sts.get_caller_identity()

    ecs = ECSTask(
        name=repo_name,
        image=f"{account_number}.dkr.ecr.ap-southeast-2.amazonaws.com/prefect-{repo_name}:latest",
        cpu=512,
        memory=256,
        **{
            "stream_output": True,
            "configure_cloudwatch_logs": True,
            "cluster": "prefect-cluster",
            "execution_role_arn": "arn:aws:iam::XXX:role/prefect-execution-role",
            "task_role_arn": "arn:aws:iam::XXX:role/prefect-task-role",
            "launch_type": "FARGATE",
            "vpc_id": "vpc-XXX",
            "env": {"PYTHONPATH": "$PYTHONPATH:.", "AWS_RETRY_MODE": "adaptive", "AWS_MAX_ATTEMPTS": "100"},
            "task_customizations": [
                {"op": "replace", "path": "/networkConfiguration/awsvpcConfiguration/assignPublicIp", "value": "DISABLED"},
                {
                    "op": "add",
                    "path": "/networkConfiguration/awsvpcConfiguration/subnets",
                    "value": ["subnet-XXX", "subnet-XXX", "subnet-XXX"],
                },
                {
                    "op": "add",
                    "path": "/networkConfiguration/awsvpcConfiguration/securityGroups",
                    "value": ["sg-XXX"],
                },
            ],
        },
    )
    ecs.save(name=repo_name, overwrite=True)

from prefect-aws.

zanieb avatar zanieb commented on June 5, 2024

@bennnym Do you have debug level agent logs?

from prefect-aws.

bennnym avatar bennnym commented on June 5, 2024

No I don't.

I am about to wait and see on the hour what happens and I will paste the agent logs here.

I think they are just info, if that is what it defaults to?

from prefect-aws.

bennnym avatar bennnym commented on June 5, 2024

For the record I have 8 flows scheduled to run at the hour, every hour.

from prefect-aws.

bennnym avatar bennnym commented on June 5, 2024


04:59:54.473 \| INFO    \| prefect.agent - Submitting flow run
--
'1c168b64-c542-4ecc-be86-fec3bf879a39'
04:59:54.474 \| INFO    \| prefect.agent - Submitting flow run
'56e37fcc-bf15-4c81-b05f-0955f1f44f58'
04:59:54.475 \| INFO    \| prefect.agent - Submitting flow run
'8fa259e7-6d51-4e61-9a4f-79f959f93783'
04:59:54.475 \| INFO    \| prefect.agent - Submitting flow run
'96242353-061f-43b0-927e-fe693b539ac5'
04:59:54.476 \| INFO    \| prefect.agent - Submitting flow run
'a98eeec6-d794-4084-b7ed-a2f2462d1be2'
04:59:54.476 \| INFO    \| prefect.agent - Submitting flow run
'ab9d2ee5-6132-417c-8575-48746bac4a7b'
04:59:54.477 \| INFO    \| prefect.agent - Submitting flow run
'bb535ea6-ec31-474e-b0d2-b0d1d4ea50f6'
04:59:54.478 \| INFO    \| prefect.agent - Submitting flow run
'c874d6e6-68e6-419a-bd32-14db60def23c'
05:00:00.013 \| INFO    \| prefect.agent - Aborted submission of flow run
'a98eeec6-d794-4084-b7ed-a2f2462d1be2'. Server sent an abort signal: This run
cannot transition to the PENDING state from the PENDING state.
05:00:00.016 \| INFO    \| prefect.agent - Aborted submission of flow run
'c874d6e6-68e6-419a-bd32-14db60def23c'. Server sent an abort signal: This run
cannot transition to the PENDING state from the PENDING state.
05:00:00.017 \| INFO    \| prefect.agent - Aborted submission of flow run
'1c168b64-c542-4ecc-be86-fec3bf879a39'. Server sent an abort signal: This run
cannot transition to the PENDING state from the PENDING state.
05:00:00.027 \| INFO    \| prefect.agent - Aborted submission of flow run
'ab9d2ee5-6132-417c-8575-48746bac4a7b'. Server sent an abort signal: This run
cannot transition to the PENDING state from the PENDING state.
05:00:00.031 \| INFO    \| prefect.agent - Aborted submission of flow run
'56e37fcc-bf15-4c81-b05f-0955f1f44f58'. Server sent an abort signal: This run
cannot transition to the PENDING state from the PENDING state.
05:00:00.055 \| INFO    \| prefect.agent - Aborted submission of flow run
'96242353-061f-43b0-927e-fe693b539ac5'. Server sent an abort signal: This run
cannot transition to the PENDING state from the PENDING state.
05:00:00.090 \| INFO    \| prefect.agent - Aborted submission of flow run
'bb535ea6-ec31-474e-b0d2-b0d1d4ea50f6'. Server sent an abort signal: This run
cannot transition to the PENDING state from the PENDING state.
05:00:00.235 \| INFO    \| prefect.agent - Aborted submission of flow run
'8fa259e7-6d51-4e61-9a4f-79f959f93783'. Server sent an abort signal: This run
cannot transition to the PENDING state from the PENDING state.
05:00:53.069 \| INFO    \| prefect.agent - Submitting flow run
'38a2d94b-81f5-4689-9e08-a4025075221a'


from prefect-aws.

bennnym avatar bennnym commented on June 5, 2024

Of these 8 flows, 6 are now permanently in pending and 2 ran successfully

from prefect-aws.

bennnym avatar bennnym commented on June 5, 2024

I also get quite a few of these errors - but dont think they are related



05:10:41.627 \| ERROR   \| prefect.agent - An error occured while monitoring flow
--
run '5e1eface-72b5-4040-9be3-fe8c2c1b585f'. The flow run will not be marked as
failed, but an issue may have occurred.

from prefect-aws.

bennnym avatar bennnym commented on June 5, 2024

from prefect-aws.

bennnym avatar bennnym commented on June 5, 2024

from prefect-aws.

anna-geller avatar anna-geller commented on June 5, 2024

btw Ben, you could leverage work queue concurrency limits here to ensure that those runs triggered simultaneously will be queued up without overwhelming the agent

from prefect-aws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.