Skip to content

add WasbDagBundle to load Dags from Azure Blob Storage - #67016

Open
Nishieee wants to merge 13 commits into
apache:mainfrom
Nishieee:feature/azure-blob-dag-bundle
Open

add WasbDagBundle to load Dags from Azure Blob Storage#67016
Nishieee wants to merge 13 commits into
apache:mainfrom
Nishieee:feature/azure-blob-dag-bundle

Conversation

@Nishieee

@NishieeeNishieee commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Dag bundle for Azure Blob Storage so Dags can be loaded from a container (with optional prefix), similar to S3DagBundle and GCSDagBundle. Introduces WasbDagBundle, extends WasbHook with container checks and sync_to_local_dir, registers the bundle in provider metadata, documents it in dag-bundles.rst, and adds unit tests.

Manual verification: Tested with Breeze against a real Azure storage account: wasb connection, dag_processor.dag_bundle_config_list pointing at WasbDagBundle, Dag parsed from blob and visible in the UI. PR includes screenshots (Azure container + Airflow Dags list).

closes: #66987


Was generative AI tooling used to co-author this PR?
  • Yes — Cursor (agent-assisted editing)
Screenshot 2026-05-15 at 7 12 30 PMScreenshot 2026-05-15 at 6 52 48 PMScreenshot 2026-05-15 at 6 52 39 PM

Generated-by: Cursor following the guidelines


Important

🛠️ Maintainer triage note for @Nishieee · by @potiuk · 2026-07-08 15:51 UTC

Some review feedback from @eladkal is waiting on you (4 unresolved threads):

The ball is in your court — you've been assigned to this PR. Reply or push a fix in each thread, then mark them resolved. See the Pull Request quality criteria.

Automated triage — may be imperfect; a maintainer takes the next look.

@jroachgolf84

Copy link
Copy Markdown
Collaborator

I added a note in the PR about enhancing the docs. I think a couple of things that I'd like to know if I were a user setting this up from scratch.

  • What authentication method do I use between Airflow and Microsoft?
  • What permissions does my managed identity need?
  • Are there any custom storage bucket/container configuration I need to keep in mind?
  • What about networking?
  • Can I use the same type of Connection that I'd use in a DAG (I know the answer is "yes", but it might be worth calling out)?

@jroachgolf84

Copy link
Copy Markdown
Collaborator

These changes offer a nice starting point: https://github.com/apache/airflow/pull/66993/changes

@Nishieee

Copy link
Copy Markdown
ContributorAuthor

These changes offer a nice starting point: https://github.com/apache/airflow/pull/66993/changes

Thanks for the review. I'll add provider-level bundle docs for WASB following the pattern in #66993 (providers/microsoft/azure/docs/bundles/index.rst, Guides entry, cross-link to core Dag bundles), and cover auth, managed-identity permissions, container/prefix setup, networking, and reusing the same wasb Connection as in Dags. I'll push an update shortly.

@yuseok89yuseok89 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of small comments inline.
Please take a look when you have a moment.

@potiuk

Copy link
Copy Markdown
Member

@Nishieee — There are 4 unresolved review thread(s) on this PR from @dominikhei, @jroachgolf84, @yuseok89. Could you either push a fix or reply in each thread explaining why the feedback doesn't apply? Once you believe the feedback is addressed, mark the thread as resolved so the reviewer isn't re-pinged needlessly. Thanks!


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@Nishieee
Nishieeeforce-pushed the feature/azure-blob-dag-bundle branch from 0144712 to a16419bCompareMay 19, 2026 17:28
@potiuk

Copy link
Copy Markdown
Member

@Nishieee — There are 2 unresolved review thread(s) on this PR, and you have engaged with each one (post-review commits and/or in-thread replies). Could you confirm whether you believe the feedback is fully addressed and the PR is ready for maintainer review confirmation?

If yes, reply here (a short "yes / ready" is fine) and an Apache Airflow maintainer will pick the PR up from the review queue on the next sweep.

If you are still working on a thread, please reply with what is outstanding so the threads stay unresolved on purpose.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.


Drafted-by: Claude Code (Opus 4.7); reviewed by @potiuk before posting

@Nishieee

Copy link
Copy Markdown
ContributorAuthor

@Nishieee — There are 2 unresolved review thread(s) on this PR, and you have engaged with each one (post-review commits and/or in-thread replies). Could you confirm whether you believe the feedback is fully addressed and the PR is ready for maintainer review confirmation?

