Skip to content

Commit 3627ab7

Browse files
authored
Move process executor from azure_core to azure_identity (Azure#2712)
1 parent 4558e2f commit 3627ab7

File tree

13 files changed

+52
-52
lines changed

13 files changed

+52
-52
lines changed

sdk/core/azure_core/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ the asynchronous runtime used by the Azure SDK.
99

1010
### Breaking Changes
1111

12+
- Moved `process::Executor` to `azure_identity`.
13+
1214
### Bugs Fixed
1315

1416
### Other Changes

sdk/core/azure_core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ reqwest_deflate = ["typespec_client_core/reqwest_deflate"]
5757
reqwest_gzip = ["typespec_client_core/reqwest_gzip"]
5858
reqwest_rustls = ["typespec_client_core/reqwest_rustls"]
5959
test = ["typespec_client_core/test"]
60-
tokio = ["dep:tokio", "tokio/process", "typespec_client_core/tokio"]
60+
tokio = ["dep:tokio", "typespec_client_core/tokio"]
6161
xml = ["typespec_client_core/xml"]
6262

6363
[lints]

sdk/core/azure_core/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pub mod credentials;
1414
pub mod fs;
1515
pub mod hmac;
1616
pub mod http;
17-
pub mod process;
1817

1918
#[cfg(feature = "test")]
2019
pub mod test;

sdk/core/azure_core/src/process/mod.rs

Lines changed: 0 additions & 38 deletions
This file was deleted.

sdk/identity/azure_identity/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
### Breaking Changes
88

9+
- Replaced `azure_core::process::Executor` with `azure_identity::process::Executor`.
10+
911
### Bugs Fixed
1012

1113
### Other Changes

sdk/identity/azure_identity/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ openssl = { workspace = true, optional = true }
2121
pin-project.workspace = true
2222
serde.workspace = true
2323
time.workspace = true
24+
tokio = { workspace = true, optional = true }
2425
tracing.workspace = true
2526
typespec_client_core = { workspace = true, features = ["derive"] }
2627
url.workspace = true
@@ -39,7 +40,7 @@ tracing-subscriber.workspace = true
3940
default = ["reqwest"]
4041
reqwest = ["azure_core/reqwest"]
4142
reqwest_rustls = ["azure_core/reqwest_rustls"]
42-
tokio = ["azure_core/tokio"]
43+
tokio = ["dep:tokio", "azure_core/tokio", "tokio/process"]
4344
client_certificate = ["openssl"]
4445

4546
[lints]

sdk/identity/azure_identity/src/azure_cli_credential.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33

44
use crate::{
55
env::Env,
6-
process::{shell_exec, OutputProcessor},
6+
process::{new_executor, shell_exec, Executor, OutputProcessor},
77
validate_scope, validate_subscription, validate_tenant_id, TokenCredentialOptions,
88
};
99
use azure_core::{
1010
credentials::{AccessToken, Secret, TokenCredential, TokenRequestOptions},
1111
error::{Error, ErrorKind, ResultExt},
1212
json::from_json,
13-
process::{new_executor, Executor},
1413
};
1514
use serde::Deserialize;
1615
use std::{ffi::OsString, sync::Arc};

sdk/identity/azure_identity/src/azure_developer_cli_credential.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33

44
use crate::{
55
env::Env,
6-
process::{shell_exec, OutputProcessor},
6+
process::{new_executor, shell_exec, Executor, OutputProcessor},
77
validate_scope, validate_tenant_id, TokenCredentialOptions,
88
};
99
use azure_core::{
1010
credentials::{AccessToken, Secret, TokenCredential, TokenRequestOptions},
1111
error::{Error, ErrorKind},
1212
json::from_json,
13-
process::{new_executor, Executor},
1413
};
1514
use serde::de::{self, Deserializer};
1615
use serde::Deserialize;

sdk/identity/azure_identity/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pub use client_secret_credential::*;
3434
pub use default_azure_credential::*;
3535
pub use managed_identity_credential::*;
3636
pub use options::TokenCredentialOptions;
37+
pub use process::{new_executor, Executor};
3738
pub use workload_identity_credential::*;
3839

3940
pub(crate) use app_service_managed_identity_credential::*;
@@ -172,11 +173,11 @@ fn test_validate_tenant_id() {
172173

173174
#[cfg(test)]
174175
mod tests {
176+
use crate::process::Executor;
175177
use async_trait::async_trait;
176178
use azure_core::{
177179
error::ErrorKind,
178180
http::{RawResponse, Request},
179-
process::Executor,
180181
Error, Result,
181182
};
182183
use std::{

sdk/identity/azure_identity/src/options.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
use crate::env::Env;
4+
use crate::{
5+
env::Env,
6+
process::{new_executor, Executor},
7+
};
58
use azure_core::{
69
error::{ErrorKind, Result, ResultExt},
710
http::{new_http_client, HttpClient, Url},
8-
process::Executor,
911
};
1012
use std::sync::Arc;
1113

@@ -36,7 +38,7 @@ impl Default for TokenCredentialOptions {
3638
env: Env::default(),
3739
http_client: new_http_client(),
3840
authority_host,
39-
executor: azure_core::process::new_executor(),
41+
executor: new_executor(),
4042
}
4143
}
4244
}

0 commit comments

Comments
 (0)