Lightweight Airflow scheduler-side pack provider for dpone GitOps workloads
Project description
dpone-airflow-pack
dpone-airflow-pack is the lightweight Airflow scheduler/webserver provider for dpone GitOps packs.
It only reads a static airflow-pack.json and builds visible Airflow/Kubernetes tasks. It does not import the full
dpone runtime and intentionally contains no source/sink/native transfer dependencies such as ClickHouse, MSSQL,
pyodbc, pandas, polars, or ConnectorX.
Recommended Airflow DAG import:
from dpone_airflow_pack import build_dpone_gitops_task_group_from_pack
The full dpone[full,accel] package belongs in the KPO runtime image, not in the scheduler image.
Remote pack cache
Remote airflow-pack.json artifacts can be published to object storage and
mirrored into a bounded local scheduler cache.
Bootstrap one generation:
dpone-airflow-pack-sync \
--once \
--index-uri s3://do-dwh/dpone-artifacts/prod/airflow-dags-dev/latest/pack-index.json \
--reader-connection-id s3_dpone_artifacts_reader \
--cache-dir /opt/airflow/dags/.dpone-cache/airflow \
--status-path /opt/airflow/dags/.dpone-cache/airflow/status/last-sync-status.json \
--airflow-variable-key dpone_airflow_pack_cache_status
Refresh without restarting Airflow pods:
dpone-airflow-pack-sync \
--watch \
--interval-seconds 60 \
--jitter-seconds 15 \
--index-uri s3://do-dwh/dpone-artifacts/prod/airflow-dags-dev/latest/pack-index.json \
--reader-connection-id s3_dpone_artifacts_reader \
--cache-dir /opt/airflow/dags/.dpone-cache/airflow \
--status-path /opt/airflow/dags/.dpone-cache/airflow/status/last-sync-status.json \
--airflow-variable-key dpone_airflow_pack_cache_status
The sync loop is fail-open. On S3, connection, index, or hash errors it writes a
warning status and preserves the previous current generation. DAG parse stays
local and cache-only.
When --airflow-variable-key is set, the sync process also publishes the same
redacted status payload into Airflow metadata. This is the recommended
diagnostic channel for KubernetesExecutor deployments because runtime worker
pods do not need to mount the scheduler or dagProcessor cache volume. Variable
publish tries the Airflow model first and then a direct metadata DB upsert for
sidecar/init contexts where Airflow 3 task SDK variables are not available.
Publish failures are warnings only and never fail the Airflow pod.
Connection resolution is scheduler-side safe for Airflow 2.x and 3.x: environment connection URI first, Airflow hook second, and metadata database fallback third. The metadata fallback matters for Airflow 3 sidecar/init containers, where provider hooks may not resolve DB-backed connections outside task execution context even though the metadata row exists.
GitOps domain groups
For DAGs that should run a whole GitOps domain or a named workflow group, keep the grouping in the domain catalog and resolve it through the lightweight provider:
workflow_groups:
daily:
workload_ids:
- dim_customer
- fact_order
from dpone_airflow_pack import workload_ids_from_gitops_domain
workload_ids = workload_ids_from_gitops_domain(
repo_root,
"sales",
group="daily",
)
The resolver only reads YAML files and validates that every group member exists in the same domain catalog.
Inspect the current cache status:
dpone-airflow-pack-cache-status \
--cache-dir /opt/airflow/dags/.dpone-cache/airflow
Airflow execution policy
airflow-pack.json can carry a scheduler-side execution policy:
{
"airflow": {
"execution": {
"task_executor": "KubernetesExecutor",
"deferrable": true,
"on_finish_action": "delete_succeeded_pod",
"get_logs": true,
"logging_interval_seconds": 60
}
}
}
The lightweight provider maps it to KubernetesPodOperator kwargs
(executor, deferrable, on_finish_action, get_logs, and
logging_interval) and treats those fields as pack-owned. In deferrable mode,
logging_interval_seconds controls how often the task resumes to fetch fresh
pod logs. DAG-local overrides may still set DAG-owned values such as retries,
pool, or in_cluster.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dpone_airflow_pack-0.66.16.tar.gz.
File metadata
- Download URL: dpone_airflow_pack-0.66.16.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e84a6609737f42c6ee9fb824be9246f185e1f0c9ac1c651fd01f59049669317
|
|
| MD5 |
1d8791e74aaecb088edddccf1fccda66
|
|
| BLAKE2b-256 |
2f7ee6714ccd428a6afa446b9ddcfe42341e624bd42dd5522a3ee8cd07331534
|
File details
Details for the file dpone_airflow_pack-0.66.16-py3-none-any.whl.
File metadata
- Download URL: dpone_airflow_pack-0.66.16-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f08fcfb9978017a21c1603bfcb174f2d3c79b1db822ee62c670f02bf5a3581f
|
|
| MD5 |
c68229a23731f60f198f1fd13dca5592
|
|
| BLAKE2b-256 |
37bc53f4cc51e626a6bb2cf435cb21efc0092b334adeef6fa38639170637a0d1
|