If yes, reply here (a short "yes / ready" is fine) and an Apache Airflow maintainer will pick the PR up from the review queue on the next sweep.

If you are still working on a thread, please reply with what is outstanding so the threads stay unresolved on purpose.

Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

Drafted-by: Claude Code (Opus 4.7); reviewed by @potiuk before posting

yes

@jroachgolf84jroachgolf84 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, all the changes LGTM. I'm not a maintainer, so my review doesn't count towards your required approvals. But nice job!

@potiukpotiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 3, 2026
@jroachgolf84

Copy link
Copy Markdown
Collaborator

@eladkal - can you take a look at this one? I know that you were involved on the initial issue.

@potiukpotiuk removed the ready for maintainer review Set after triaging when all criteria pass. label Jun 22, 2026
@eladkal
eladkalforce-pushed the feature/azure-blob-dag-bundle branch from 2d3b4e3 to 51d73e9CompareJune 25, 2026 07:31

@eladkaleladkal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eladkal

Copy link
Copy Markdown
Contributor

Probably needs 2nd eye from someone more familiar witht he bundle area

@shahar1
shahar1 requested review from dabla and removed request for dominikhei and yuseok89July 1, 2026 19:30
@potiuk

Copy link
Copy Markdown
Member

@Nishieee — Some review feedback from @dabla is waiting on you: 4 unresolved review thread(s). Could you either push a fix or reply in each thread explaining why the feedback doesn't apply? When you believe the feedback is addressed, please mark the threads as resolved and ping the reviewer (@dabla) for a final look. Thanks!


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@Nishieee

Copy link
Copy Markdown
ContributorAuthor

Apologies! I totally missed this. I'll take a look at this first thing in the morning.

@potiuk

Copy link
Copy Markdown
Member

@Nishieee — There are 3 unresolved review thread(s) on this PR from @dabla. Could you either push a fix or reply in each thread explaining why the feedback doesn't apply? Once you believe the feedback is addressed, mark the thread as resolved so the reviewer isn't re-pinged needlessly. Thanks!


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@eladkal

Copy link
Copy Markdown
Contributor

@Nishieee can you resolve the open items?

@Nishieee
Nishieeeforce-pushed the feature/azure-blob-dag-bundle branch from 51d73e9 to 58c562fCompareAugust 4, 2026 19:03
@Nishieee

Copy link
Copy Markdown
ContributorAuthor

Pushed fixes for all 3 review comments: wasb_hook is now a cached_property, view_url_template returns directly, and sync_to_local_dir's prefix now defaults to None instead of ""

@eladkal
eladkal requested a review from dablaAugust 4, 2026 19:36
@Nishieee

Copy link
Copy Markdown
ContributorAuthor

The failing checks don't seem related to this PR, i think. I reproduced the same build step locally against commit and all provider packages (including microsoft-azure) built successfully with no errors.

@dabla

dabla commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

It would be nice if this PR could be merged, then it can be applied to this PR as well and then my first remark on this PR would be automatically solved.

@dabladabla left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall structure of WasbDagBundle is clean and follows the existing S3DagBundle / GCSDagBundle patterns well. The WasbHook additions (check_for_container, sync_to_local_dir and its helpers) are solid, and the test coverage is thorough.

Two things need attention before merge:

  1. Structlog positional args (lines 69 and 121 in bundles/wasb.py): the _log bound logger is a structlog logger; passing "msg %s", arg to it will not produce the substituted string in structured output. All self._log.* call sites need to be converted to keyword-argument style.

  2. prefix: str = "" (line 48, carry-over from previous review): the hook already accepts None as the "no prefix" sentinel; having the bundle silently convert "no prefix" to "" is a minor semantic mismatch worth aligning.

The two nits (dead _view_url_template check, past-tense log-before-delete wording) are low priority but easy to fix in the same pass.


Drafted-by: Claude Sonnet 4.6 (claude-sonnet-4.6); reviewed by @dabla before posting

Nishieeeand others added 3 commits August 22, 2026 17:15
The debug logs claimed a file or directory had been deleted before
item.unlink()/os.rmdir() actually ran, so a failed deletion would still
be logged as successful.
Co-authored-by: Cursor <cursoragent@cursor.com>
The previous commit changed the stale-file/dir deletion log messages
from past to present tense but missed updating this test's assertions,
breaking CI across every provider compatibility matrix job.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AzureBlobStorageDagBundle

7 participants

@Nishieee@jroachgolf84@potiuk@eladkal@dabla@yuseok89@dominikhei