Hello team, I'm struggling to get a basic flow to ...
# ask-community
f
Hello team, I'm struggling to get a basic flow to run on an ecs fargate push workpool. I assume I'm missing something obvious and would really appreciate some help. Some details below: • I'm using prefect 3.1.6 • I've deployed the ECS cluster, users, permissions etc. with the cli
prefect work-pool create --provision-infra
• All flows, tasks code and dependencies are baked in the docker image used to run the flow on ecs • The flow deploys correctly on prefect cloud but when running it, the task fails on the ecs side with no helpful logs (apart from "Essential container in task exited" and "Exit code 0", nothing in CloudWatch) and the flow run remains pending on the prefect cloud side Here is the dockerfile used to build the image
Copy code
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim

ARG PROJECT_PATH

WORKDIR /app

ENV UV_COMPILE_BYTECODE=1
ENV UV_LINK_MODE=copy

RUN --mount=type=cache,target=/root/.cache/uv \
    --mount=type=bind,source=uv.lock,target=uv.lock \
    --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
    uv sync --frozen --no-install-project --no-dev

COPY pyproject.toml .
COPY uv.lock .

COPY src/common src/common
COPY ${PROJECT_PATH} ${PROJECT_PATH}

RUN --mount=type=cache,target=/root/.cache/uv \
    uv sync --frozen --no-dev

ENV PATH="/app/.venv/bin:$PATH"

ENTRYPOINT ["/bin/bash", "-c"]
And the prefect.yaml file used to deploy the flow
Copy code
name: test
prefect-version: 3.1.6

deployments:
- name: test_flow_1_deployment
  version: "1"
  tags: null
  description: null
  schedules:
    - cron: "0 0 * * *"
      timezone: "Europe/Paris"
      active: "true"
  flow_name: flow_1
  entrypoint: src/projects/test/prefect/flows/flow_1.py:sample_flow
  parameters:
    input_data: "Hello, World!"
  work_pool:
    name: ecs-fargate-workpool
    work_queue_name: default
    job_variables:
      image: '{{ $IMAGE_NAME }}:{{ $IMAGE_TAG }}'
Is there anything I'm missing?