Skip to content

Airflow trigger from backend fails with httpx.ConnectError #5

Description

@MikiYamFos

The backend's /contracts/process endpoint fails to trigger the Airflow DAG because the backend container cannot reach airflow-apiserver by hostname.

Current behavior: curl -X POST http://localhost:8000/contracts/process returns 500 Internal Server Error with httpx.ConnectError: All connection attempts failed.

Workaround: Trigger the DAG directly via Airflow CLI:
docker compose -f infra/docker/docker-compose.yml exec
airflow-scheduler airflow dags trigger cba_pipeline
--conf '{"filenames": ["filename.pdf"]}'

Acceptance criteria:

  • POST /contracts/process successfully triggers the DAG and returns a dag_run_id
  • Backend container can reach http://airflow-apiserver:8080 by hostname
  • Verify with the reachability check in the runbook

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions