Skip to content

Commit fd39a91

Browse files
authored
Release 0.32.0. Update azure_core to 0.28. (#674)
* Release 0.32.0. Update azure_core to 0.28. * Replace DefaultAzureCredential with AzureCliCredential
1 parent a66ea20 commit fd39a91

File tree

46 files changed

+1154
-1098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1154
-1098
lines changed

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changes
11+
12+
## [0.32.0]
13+
14+
### Changes
15+
16+
- Update `azure_core` and `azure_identity` to 0.30.
17+
- Changes to handle API changes in `azure_core`:
18+
- Replace `azure_core::http::RawResponse` with `azure_core::http::BufResponse`
19+
- Add extra parameter when creating new `azure_core::http::Pipeline`
20+
1021
## [0.31.0]
1122

23+
### Changes
24+
1225
- Change `AgentPoolQueue` field to be optional:
1326
- `name`
1427
- Change `ProjectReference` field to be optional:
@@ -19,6 +32,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1932

2033
## [0.30.1]
2134

35+
### Changes
36+
2237
- Change `ServiceEndpoint` field to be optional:
2338
- `description`
2439
- Change `AgentPoolQueue` field to be optional:
@@ -624,7 +639,8 @@ breaking changes over previous versions.
624639

625640
- Initial release.
626641

627-
[Unreleased]: https://github.com/microsoft/azure-devops-rust-api/compare/0.31.0...HEAD
642+
[Unreleased]: https://github.com/microsoft/azure-devops-rust-api/compare/0.32.0...HEAD
643+
[0.32.0]: https://github.com/microsoft/azure-devops-rust-api/compare/0.31.0...0.32.0
628644
[0.31.0]: https://github.com/microsoft/azure-devops-rust-api/compare/0.30.1...0.31.0
629645
[0.30.1]: https://github.com/microsoft/azure-devops-rust-api/compare/0.30.0...0.30.1
630646
[0.30.0]: https://github.com/microsoft/azure-devops-rust-api/compare/0.29.0...0.30.0

autorust/codegen/src/codegen_operations/create_client_and_builder.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub fn create_client(modules: &[String], endpoint: Option<&str>) -> Result<Token
134134
pub(crate) fn scopes(&self) -> Vec<&str> {
135135
self.scopes.iter().map(String::as_str).collect()
136136
}
137-
pub(crate) async fn send(&self, request: &mut azure_core::http::Request) -> azure_core::Result<azure_core::http::RawResponse> {
137+
pub(crate) async fn send(&self, request: &mut azure_core::http::Request) -> azure_core::Result<azure_core::http::BufResponse> {
138138
let context = azure_core::http::Context::default();
139139
self.pipeline.send(&context, request).await
140140
}
@@ -155,6 +155,7 @@ pub fn create_client(modules: &[String], endpoint: Option<&str>) -> Result<Token
155155
options,
156156
Vec::new(),
157157
Vec::new(),
158+
None
158159
);
159160
Self {
160161
endpoint,

autorust/codegen/src/codegen_operations/response_code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl ToTokens for ResponseCode {
128128
};
129129

130130
let raw_response_fn = quote! {
131-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
131+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
132132
self.0.into()
133133
}
134134
};

azure_devops_rust_api/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[package]
55
name = "azure_devops_rust_api"
6-
version = "0.31.0"
6+
version = "0.32.0"
77
edition = "2021"
88
authors = ["John Batty <[email protected]>"]
99
description = "Rust API library for Azure DevOps"
@@ -21,7 +21,7 @@ rust-version = "1.80.0"
2121
doctest = false
2222

2323
[dependencies]
24-
azure_core = { version = "0.27", default-features = true }
24+
azure_core = { version = "0.28", default-features = true }
2525
serde = { version = "1", features = ["derive"] }
2626
serde_json = "1"
2727
bytes = "1"
@@ -39,15 +39,15 @@ once_cell = "1"
3939
uuid = { version = "1", features = ["serde", "v4", "js"] }
4040

4141
[dev-dependencies]
42-
azure_identity = "0.27"
42+
azure_identity = "0.28"
4343
tokio = { version = "1", features = ["full"] }
4444
anyhow = "1"
4545
tracing-subscriber = "0.3"
4646

4747
[features]
4848
default = ["reqwest"]
4949
reqwest = ["azure_core/reqwest"]
50-
reqwest_rustls = ["azure_core/reqwest_rustls"]
50+
#reqwest_rustls = ["azure_core/reqwest_rustls"]
5151
no-default-tag = []
5252
accounts = []
5353
approvals_and_checks = []

azure_devops_rust_api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Example application `Cargo.toml` dependency spec showing how to specify desired
6767
```toml
6868
[dependencies]
6969
...
70-
azure_devops_rust_api = { version = "0.31.0", features = ["git", "pipelines"] }
70+
azure_devops_rust_api = { version = "0.32.0", features = ["git", "pipelines"] }
7171
```
7272

7373
## Examples

azure_devops_rust_api/examples/utils/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ use azure_core::http::{
88
Context, Request,
99
};
1010
use azure_devops_rust_api::Credential;
11-
use azure_identity::DefaultAzureCredential;
11+
use azure_identity::AzureCliCredential;
1212
use std::sync::Arc;
1313

14-
fn authenticate_with_default_credential() -> Result<Credential> {
15-
println!("Authenticate using auto-refreshing DefaultAzureCredential");
16-
let default_azure_credential = DefaultAzureCredential::new()?;
14+
fn authenticate_with_cli_credential() -> Result<Credential> {
15+
println!("Authenticate using Azure CLI credential");
16+
let azure_cli_credential = AzureCliCredential::new(None)?;
1717

18-
Ok(Credential::from_token_credential(default_azure_credential))
18+
Ok(Credential::from_token_credential(azure_cli_credential))
1919
}
2020

2121
#[allow(dead_code)]
@@ -26,7 +26,7 @@ pub fn get_credential() -> Result<Credential> {
2626
println!("Authenticate using PAT provided via $ADO_TOKEN");
2727
Ok(Credential::from_pat(token))
2828
}
29-
_ => authenticate_with_default_credential(),
29+
_ => authenticate_with_cli_credential(),
3030
}
3131
}
3232

