Skip to content

Commit a611e43

Browse files
authored
Merge branch 'main' into compute-2026-03-02
2 parents bd74f5a + 403bbbc commit a611e43

485 files changed

Lines changed: 74804 additions & 28 deletions

File tree

Some content is hidden

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

.github/workflows/spec-gen-sdk-status.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: "SDK Validation Status"
33
on:
44
check_run:
55
types: [completed]
6+
# Azure DevOps pipelines (which report the "SDK Validation" check runs) do not re-trigger when a
7+
# PR is reopened, so the "check_run" event alone would never refresh the status. Re-evaluate the
8+
# existing check runs on reopen using pull_request_target (privileged, runs in the target branch).
9+
pull_request_target:
10+
types: [reopened]
611

712
permissions:
813
contents: read
@@ -13,13 +18,23 @@ permissions:
1318
jobs:
1419
sdk-validation-status:
1520
if: |
16-
github.event.check_run.check_suite.app.name == 'Azure Pipelines' &&
17-
contains(github.event.check_run.name, 'SDK Validation')
21+
github.event_name == 'pull_request_target' ||
22+
(github.event.check_run.check_suite.app.name == 'Azure Pipelines' &&
23+
contains(github.event.check_run.name, 'SDK Validation'))
1824
name: "SDK Validation Status"
1925
runs-on: ubuntu-slim
2026
steps:
27+
# *** IMPORTANT ***
28+
# For workflows that are triggered by the pull_request_target event, the workflow runs in the
29+
# context of the base of the pull request. You should make sure that you do not check out,
30+
# build, or run untrusted code from the head of the pull request.
2131
- uses: actions/checkout@v6
2232
with:
33+
# Only needs .github folder for automation, not the files in the PR (analyzed in a
34+
# separate workflow).
35+
#
36+
# Uses the .github folder from the PR base branch (pull_request_target trigger),
37+
# or the repo default branch (other triggers).
2338
sparse-checkout: |
2439
.github
2540

.github/workflows/src/spec-gen-sdk-status.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ export async function setSpecGenSdkStatusImpl({
7575
core.info(`- ${check.name}: ${check.status} (${check.conclusion})`);
7676
}
7777

78+
// No SDK Validation check runs exist for this commit (e.g. a PR without SDK-relevant changes that
79+
// was reopened). Skip setting a status, to avoid creating a spurious "pending" status that would
80+
// never be resolved, since the Azure DevOps pipelines won't run for such PRs.
81+
if (specGenSdkChecks.length === 0) {
82+
core.info("No SDK Validation check runs found. Skipping status update.");
83+
return;
84+
}
85+
7886
// Check if all SDK generation checks have completed
7987
const allCompleted =
8088
specGenSdkChecks.length > 0 &&

.github/workflows/test/spec-gen-sdk-status.test.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,4 +352,30 @@ describe("spec-gen-sdk-status", () => {
352352
}),
353353
);
354354
});
355+
356+
it("should skip status update when no SDK Validation checks are found", async () => {
357+
// Simulates a reopened PR with no SDK-relevant changes: no SDK Validation check runs exist.
358+
mockGithub.rest.checks.listForRef.mockResolvedValue({
359+
data: {
360+
check_runs: [],
361+
},
362+
});
363+
364+
await setSpecGenSdkStatusImpl({
365+
owner: "testOwner",
366+
repo: "testRepo",
367+
head_sha: "testSha",
368+
target_url: "https://example.com",
369+
github: mockGithub,
370+
core: mockCore,
371+
issue_number: 123,
372+
});
373+
374+
// No status should be set when there are no SDK Validation checks.
375+
expect(mockGithub.rest.repos.createCommitStatus).not.toHaveBeenCalled();
376+
377+
// Outputs should still be set for downstream artifact upload steps.
378+
expect(mockCore.setOutput).toBeCalledWith("head_sha", "testSha");
379+
expect(mockCore.setOutput).toBeCalledWith("issue_number", 123);
380+
});
355381
});

eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,8 +1240,6 @@ function Get-ReleasePlansForCPEXAttestation()
12401240
$query += " AND [System.Tags] NOT CONTAINS 'APEX out of scope'"
12411241
$query += " AND [System.Tags] NOT CONTAINS 'validate APEX out of scope'"
12421242
$query += " AND [Custom.ProductServiceTreeID] <> ''"
1243-
$query += " AND [Custom.ProductLifecycle] <> ''"
1244-
$query += " AND [Custom.ProductType] IN ('Feature', 'Offering', 'Sku')"
12451243

12461244
$workItems = Invoke-Query $fields $query
12471245
return $workItems

specification/azureresiliencemanagement/resource-manager/Microsoft.AzureResilienceManagement/AzureResilienceManagement/client.tsp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import "@azure-tools/typespec-client-generator-core";
44
using Azure.ClientGenerator.Core;
55
using Microsoft.AzureResilienceManagement;
66
using Azure.Core;
7+
using Azure.ResourceManager;
78

