Repository navigation
[Chaos] Propose scoped conditional PUT contract for 2026-11-01 - #47577
Merged
Frank Li (franklixuefei) merged 3 commits intoOct 23, 2026
Conversation
Add optional wildcard create-only/update-only headers and explicit 412 only to workspace, scenario and configuration PUTs. Preserve retained contracts and existing success/LRO behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Next Steps to MergeNext steps that must be taken to merge this PR:
Comment generated by summarize-checks workflow run. |
Contributor readiness: required accessWarning Access issues can block approvals, Azure DevOps pipelines, or labeling.
Internal contributors: set up / renew access. Recheck: Contributors with verified access (1)Public Azure membership and repository write access verified.
Non-blocking check; fix access issues to unblock affected actions. Last updated: 2026-10-23T22:16:26.175Z |
TypeSpec suppressions requiring review✅ No TypeSpec suppressions require review for the latest commit. |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews
Comment generated by After APIView workflow run. |
Preserve HTTP 412 PreconditionFailed semantics and November-only headers while removing explicit error-status scaffolding and obsolete suppressions. Use default-key error examples and prove actual 412 validation with negative controls. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Make the contract overview declarative without asserting runtime rollout or API approval. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Frank Li (franklixuefei)
merged commit Oct 23, 2026
89d266e
into
Azure:juliagao-microsoft-chaos-2026-11-ga-promotion
53 of 56 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ARM (Control Plane) API Specification Update Pull Request
Tip
Overwhelmed by all this guidance? See the
Getting helpsection at the bottom of this PR description.PR review workflow diagram
Please understand this diagram before proceeding. It explains how to get your PR approved & merged.
Purpose of this PR
What's the purpose of this PR? Check the specific option that applies. This is mandatory!
juliagao-microsoft-chaos-2026-11-ga-promotion, notmain. This is not a change to an already published GA API.Contract and scope
Only these operations gain optional
If-None-Match/If-Matchrequest headers. Failed conditions return actual HTTP 412 withPreconditionFailedin the existing common Azure error body, modeled by the standard ARMdefaultresponse:Workspaces_CreateOrUpdateScenarios_CreateOrUpdateScenarioConfigurations_CreateOrUpdateThe supported proposal is wildcard create-only (
If-None-Match: *) and update-only (If-Match: *). Failed conditions cause no resource change or LRO acceptance. Omitting both headers preserves unconditional PUT. Existing supported validators must be preserved; effective conditions must be honored or rejected with 412 when they cannot be verified, not silently ignored. RFC-required ignoring ofIf-Unmodified-SincewithIf-Match, an invalid date, or no available modification date still applies.No new
etagbody property, response ETag, full entity-tag matching platform, or public date-validator parameter is introduced. V1 resources, Connections, DELETE, ownership migration, runtime implementation, SDKs and Portal/CLI defaults are excluded. Existing operation IDs, 200/201 payloads, requiredness, sync/async choices and LRO headers/options are unchanged.The emitted public response map remains exactly
200/201/default; there is no explicit 412 declaration, custom error model, union or new TypeSpec suppression. This follows the user's revised modeling decision: preserve actual HTTP 412 behavior while using the standard public ARM default-error schema. No internal service status declaration is changed by this spec-only amendment.Six operation-wired examples use supported
responses.defaulterror examples with HTTP 412 in their titles,PreconditionFailedbodies, and their conditional success responses. This is an example-representation change, not a change to actual HTTP failure behavior. OAV LiveValidator additionally validates the same six bodies with actual status412and rejects six malformed-body negative controls. Existing unconditional examples are unchanged. All OpenAPI and copied examples were regenerated by the locked emitter, not hand-edited.Compatibility and validation evidence
Baseline: promotion-branch SHA
c4271ad95126b3e0356cc9614b5b679f1cb10d77, freshly verified against live #45455. The untouched locked baseline compiled without warnings or tracked-file changes. Toolchain: TypeSpec compiler 1.17.0, Azure ARM/AutoRest libraries 0.73.0, pnpm 12.6.0; frozen dependency restore changed no manifests or locks.Run the following from the repository root. These are the actual commands run and their results:
node .\node_modules\@typespec\compiler\cmd\tsp.js compile .\specification\chaos\resource-manager\Microsoft.Chaos\Chaos(untouched baseline)azsdk_run_typespec_validationwith the absolute Chaos project rootnode .\node_modules\@typespec\compiler\cmd\tsp.js compile .\specification\chaos\resource-manager\Microsoft.Chaos\Chaos --warn-as-errornode .\eng\tools\typespec-validation\cmd\tsv.js .\specification\chaos\resource-manager\Microsoft.Chaos\Chaosnode .\eng\tools\typespec-suppressions\cmd\typespec-suppressions.js --base c4271ad95126b3e0356cc9614b5b679f1cb10d77 --head HEAD --check-rules-file .\eng\tools\typespec-suppressions\check-rules.json --fail-on-approval .\specification\chaos\resource-manager\Microsoft.Chaos\ChaosrequiresApproval: false.$env:CHAOS_CONTRACT_BASE_REF='c4271ad95126b3e0356cc9614b5b679f1cb10d77'; $env:CHAOS_PRECONDITION_BASE_REF=$env:CHAOS_CONTRACT_BASE_REF; node --test .\specification\chaos\resource-manager\Microsoft.Chaos\Chaos\tests\workspace-encryption.test.mjs .\specification\chaos\resource-manager\Microsoft.Chaos\Chaos\tests\put-preconditions.test.mjsdefault, plus six malformed-error-body negative controls that must fail.node .\node_modules\oav\dist\cli.js validate-example .\specification\chaos\resource-manager\Microsoft.Chaos\Chaos\stable\2026-11-01\openapi.json --operationIds Workspaces_CreateOrUpdate,Scenarios_CreateOrUpdate,ScenarioConfigurations_CreateOrUpdate --logLevel error --logFilepath "$env:TEMP\chaos-default-examples.log"responses.defaultexamples validate against the actual default error schema; the existing narrowly scoped 200/201 completeness directives remain.node .\node_modules\oav\dist\cli.js validate-spec .\specification\chaos\resource-manager\Microsoft.Chaos\Chaos\stable\2026-11-01\openapi.json --logLevel error --logFilepath "$env:TEMP\chaos-default-spec.log"git diff --checkSHA-256 comparison against the same-toolchain baseline found 592 retained emitted files, zero mismatches, including 2025-01-01 and the May/August previews. The existing regression additionally compares earlier source/generated examples and contracts byte-for-byte to the base commit. The new regression removes only the authorized headers and example links from the November document and then deep-compares the entire document with the baseline: the complete response maps, success responses, default errors, definitions, other operations and LRO metadata remain identical. It does not delete response entries to make the comparison pass.
Current review gates and warning dispositions
PutResponseCodes/NoErrorCodeResponseslint errors; hosted re-evaluation is still required.RESPONSE_STATUS_CODE_NOT_IN_EXAMPLEdirectives remain, narrowed to November's selected PUT response leaves 200/201 only. A create-only request cannot return 200 and an update-only request cannot return 201. The examples collectively cover those statuses plus actual 412 through the default schema. Request/response schema validation is not suppressed. Both path separators are necessary because locked OAV'sendsWithPathperforms literal string suffix matching without normalization; a basename-only match would improperly broaden the version scope. These README suppressions still require owner review.responses.defaultis its supported representation for these error bodies. The emitter accepts and copies it unchanged and the final CLI passes. In an isolated fixture without README suppressions, the same validator reports only six missing impossible success outcomes; changing a default error body'serror.codeto a number additionally producesINVALID_TYPE, proving body validation is active. Actual HTTP status 412 is independently exercised by the committed LiveValidator regression with six negative controls. No dependency upgrade, CLI patch, impossible success, ignored status field or new suppression was added.EnumInsteadOfBoolean(including existing V1/common-type and V2 properties),LatestVersionOfCommonTypesMustBeUsed,PostOperationIdContainsUrlVerb,ParameterDescriptionandLocationMustHaveXmsMutabilityas existing before this PR. The normalized whole-document regression proves those response/model/operation definitions are unchanged. Changing boolean contracts, operation IDs, common-type versions, or resource mutability would alter inherited contracts outside this proposal; none were changed or waived.PostResponseCodeserrors are also promotion-owned and unchanged. The hosted cross-version report compares November against 2025-01-01 and August-preview onmain, not this PR's promotion-branch base; its broader definition/common-type evolution findings remain for promotion review, not claimed resolved here.@autorest/corepackage; no claim is made that this local lint run passed. Frozen dependencies and manifests were not upgraded to work around it.Revised-head cross-version findings: not all warnings are inherited
The completed reports for head
9b64e3e78998cd9e3c81343384da045a8e21dab3(run 40018994465, run 40018944680) contain identical findings after excluding timestamps: 12 errors, 99 warnings and 26 informational findings. They compare November against 2025-01-01 and August-preview onmain, not against Julia's November branch.Correction/clarification: the earlier inherited-warning discussion concerned the original Spectral lint report. It must not be read as saying all cross-version warnings are inherited. Three
1042 ChangedParameterOrderwarnings are attributable to this optional-header proposal and remain unresolved compatibility effects for SDK/API-owner review. Six1043 AddingOptionalParameterinformational findings are the intended optional headers, not defects to remove.1042 ChangedParameterOrderpaths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}'].put.parameters(openapi.json:2238)1042 ChangedParameterOrderpaths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}'].put.parameters(openapi.json:3326)1042 ChangedParameterOrderpaths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}'].put.parameters(openapi.json:3595)The same three parameter arrays account for six
1043informational additions (If-None-MatchandIf-Matcheach). Removing only those two additions reproduces each baseline array exactly, preserving the relative order, requiredness and values of all existing parameters. Nevertheless, the 1042 rule warns about SDK signature compatibility; it is not declared harmless or approved here. Lockedtypespec-autorest0.73.0'semitEndpointParametersemits non-body properties first and callsemitBodyParametersafterward (dist/src/openapi.js:680–710). Reordering source declarations cannot place the body ahead of those emitted headers through this mechanism. No proven safe source-only remedy was found without altering the emitter, generated arrays, intended headers or toolchain, so none was applied and no waiver was added.The remaining findings have baseline-equivalent November inputs, established by per-finding source-path/value comparison, not merely by retained-version byte parity:
1006 RemovedDefinition×1definitions: missingUserAssignedIdentitieswas already missing in Julia's baseline.1026 TypeChanged×3definitions.ResourceModelWithAllowedPropertySet.properties.identity,.sku,.planversus v5.1034 AddedRequiredProperty×8ManagedServiceIdentity.properties(type),Sku.properties(name),Plan.properties(name,publisher,product), and theirResourceModelWithAllowedPropertySet.properties.identity/sku/planuses.1017 ReferenceRedirection×4,1032 DifferentAllOf×3,1038 AddedPath×31,1040 AddedReadOnlyPropertyInResponse×3. Preview:1005 RemovedPath×6,1006 RemovedDefinition×5,1011 AddingResponseCode×2,1017 ReferenceRedirection×1,1023 TypeFormatChanged×2,1024 ConstraintIsStronger×2,1025 RequiredStatusChange×3,1026 TypeChanged×4,1029 ReadonlyPropertyChanged×4,1033 RemovedProperty×2,1034 AddedRequiredProperty×13,1036 ConstraintChanged×5,1040 AddedReadOnlyPropertyInResponse×6.These cover existing common-type identity/SKU/plan evolution; private-access route/definition removals; discover/evaluate POST 200 responses; existing V1 provisioning-state fields; scenario/template/evaluation/discovery/run-summary model evolution; and run-GET
202/Retry-Afterconstraints. Those precise source nodes equal Julia's baseline. For the threeAddedPathentries containing amended PUTs, the route keys already exist in the baseline and their route values match after removing only the authorized headers/example links. Twenty informational findings are likewise baseline-equivalent. No promotion/common-types/V1 cleanup or acceptance is implied.Verification limit: this is a source-provenance audit of the actual hosted reports, not a full baseline re-execution of the OAD cross-version validator. No exact OAD baseline replay was performed or claimed. The separate local AutoRest/Spectral lint attempt was blocked by missing
@autorest/core; that failed lint attempt is not presented as an OAD replay or proof that OAD itself cannot run. No package was upgraded or installed. The promotion owner must assess the twelve baseline-equivalent stable-comparison errors and promotion-level warnings; the API/SDK owners must assess the three newly attributable ordering warnings. No finding was waived, relabeled or silently accepted.The remaining README suppressions have not been approved by an API reviewer. Local validation is not ARM/API approval. Hosted PR checks, SDK compatibility checks and runtime acceptance remain separate; no claim is made that unavailable or unrun checks passed. The two skipped TSV checks are not reported as passes. No runtime or downstream generated-code tests were run.
Downstream provenance gate
Do not consume this unmerged fork tree. GW model generation is blocked until this PR is merged into
juliagao-microsoft-chaos-2026-11-ga-promotion. Then use the owning generator with an explicit promotion-branch parameter, a verified merged promotion-branch SHA, and API version2026-11-01. No manual.g.csedits and no fallback tomain. This PR neither authorizes merging/deploying nor closes broader service implementation work.Authoring references
Due diligence checklist
To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:
ARM resource provider contract and
REST guidelines (estimated time: 4 hours).
I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.
The human review attestation and release-plan confirmation are intentionally unchecked; this proposal does not attest to either on the service team's behalf.
Additional information
Viewing API changes
For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the
Generated ApiViewcomment added to this PR. You can use ApiView to show API versions diff.Suppressing failures
If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.
Getting help
Purpose of this PRandDue diligence checklist.write accessper aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositoriesNext Steps to Mergecomment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.and https://aka.ms/ci-fix.
queuedstate, please add a comment with contents/azp run.This should result in a new comment denoting a
PR validation pipelinehas started and the checks should be updated after few minutes.