Repository navigation
[Data] Vend Azure UC credentials via storage_options so read tasks get them - #66273
Merged
Merged
Conversation
This was referenced Sep 18, 2026
NightWing1998
marked this pull request as ready for review
September 18, 2026 11:48
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Ray Data catalog to pass Azure SAS tokens via storage_options in addition to environment variables, ensuring credentials can pickle into read tasks for deltalake's object_store even when Ray is already initialized. The review feedback suggests adding a warning for read_parquet on Azure when Ray is already initialized, as it is filesystem-only and pyarrow's AzureFileSystem does not support SAS tokens. Additionally, it recommends keeping helper methods as @staticmethod rather than @classmethod to maintain consistency with the rest of the class.
NightWing1998
force-pushed
the
uc/vend-creds
branch
from
September 23, 2026 07:42
aa4bbf1 to
c536a8c
Compare
abhishekverma-ray
approved these changes
Sep 28, 2026
NightWing1998
force-pushed
the
uc/vend-creds
branch
2 times, most recently
from
September 29, 2026 17:56
9b6087f to
6bfe855
Compare
NightWing1998
force-pushed
the
uc/vend-creds
branch
from
October 2, 2026 11:37
6bfe855 to
641120a
Compare
NightWing1998
force-pushed
the
uc/vend-creds
branch
from
October 5, 2026 12:08
641120a to
6f28869
Compare
…t them
A catalog-backed read of an Azure-backed Delta table failed in the read tasks:
OSError: Generic MicrosoftAzure error
-> Error performing GET http://169.254.169.254/metadata/identity/oauth2/token
That address is the Azure instance-metadata endpoint: the worker had no
credential and fell back to "maybe I am on an Azure VM with an attached
identity". `_apply_env` folds credentials into the cluster `runtime_env` only
while Ray is still uninitialized, and any case with an existing Dataset is past
that, so the SAS stopped at the driver. AWS survives this because its vended
`S3FileSystem` pickles into the read tasks; Azure got no filesystem.
Return the SAS in `storage_options` instead -- a plain dict, so it pickles with
the read plan and each worker authenticates with the vended credential.
`read_delta` already merges it under any user-supplied options.
`test_resolve_azure_sets_env` asserted `storage_options is None`, which encoded
exactly the bug; renamed and re-pointed at the credential now travelling.
Testing:
pytest python/ray/data/tests/datasource/test_catalog_azure.py \
python/ray/data/tests/test_catalog.py
38 passed
pytest python/ray/data/tests/datasource/test_write_delta.py
92 passed
AI assistance was used for this change.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Dhruvil Shah <[email protected]>
NightWing1998
force-pushed
the
uc/vend-creds
branch
from
October 8, 2026 07:01
6f28869 to
9681dd1
Compare
sampan-s-nayak
pushed a commit
that referenced
this pull request
Oct 8, 2026
…6272) ## Why Unity Catalog credential vending is covered for AWS, but the Azure path was only tested as far as resolve(): the Databricks SDK is mocked, the assertions check that AZURE_STORAGE_SAS_TOKEN lands in os.environ, and no byte is ever read. Once tests actually read data through a vended Azure SAS, two real bugs showed up — and a third, unrelated to Azure, turned up on the way. Verified against a real Azure Databricks workspace with a Unity Catalog managed Delta table (12,000 rows, 4 log versions, 24 Parquet files) throughout. ## What does this PR achieve? This PR is solely focused in improving the test coverage around azure unity catalog. Some tests added in the PR actually fail in CI but are fixed in later PR part of the stack. ## Links PR is a part of `stacked PRs`. Chain: #66272 > #66273 > #66274 > #66275 > #66276 --------- Signed-off-by: Dhruvil Shah <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
sampan-s-nayak
pushed a commit
that referenced
this pull request
Oct 8, 2026
…row (#66274) ## Why Unity Catalog credential vending is covered for AWS, but the Azure path was only tested as far as resolve(): the Databricks SDK is mocked, the assertions check that AZURE_STORAGE_SAS_TOKEN lands in os.environ, and no byte is ever read. Once tests actually read data through a vended Azure SAS, two real bugs showed up — and a third, unrelated to Azure, turned up on the way. Verified against a real Azure Databricks workspace with a Unity Catalog managed Delta table (12,000 rows, 4 log versions, 24 Parquet files) throughout. ## What does this PR achieve? PyArrow v20.0.0 or above is required to support UC Parquet file based tables. Bump the minimum pyarrow version required so that users with older pyarrow version don't see exception during pipeline execution. ## Links PR is a part of stacked PRs. Chain: #66272 > #66273 > #66274 > #66275 > #66276 Signed-off-by: Dhruvil Shah <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
sampan-s-nayak
pushed a commit
that referenced
this pull request
Oct 8, 2026
## Why Unity Catalog credential vending is covered for AWS, but the Azure path was only tested as far as resolve(): the Databricks SDK is mocked, the assertions check that AZURE_STORAGE_SAS_TOKEN lands in os.environ, and no byte is ever read. Once tests actually read data through a vended Azure SAS, two real bugs showed up — and a third, unrelated to Azure, turned up on the way. Verified against a real Azure Databricks workspace with a Unity Catalog managed Delta table (12,000 rows, 4 log versions, 24 Parquet files) throughout. ## What does this PR achieve Deltalake python SDK does not support reading tables with deletion vectors. Current error message requests to update the `deltalake` library version but no version so released so far has this support. Correct the exception message raised to show that. ## Links PR is a part of stacked PRs. Chain: #66272 > #66273 > #66274 > #66275 > #66276 Signed-off-by: Dhruvil Shah <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
sampan-s-nayak
pushed a commit
that referenced
this pull request
Oct 8, 2026
…#66276) ## Why Unity Catalog credential vending is covered for AWS, but the Azure path was only tested as far as resolve(): the Databricks SDK is mocked, the assertions check that AZURE_STORAGE_SAS_TOKEN lands in os.environ, and no byte is ever read. Once tests actually read data through a vended Azure SAS, two real bugs showed up — and a third, unrelated to Azure, turned up on the way. Verified against a real Azure Databricks workspace with a Unity Catalog managed Delta table (12,000 rows, 4 log versions, 24 Parquet files) throughout. ## What does this PR achieve Add azurite to CI so that we can actively test UC code path against mock azure. ## Links PR is a part of stacked PRs. Chain: #66272 > #66273 > #66274 > #66275 > #66276 --------- Signed-off-by: Dhruvil Shah <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Unity Catalog credential vending is covered for AWS, but the Azure path was only
tested as far as resolve(): the Databricks SDK is mocked, the assertions check
that AZURE_STORAGE_SAS_TOKEN lands in os.environ, and no byte is ever read.
Once tests actually read data through a vended Azure SAS, two real bugs showed
up — and a third, unrelated to Azure, turned up on the way.
Verified against a real Azure Databricks workspace with a Unity Catalog managed
Delta table (12,000 rows, 4 log versions, 24 Parquet files) throughout.
What does this PR achieve
Fix the Azure credential vending to allow non-driver node task/actor operators
to read delta tables from Unity Catalog.
Links
PR is a part of stacked PRs. Chain: #66272 > #66273 > #66274 > #66275 > #66276