89
@@clientName(
910
Microsoft.AzureResilienceManagement,
@@ -146,3 +147,39 @@ using Azure.Core;
146147
@@clientName(GoalType, "ResilienceManagementGoalType", "csharp");
147148
@@clientName(MembershipType, "ResilienceManagementMembershipType", "csharp");
148149
@@clientName(JobStatus, "ResilienceManagementJobStatus", "csharp");
150+
151+
// JavaScript SDK: use an update-specific model for RecoveryPlans.update.
152+
// RecoveryPlans.update is an ArmResourcePatch operation, but the modular JavaScript
153+
// emitter surfaces the full RecoveryPlanProperties on the PATCH body, exposing
154+
// server-side read-only and create-only fields (provisioningState, planType,
155+
// planState, latestFailoverStatus, latestValidationStatus, errorDetails) that
156+
// callers cannot set. The standalone models below mirror the generated PATCH body
157+
// (RecoveryPlanUpdate / RecoveryPlanPropertiesUpdate) and are substituted only for
158+
// JavaScript so the update payload contains just the updatable fields.
159+
// TODO: Remove this once the template has been updated to CustomPatch.
160+
161+
@doc("Properties of the recovery orchestration plan that can be updated.")
162+
model RecoveryPlanUpdateProperties {
163+
@doc("A description of the recovery orchestration plan.")
164+
@minLength(5)
165+
@maxLength(50)
166+
planDescription?: string;
167+
168+
@doc("Settings for the recovery orchestration groups associated with the recovery orchestration plan.")
169+
recoveryGroupsSetting?: RecoveryGroupsSetting;
170+
}
171+
172+
@doc("Represents a recovery orchestration plan resource in the Azure Resilience Management provider namespace.")
173+
model RecoveryPlanUpdate {
174+
@doc("The managed service identities assigned to this resource.")
175+
identity?: CommonTypes.ManagedServiceIdentity;
176+
177+
@doc("The resource-specific properties for this resource.")
178+
properties?: RecoveryPlanUpdateProperties;
179+
}
180+
181+
@@alternateType(
182+
Microsoft.AzureResilienceManagement.RecoveryPlans.update::parameters.properties,
183+
RecoveryPlanUpdate,
184+
"javascript"
185+
);

specification/azureresiliencemanagement/resource-manager/Microsoft.AzureResilienceManagement/AzureResilienceManagement/drillRun.tsp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ interface DrillRuns {
3131
POST Actions
3232
*/
3333
@route(ServiceGroupRoute)
34+
@removed(Versions.v2026_06_01_preview)
35+
@renamedFrom(Versions.v2026_06_01_preview, "failOver")
36+
@sharedRoute
3437
@armResourceAction(DrillRun)
3538
@post
3639
@doc("This initiates a new Failover operation on this Drill Run.")
37-
failOver is ArmResourceActionAsync<
40+
failOverOld is ArmResourceActionAsync<
3841
DrillRun,
3942
DrillRunFailoverRequest,
4043
DrillRunActionResponse,
@@ -44,6 +47,23 @@ interface DrillRuns {
4447
Azure.Core.Foundations.RetryAfterHeader
4548
>;
4649

50+
@route(ServiceGroupRoute)
51+
@added(Versions.v2026_06_01_preview)
52+
@sharedRoute
53+
@armResourceAction(DrillRun)
54+
@post
55+
@doc("This initiates a new Failover operation on this Drill Run.")
56+
failOver is ArmResourceActionAsync<
57+
DrillRun,
58+
DrillRunFailoverRequest,
59+
DrillRunActionResponse,
60+
ServiceGroupAndRequestHeadersParameters,
61+
LroHeaders = ArmAsyncOperationHeader &
62+
ArmLroLocationHeader &
63+
Azure.Core.Foundations.RetryAfterHeader,
64+
OptionalRequestBody = true
65+
>;
66+
4767
@route(ServiceGroupRoute)
4868
@removed(Versions.v2026_04_01_preview)
4969
@armResourceAction(DrillRun)

specification/azureresiliencemanagement/resource-manager/Microsoft.AzureResilienceManagement/AzureResilienceManagement/examples/2026-04-01-preview/RecoveryJobs_Cancel_MaximumSet_Gen.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"parameters": {
55
"serviceGroupName": "sampleServiceGroup",
66
"api-version": "2026-04-01-preview",
7+
"operation-id": "qmn",
78
"recoveryPlanName": "samplePlanName",
89
"recoveryJobName": "c56888ef-9ced-4001-a6d4-7145a0309bdb",
910
"body": {

specification/azureresiliencemanagement/resource-manager/Microsoft.AzureResilienceManagement/AzureResilienceManagement/examples/2026-04-01-preview/RecoveryJobs_Resume_MaximumSet_Gen.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"parameters": {
55
"serviceGroupName": "sampleServiceGroupName",
66
"api-version": "2026-04-01-preview",
7+
"operation-id": "qmn",
78
"recoveryPlanName": "samplePlanName",
89
"recoveryJobName": "c56888ef-9ced-4001-a6d4-7145a0309bdb",
910
"body": {

specification/azureresiliencemanagement/resource-manager/Microsoft.AzureResilienceManagement/AzureResilienceManagement/examples/2026-04-01-preview/RecoveryJobs_Retry_MaximumSet_Gen.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"parameters": {
55
"serviceGroupName": "sampleServiceGroupName",
66
"api-version": "2026-04-01-preview",
7+
"operation-id": "qmn",
78
"recoveryPlanName": "samplePlanName",
89
"recoveryJobName": "c56888ef-9ced-4001-a6d4-7145a0309bdb"
910
},

specification/azureresiliencemanagement/resource-manager/Microsoft.AzureResilienceManagement/AzureResilienceManagement/examples/2026-04-01-preview/RecoveryPlanActions_FailoverCommit_MaximumSet_Gen.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"parameters": {
55
"serviceGroupName": "sampleServiceGroupName",
66
"api-version": "2026-04-01-preview",
7+
"operation-id": "qmn",
78
"recoveryPlanName": "samplePlanName"
89
},
910
"responses": {

0 commit comments

Comments
 (0)