Skip to content

Commit 38d6f27

Browse files
eng, add apply patches as post sdk-sync step (#3178)
* update commit ID for ARM module * patches * apply patches in script * rename to core.patch * comment out commit ID bump
1 parent d7538e8 commit 38d6f27

18 files changed

+3750
-6
lines changed

Build-AutoRest.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Write-Host "Apply diff to core"
66
Push-Location ./core
77
try {
88
git checkout .
9-
git apply ../core.diff --ignore-whitespace
9+
git apply ../core.patch --ignore-whitespace
1010
} finally {
1111
Pop-Location
1212
}

Build-TypeSpec.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Write-Host "Apply diff to core"
66
Push-Location ./core
77
try {
88
git checkout .
9-
git apply ../core.diff --ignore-whitespace
9+
git apply ../core.patch --ignore-whitespace
1010
} finally {
1111
Pop-Location
1212
}
File renamed without changes.

eng/pipelines/jobs/build-autorest-mgmt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- script: |
3030
git checkout .
31-
git apply ../core.diff --ignore-whitespace
31+
git apply ../core.patch --ignore-whitespace
3232
displayName: 'Patch core'
3333
workingDirectory: ./core
3434

eng/pipelines/jobs/build-autorest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- script: |
3030
git checkout .
31-
git apply ../core.diff --ignore-whitespace
31+
git apply ../core.patch --ignore-whitespace
3232
displayName: 'Patch core'
3333
workingDirectory: ./core
3434

eng/pipelines/publish-autorest-java.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extends:
2727

2828
- script: |
2929
git checkout .
30-
git apply ../core.diff --ignore-whitespace
30+
git apply ../core.patch --ignore-whitespace
3131
displayName: 'Patch core'
3232
workingDirectory: ./core
3333

eng/sdk/patches/0001-revert-impl-in-batch.patch

Lines changed: 2009 additions & 0 deletions
Large diffs are not rendered by default.

eng/sdk/patches/0001-revert-impl-in-communication.patch

Lines changed: 268 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
From 1185f9ded7e644d6b64c955c2faa9422765eea24 Mon Sep 17 00:00:00 2001
2+
From: Weidong Xu <[email protected]>
3+
Date: Thu, 7 Aug 2025 14:28:55 +0800
4+
Subject: [PATCH] revert impl in contentsafety
5+
6+
---
7+
.../implementation/BlocklistClientImpl.java | 24 +++++++++++--------
8+
1 file changed, 14 insertions(+), 10 deletions(-)
9+
10+
diff --git a/sdk/contentsafety/azure-ai-contentsafety/src/main/java/com/azure/ai/contentsafety/implementation/BlocklistClientImpl.java b/sdk/contentsafety/azure-ai-contentsafety/src/main/java/com/azure/ai/contentsafety/implementation/BlocklistClientImpl.java
11+
index e7e96b52ccf..727d27c5547 100644
12+
--- a/sdk/contentsafety/azure-ai-contentsafety/src/main/java/com/azure/ai/contentsafety/implementation/BlocklistClientImpl.java
13+
+++ b/sdk/contentsafety/azure-ai-contentsafety/src/main/java/com/azure/ai/contentsafety/implementation/BlocklistClientImpl.java
14+
@@ -216,7 +216,7 @@ public final class BlocklistClientImpl {
15+
@UnexpectedResponseExceptionType(HttpResponseException.class)
16+
Mono<Response<Void>> deleteTextBlocklist(@HostParam("endpoint") String endpoint,
17+
@QueryParam("api-version") String apiVersion, @PathParam("blocklistName") String name,
18+
- RequestOptions requestOptions, Context context);
19+
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
20+
21+
@Delete("/text/blocklists/{blocklistName}")
22+
@ExpectedResponses({ 204 })
23+
@@ -226,7 +226,7 @@ public final class BlocklistClientImpl {
24+
@UnexpectedResponseExceptionType(HttpResponseException.class)
25+
Response<Void> deleteTextBlocklistSync(@HostParam("endpoint") String endpoint,
26+
@QueryParam("api-version") String apiVersion, @PathParam("blocklistName") String name,
27+
- RequestOptions requestOptions, Context context);
28+
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
29+
30+
@Get("/text/blocklists/{blocklistName}")
31+
@ExpectedResponses({ 200 })
32+
@@ -318,8 +318,8 @@ public final class BlocklistClientImpl {
33+
@UnexpectedResponseExceptionType(HttpResponseException.class)
34+
Mono<Response<Void>> removeBlocklistItems(@HostParam("endpoint") String endpoint,
35+
@QueryParam("api-version") String apiVersion, @PathParam("blocklistName") String name,
36+
- @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData options,
37+
- RequestOptions requestOptions, Context context);
38+
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
39+
+ @BodyParam("application/json") BinaryData options, RequestOptions requestOptions, Context context);
40+
41+
@Post("/text/blocklists/{blocklistName}:removeBlocklistItems")
42+
@ExpectedResponses({ 204 })
43+
@@ -329,8 +329,8 @@ public final class BlocklistClientImpl {
44+
@UnexpectedResponseExceptionType(HttpResponseException.class)
45+
Response<Void> removeBlocklistItemsSync(@HostParam("endpoint") String endpoint,
46+
@QueryParam("api-version") String apiVersion, @PathParam("blocklistName") String name,
47+
- @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData options,
48+
- RequestOptions requestOptions, Context context);
49+
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
50+
+ @BodyParam("application/json") BinaryData options, RequestOptions requestOptions, Context context);
51+
52+
@Get("{nextLink}")
53+
@ExpectedResponses({ 200 })
54+
@@ -587,8 +587,9 @@ public final class BlocklistClientImpl {
55+
*/
56+
@ServiceMethod(returns = ReturnType.SINGLE)
57+
public Mono<Response<Void>> deleteTextBlocklistWithResponseAsync(String name, RequestOptions requestOptions) {
58+
+ final String accept = "application/json";
59+
return FluxUtil.withContext(context -> service.deleteTextBlocklist(this.getEndpoint(),
60+
- this.getServiceVersion().getVersion(), name, requestOptions, context));
61+
+ this.getServiceVersion().getVersion(), name, accept, requestOptions, context));
62+
}
63+
64+
/**
65+
@@ -606,7 +607,8 @@ public final class BlocklistClientImpl {
66+
*/
67+
@ServiceMethod(returns = ReturnType.SINGLE)
68+
public Response<Void> deleteTextBlocklistWithResponse(String name, RequestOptions requestOptions) {
69+
- return service.deleteTextBlocklistSync(this.getEndpoint(), this.getServiceVersion().getVersion(), name,
70+
+ final String accept = "application/json";
71+
+ return service.deleteTextBlocklistSync(this.getEndpoint(), this.getServiceVersion().getVersion(), name, accept,
72+
requestOptions, Context.NONE);
73+
}
74+
75+
@@ -1126,8 +1128,9 @@ public final class BlocklistClientImpl {
76+
public Mono<Response<Void>> removeBlocklistItemsWithResponseAsync(String name, BinaryData options,
77+
RequestOptions requestOptions) {
78+
final String contentType = "application/json";
79+
+ final String accept = "application/json";
80+
return FluxUtil.withContext(context -> service.removeBlocklistItems(this.getEndpoint(),
81+
- this.getServiceVersion().getVersion(), name, contentType, options, requestOptions, context));
82+
+ this.getServiceVersion().getVersion(), name, contentType, accept, options, requestOptions, context));
83+
}
84+
85+
/**
86+
@@ -1159,8 +1162,9 @@ public final class BlocklistClientImpl {
87+
public Response<Void> removeBlocklistItemsWithResponse(String name, BinaryData options,
88+
RequestOptions requestOptions) {
89+
final String contentType = "application/json";
90+
+ final String accept = "application/json";
91+
return service.removeBlocklistItemsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), name,
92+
- contentType, options, requestOptions, Context.NONE);
93+
+ contentType, accept, options, requestOptions, Context.NONE);
94+
}
95+
96+
/**
97+
--
98+
2.50.1.windows.1
99+

0 commit comments

Comments
 (0)