azure_devops_rust_api/src/accounts/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Client {
9797
pub(crate) async fn send(
9898
&self,
9999
request: &mut azure_core::http::Request,
100-
) -> azure_core::Result<azure_core::http::RawResponse> {
100+
) -> azure_core::Result<azure_core::http::BufResponse> {
101101
let context = azure_core::http::Context::default();
102102
self.pipeline.send(&context, request).await
103103
}
@@ -121,6 +121,7 @@ impl Client {
121121
options,
122122
Vec::new(),
123123
Vec::new(),
124+
None,
124125
);
125126
Self {
126127
endpoint,
@@ -165,7 +166,7 @@ pub mod accounts {
165166
pub async fn into_body(self) -> azure_core::Result<models::AccountList> {
166167
self.0.into_body().await
167168
}
168-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
169+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
169170
self.0.into()
170171
}
171172
}

azure_devops_rust_api/src/approvals_and_checks/mod.rs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Client {
9797
pub(crate) async fn send(
9898
&self,
9999
request: &mut azure_core::http::Request,
100-
) -> azure_core::Result<azure_core::http::RawResponse> {
100+
) -> azure_core::Result<azure_core::http::BufResponse> {
101101
let context = azure_core::http::Context::default();
102102
self.pipeline.send(&context, request).await
103103
}
@@ -121,6 +121,7 @@ impl Client {
121121
options,
122122
Vec::new(),
123123
Vec::new(),
124+
None,
124125
);
125126
Self {
126127
endpoint,
@@ -230,7 +231,7 @@ pub mod pipeline_permissions {
230231
) -> azure_core::Result<models::ResourcePipelinePermissionsList> {
231232
self.0.into_body().await
232233
}
233-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
234+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
234235
self.0.into()
235236
}
236237
}
@@ -338,7 +339,7 @@ pub mod pipeline_permissions {
338339
) -> azure_core::Result<models::ResourcePipelinePermissions> {
339340
self.0.into_body().await
340341
}
341-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
342+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
342343
self.0.into()
343344
}
344345
}
@@ -448,7 +449,7 @@ pub mod pipeline_permissions {
448449
) -> azure_core::Result<models::ResourcePipelinePermissions> {
449450
self.0.into_body().await
450451
}
451-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
452+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
452453
self.0.into()
453454
}
454455
}
@@ -685,7 +686,7 @@ pub mod check_configurations {
685686
pub async fn into_body(self) -> azure_core::Result<models::CheckConfigurationList> {
686687
self.0.into_body().await
687688
}
688-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
689+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
689690
self.0.into()
690691
}
691692
}
@@ -818,7 +819,7 @@ pub mod check_configurations {
818819
pub async fn into_body(self) -> azure_core::Result<models::CheckConfiguration> {
819820
self.0.into_body().await
820821
}
821-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
822+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
822823
self.0.into()
823824
}
824825
}
@@ -920,7 +921,7 @@ pub mod check_configurations {
920921
pub async fn into_body(self) -> azure_core::Result<models::CheckConfiguration> {
921922
self.0.into_body().await
922923
}
923-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
924+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
924925
self.0.into()
925926
}
926927
}
@@ -1032,7 +1033,7 @@ pub mod check_configurations {
10321033
pub async fn into_body(self) -> azure_core::Result<models::CheckConfiguration> {
10331034
self.0.into_body().await
10341035
}
1035-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1036+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
10361037
self.0.into()
10371038
}
10381039
}
@@ -1131,7 +1132,7 @@ pub mod check_configurations {
11311132
#[derive(Debug)]
11321133
pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
11331134
impl Response {
1134-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1135+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
11351136
self.0.into()
11361137
}
11371138
}
@@ -1239,7 +1240,7 @@ pub mod check_configurations {
12391240
pub async fn into_body(self) -> azure_core::Result<models::CheckConfigurationList> {
12401241
self.0.into_body().await
12411242
}
1242-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1243+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
12431244
self.0.into()
12441245
}
12451246
}
@@ -1401,7 +1402,7 @@ pub mod check_evaluations {
14011402
pub async fn into_body(self) -> azure_core::Result<models::CheckSuite> {
14021403
self.0.into_body().await
14031404
}
1404-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1405+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
14051406
self.0.into()
14061407
}
14071408
}
@@ -1513,7 +1514,7 @@ pub mod check_evaluations {
15131514
pub async fn into_body(self) -> azure_core::Result<models::CheckSuite> {
15141515
self.0.into_body().await
15151516
}
1516-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1517+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
15171518
self.0.into()
15181519
}
15191520
}
@@ -1694,7 +1695,7 @@ pub mod approvals {
16941695
pub async fn into_body(self) -> azure_core::Result<models::ApprovalList> {
16951696
self.0.into_body().await
16961697
}
1697-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1698+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
16981699
self.0.into()
16991700
}
17001701
}
@@ -1847,7 +1848,7 @@ pub mod approvals {
18471848
pub async fn into_body(self) -> azure_core::Result<models::ApprovalList> {
18481849
self.0.into_body().await
18491850
}
1850-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1851+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
18511852
self.0.into()
18521853
}
18531854
}
@@ -1949,7 +1950,7 @@ pub mod approvals {
19491950
pub async fn into_body(self) -> azure_core::Result<models::Approval> {
19501951
self.0.into_body().await
19511952
}
1952-
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1953+
pub fn into_raw_response(self) -> azure_core::http::BufResponse {
19531954
self.0.into()
19541955
}
19551956
}

0 commit comments

Comments
 (0)