8000 feat(runtime_env): add Azure Blob Storage support by walkoss · Pull Request #53135 · ray-project/ray · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(runtime_env): add Azure Blob Storage support #53135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

walkoss
Copy link
@walkoss walkoss commented May 19, 2025

Add support for Azure Blob Storage URIs in Ray's runtime_env, allowing users to specify Azure as a location for their dependencies.

Closes #38316

Why are these changes needed?

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@walkoss walkoss requested a review from a team as a code owner May 19, 2025 08:04
@walkoss walkoss force-pushed the feat/azure-working-dir branch from 99aee2c to 7b67c55 Compare May 19, 2025 08:06
Add support for Azure Blob Storage URIs in Ray's runtime_env, allowing
users to specify Azure as a location for their dependencies. Implement
two authentication methods: connection string and managed identity.

Closes ray-project#38316

Signed-off-by: Walid El Bouchikhi <walid.elbouchikhi@datadoghq.com>
@walkoss walkoss force-pushed the feat/azure-working-dir branch from 7b67c55 to ffb0d1a Compare May 19, 2025 08:53
@richardliaw
Copy link
Contributor

cc @edoakes to find someone to review?

8000
Comment on lines 94 to 105
azure_storage_connection_string = os.getenv(
"AZURE_STORAGE_CONNECTION_STRING"
)
azure_storage_account_name = os.getenv("AZURE_STORAGE_ACCOUNT")

# Connection string authentication
if azure_storage_connection_string:
tp = {
"client": BlobServiceClient.from_connection_string(
azure_storage_connection_string
)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The gs and aws clients don't require you to pass in a connection string. Is there a version of the Azure Blob Storage Client that can handle this transparently? e.g. option number 1 described here

Copy link
Author

Choose a reason for hiding this comment

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

Yes, the second option with ManagedIdentity can help on that
I added the connection string as this was the first option described in smart_open library https://github.com/piskvorky/smart_open?tab=readme-ov-file#azure-credentials

I'll remove it and add the DefaultAzureCredential that will eventually fallback to ManagedIdentity

Copy link
Author

Choose a reason for hiding this comment

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

Fixed in c53c796

To use packages via ``Azure`` URIs, you must have the ``smart_open``, ``azure-storage-blob``, and ``azure-identity`` libraries (you can install them using ``pip install smart_open[azure] azure-storage-blob azure-identity``).
Ray supports two authentication methods for Azure Blob Storage:

1. Connection string: Set the environment variable ``AZURE_STORAGE_CONNECTION_STRING`` with your Azure storage connection string.
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't seem secure. I don't think we should support this for production.

Copy link
Contributor

Choose a reason for hiding this comment

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

@walkoss can this be removed from the docs since we're only supporting Managed Identity now?

walkoss added 2 commits May 20, 2025 09:52
…Credential one

Signed-off-by: Walid El Bouchikhi <walid.elbouchikhi@datadoghq.com>
Signed-off-by: Walid El Bouchikhi <walid.elbouchikhi@datadoghq.com>
Signed-off-by: Walid <walkoss@pm.me>
@walkoss walkoss force-pushed the feat/azure-working-dir branch 2 times, most recently from 4a037be to 63c60f3 Compare May 24, 2025 17:33
Signed-off-by: Walid El Bouchikhi <walid.elbouchikhi@datadoghq.com>
@walkoss walkoss force-pushed the feat/azure-working-dir branch from 63c60f3 to 26cd5f4 Compare May 24, 2025 17:33
Copy link

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jun 17, 2025
@github-actions github-actions bot removed the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jun 25, 2025
@israbbani israbbani added the go add ONLY when ready to merge, run all tests label Jun 26, 2025
Copy link
Contributor
@israbbani israbbani left a comment

Choose a reason for hiding this comment

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

I've triggered premerge. @edoakes can you add someone for docs review?

@israbbani
Copy link
Contributor

@walkoss the linter is failing. Can you follow the steps here please?

@israbbani israbbani self-assigned this Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core] Add Azure Blob Storage Support for Ray runtime_env
4 participants
0