Skip to content
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

async-io transitive dependency #1652

Open
arpad-m opened this issue Apr 29, 2024 · 6 comments · May be fixed by #2175
Open

async-io transitive dependency #1652

arpad-m opened this issue Apr 29, 2024 · 6 comments · May be fixed by #2175
Labels
Previous Versions Work related to older, unsupported SDKs
Milestone

Comments

@arpad-m
Copy link
Contributor

arpad-m commented Apr 29, 2024

PR #1560 has brought in the async-process dependency which itself depends on async-io.

As the azure crates already depend on tokio through reqwest, maybe it might be a better idea to switch to tokio instead?

And if that's not possible, maybe it could be hidden behind a feature so that it can be turned off?

Related: #2002

@arpad-m
Copy link
Contributor Author

arpad-m commented Apr 29, 2024

context: we use the azure SDK as a dependency but we would like to avoid usage of async-io anywhere in our dependency chain and continue using tokio only.

@arpad-m
Copy link
Contributor Author

arpad-m commented Dec 6, 2024

@heaths for the record, this issue still exists on the main branch, so maybe remove the label?

@heaths
Copy link
Member

heaths commented Dec 6, 2024

azure_identity is not required by azure_core nor will it ever be - not for dependencies, at least; but, perhaps, for dev-dependencies for examples and such. azure_core itself does not depend on reqwest solely - only by default for an HTTP stack, but we fully support using a different HTTP and/or async runtime stack e.g., monoio which we'll add to our test matrix at some point. Thus, I don't want an explicit dependency on any async runtime for unconditional production code.

For the legacy branch this was primarily left in place as a tracking issue and would eventually be closed if no one else commented on it. But, as the "issue" still exists in the main branch, could you elaborate on what the "issue" actually is? Just that you don't want async-io anywhere in the call stack? Do you actually use azure_identity? I could imagine us using https://docs.rs/tokio/latest/tokio/process/index.html by default but, like with our HTTP stack, we'd have to abstract this away. In that case, I could see relabeling this or opening a dup just for the main branch.

@RickWinter, thoughts? We'd need to prioritize this. At a glance I suspect a couple of days to build and test an abstraction that could work for a couple of async process runtimes out there like the async-process we use now and tokio::process.

@arpad-m
Copy link
Contributor Author

arpad-m commented Dec 9, 2024

Do you actually use azure_identity?

For us, one of the reasons for using the SDK instead of manual HTTP calls is that we can use the SDK provided auth methods instead of having to code them ourselves. So we do indeed use azure_identity. We use multiple auth methods: some in staging/prod that is hosted on Azure, some in CI which is not hosted on Azure but needs to connect to Azure containers as part of the testsuite, and some for local development.

Just that you don't want async-io anywhere in the call stack?

Yeah, it's general advice to avoid using multiple different async runtimes, and we'd like to follow that. An abstraction like it exists for the http client would be amazing (and it's pretty nice that it exists for the http client, that way for example we can enable http pooling locally).

@heaths heaths added this to the 2025-02 milestone Dec 9, 2024
@github-project-automation github-project-automation bot moved this to Untriaged in Azure SDK Rust Dec 9, 2024
@heaths heaths moved this from Untriaged to Not Started in Azure SDK Rust Dec 9, 2024
@heaths
Copy link
Member

heaths commented Dec 9, 2024

@RickWinter @ronniegeraghty I'd like to convert our process implementation we use in azure_identity to tokio::process by default but, no later than beta 2, abstract that away to support other async runtimes. We already depend on tokio by default for our HTTP et. al. stacks so it makes sense not to run two different async runtimes by default in practical cases i.e., using some other Azure SDK + azure_identity.

@arpad-m
Copy link
Contributor Author

arpad-m commented Feb 14, 2025

Filed a successor to #1654: #2175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Previous Versions Work related to older, unsupported SDKs
Projects
None yet
2 participants