ferruzzi opened a new pull request, #77607:
URL: https://github.com/apache/airflow/pull/77607

   A Dag bundle whose files live in a backend that versions its own objects 
(such as an S3 bucket with versioning enabled) can pin a Dag run to an exact 
set of files without copying them anywhere.  That works by having Airflow 
record which object version belongs to each bundle version.  The filesystem 
artifact store that @ephraimbuddy added in apache/airflow#75498 does that by 
copying every file into a published tree, so the publisher must have write 
access.
   
   This PR adds the option to keep the manifests in the metadata database 
instead, so deployments without write access to the bundle's backend can still 
pin runs.  Workers have no database access, so the scheduler resolves the 
manifest for a run's bundle version and ships it to the worker in 
`version_data`, the same way it ships `DagVersion.version_data` today.  Bundles 
with no stored manifest resolve exactly as before.
   
   This is the core half only.  It adds `DatabaseArtifactStore` and the tables 
behind it, but no bundles use it yet.  I'll add a follow-up provider PR to add 
the S3 bundle implementation as a reference.  The store takes the per-file 
fetch as a callable, so any object-store bundle can use it, and plugs in 
through the `create_artifact_store()` hook from apache/airflow#75502.
   
   For reviewers:
   
   - Two new tables, `dag_bundle_manifest` (one immutable row per bundle 
version) and `dag_bundle_manifest_ref` (one row per bundle, naming its current 
version), with a migration.
   - `airflow db clean` keeps a manifest while any Dag run or release reference 
still names its version.
   - `_resolve_version_data` now also looks for a stored manifest.  The 
scheduler prefetches them with one query per enqueue batch. Callback paths do 
one primary-key lookup each, through the DagVersion's own session.
   - apache/airflow#77303  takes the other route for GCS and writes releases 
into the bucket.  This PR adds the option for deployments that cannot grant 
that write access.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change below checkbox to `[X]` followed by the name of the tool, uncomment 
the "Generated-by".
   
   - [X] Yes (please specify the tool below)
   
   
   Generated-by: [Claude Opus 5.5] following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   
   ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to