Skip to main content

Airflow Workflow component

Development

By default, Airflow runs in a container, started from the repository root with Docker Compose:

docker compose up -d

(or make up). This is the default Airflow used in development and e2e tests, available at http://localhost:8080.

Local development

Optionally run a local standalone Airflow on the host (in the dev-container) from the repository root. This is mainly for testing Airflow version upgrades and as a backup:

make airflow-start

After execution, the Airflow logs will appear in the terminal. Passwords are pre-written deterministically to .airflow/simple_auth_manager_passwords.json.generated from the values of .env. Run make airflow-clean airflow-start to pick up changes to those passwords.

Once started, Airflow can be accessed via browser at http://localhost:8080.

The PORTS tab in the terminal panel also shows which port the Airflow webserver is running on, and VS Code provides "Open in browser" buttons.

If necessary, code changes can be updated for Airflow use immediately by running the command airflow dags reserialize or make airflow-reserialize from the root of the repository. Airflow also automatically updates DAG file changes periodically.

Developing DAGs locally

If you want to run the load dem DAG, you can place test data inside the repo root test_data folder, which is automatically mounted to the processing container.

DAG development practices

  • When accessing any database, use @task.docker since database urls work only inside containers

Production image

Containerfile has two targets that produce one image for every Airflow component:

Target Package source Usage
nightly Local repository source Latest development image, tagged as latest and built from the main branch.
prod Published PyPI package Release images. Build requires PINTA_DAGS_VERSION and PINTA_DAGS_CONSTRAINT.

Both add the celery, fab and pandas Airflow extras. nightly uses the versions pinned in uv.lock and prod uses the constraints of the published pinta-dags release.

Build the latest development image:

podman build --target nightly -f components/dags/Containerfile -t pinta-airflow:latest .

Build a release image:

podman build --target prod -f components/dags/Containerfile \
  --build-arg PINTA_DAGS_VERSION=<version> \
  --build-arg PINTA_DAGS_CONSTRAINT=<constraints-file-in-context> \
  --build-arg AIRFLOW_VERSION=3.3.1 \
  -t pinta-airflow:<version>-airflow3.3.1 .
  • The entrypoint is tini -- airflow. The component is chosen at run time. (api-server, scheduler, dag-processor, triggerer, celery worker). It does not run db migrate or seed connections.
  • The image works with any uid and only writes to AIRFLOW_HOME (/opt/airflow), the log directory and /tmp.
  • Tag convention: <dags version>-airflow<airflow version>, because Airflow can be updated without releasing the DAG package.
  • The worker needs access to a container engine socket to run @task.docker tasks.
  • Smoke test: podman run --rm <image> dags list-import-errors.

Updating Airflow

numpy and scipy are pinned in the DAG component because Airflow's upstream constraints file already fixes versions for the whole dependency set, but those two packages need to be kept under explicit control in this repository so the workspace can resolve the Airflow extra consistently across components. Pulling them out of the generated constraints file and pinning them in pyproject.toml makes upgrades repeatable and avoids resolution conflicts when uv add is run.

  • Update the Airflow version in components/dags/pyproject.toml manually.
  • Update required AIRFLOW_VERSION and PYTHON_VERSION in Makefile
  • Fetch and normalize the matching constraints file with make airflow-prepare-constraints.
    • The helper downloads the upstream Apache Airflow constraints file for the selected Python version, removes the numpy and scipy pins, and writes a local modified copy under components/dags/.airflow/constraints/.
    • The helper prints the upstream numpy and scipy versions. Update the numpy and scipy pins in components/dags/pyproject.toml to match.
  • Use the new AIRFLOW_VERSION when building the production image.
  • If the backend Airflow client needs to stay in sync, update the pin in components/backend/pyproject.toml as well.
  • Run uv add --optional airflow "apache-airflow[celery,docker,fab,pandas,postgres,standard]==<version>" --constraint <path-to-modified-constraints> from components/dags. The celery, fab and pandas extras are used by the production image, so they must be locked together with the providers of the constraints file.
  • Run tests and test standalone usage; remove warning filters or other workarounds required by the old version if necessary.

Special Cases

If there is a need to update dependencies defined by the Airflow constraint file—for example, due to a vulnerability, a bug, or a new feature in a specific provider package:

  • Upgrade the single package in the lock file, e.g. uv lock --upgrade-package <package>, and add a comment explaining why it differs from the upstream constraints file if necessary.
  • Test sufficiently.
  • Release the update.

NOTE: The production image is built from the constraints of a published pinta-dags release, so a changed package only reaches an environment after a new release has been made and verified.

Metadata

Release files for pinta-dags 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pinta-dags 0.1.2
File Size Uploaded Provenance Actions
pinta_dags-0.1.2.tar.gz 29.1 kB Without provenance Details for pinta_dags-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pinta-dags 0.1.2
File Interpreter ABI Platform Actions
pinta_dags-0.1.2-py3-none-any.whl Python 3 none any Details for pinta_dags-0.1.2-py3-none-any.whl

Total release size: 70.8 kB

Release files / pinta_dags-0.1.2.tar.gz

Download URL pinta_dags-0.1.2.tar.gz
Size 29.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cf443bd0b884d010b4173d773eecb865a949f15a9191914216ccdae1f9f26e35
BLAKE2b-256 checksum
How to use checksums
c02e5b9550948fc81f6875386954976476f640ba04f5300f88ccf8a8fcec1339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pinta_dags-0.1.2-py3-none-any.whl

Download URL pinta_dags-0.1.2-py3-none-any.whl
Size 41.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7cc52fa7431f424b91fdd5746f152b558edc9194a4772a14ee021a94952da0f
BLAKE2b-256 checksum
How to use checksums
4cf4060fc153c8d1045a62f3cc21111efdda7f92e96d63def2de52c2c2150673
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pinta-dags 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page