[AutoPR azure-resourcemanager-chaos]-generated-from-SDK Generation - Java-6292130#49171
[AutoPR azure-resourcemanager-chaos]-generated-from-SDK Generation - Java-6292130#49171azure-sdk wants to merge 5 commits into
Conversation
…/Chaos/tspconfig.yaml', API Version: 2026-05-01-preview, SDK Release Type: beta, and CommitSHA: 'fba0ddc48535c777a154e285a0708f27c188f081' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6292130 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Run tsp-client update and codesnippet:update-codesnippet to regenerate the Java SDK code for the chaos service to match the latest TypeSpec definition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerated from spec commit 01b99ba99f (fix-chaos-versions-enum-ordering branch) which fixes: - Versions enum ordering so 2026-05-01-preview is the latest api-version - KeyValuePair doc comment from 'map' to 'key-value pair' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| /* | ||
| * The Location property. | ||
| */ | ||
| private final String location; | ||
|
|
||
| /* | ||
| * The Retry-After property. | ||
| */ | ||
| private final Integer retryAfter; |
| /* | ||
| * The Location property. | ||
| */ | ||
| private final String location; | ||
|
|
||
| /* | ||
| * The Retry-After property. | ||
| */ | ||
| private final Integer retryAfter; |
| /* | ||
| * The Location property. | ||
| */ | ||
| private final String location; | ||
|
|
||
| /* | ||
| * The Retry-After property. | ||
| */ | ||
| private final Integer retryAfter; |
There was a problem hiding this comment.
This likely just a response of GET of scenario runs. Why it also have location and retry-after?
|
Hey, thank you for your thorough review on our SDK PR [AutoPR azure-resourcemanager-chaos]-generated-from-SDK Generation - Java-6292130 by azure-sdk · Pu…! I think the core issue our team is facing is that we were told that an operation endpoint can be used in lieu of the OperationResults endpoint to fulfill the polymorphic nature of these endpoints (202 + no body while non-terminal, 200 + exact resource response body when terminal). azure-resource-manager-rpc/v1.0/async-api-reference.md at master · Azure/azure-resource-manager-rpc. "If the operation is complete, return the exact same response that would have been returned had the operation been executed synchronously." Our GET scenarioRun effectively services as the OperationResults endpoint for this resource but with the exact same response caveat defined by the RPC. This was discussed in our azure-rest-api-specs PR Azure/azure-rest-api-specs#41486 (comment) "Although not following the common pattern in ARM RPC, this serves as the operation result endpoint. Most RPs don't include such endpoints in public API documentation. I can approve with exception; but will leave it to your whether you want to include this new one or not in this PR (my understanding is that you already have similar endpoints documented publicaly, so you may want to be consistent)." We had a few other scenarios where we chose to remove the endpoint entirely, but for this resource we opted to keep it as we deemed it would be leveraged by customers in the SDK and it is a standard pattern we are support in prview. If there is a supported way to manage this pattern, then we can make the swap, but as far as I know that doesn't exist. Hence, we needed the custom operation. |
|
The most critical part is not on the GET. It is on the LRO that uses the GET. All the comments are not on how your REST API structure (whether it polls via URL to All comments are on how you write TypeSpec.
|
Got it, that makes sense. Thank you for the clarification! Ill work on this then. |
Addresses PR review feedback on #49171: After updating the TypeSpec source to use @useFinalStateVia instead of @extension (and removing @pollingOperation from execute/cancel), the SDK generator now correctly detects these as LRO operations: - ScenarioConfigurations.execute is now beginExecute / beginExecuteAsync returning SyncPoller<PollResult<ScenarioRunInner>, ScenarioRunInner>. - ScenarioRuns.cancel is now beginCancel / beginCancelAsync returning SyncPoller<PollResult<ScenarioRunInner>, ScenarioRunInner>. - ScenarioRuns.get now uses the standard ArmResourceRead template and returns Response<ScenarioRunInner> without the synthetic ...Headers class. ScenarioRunsGetHeaders, ScenarioRunsCancelHeaders, and ScenarioConfigurationsExecuteHeaders (and Response counterparts) are removed. Mock tests that asserted plain non-LRO behaviour for these operations are removed. The remaining ...Inner / Impl / Sample / model changes are routine fallout from regeneration with the corrected TypeSpec. Verified: mvn compile and mvn test-compile both BUILD SUCCESS. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… polling The Location-header polling pattern (final-state-via: location) requires the polling endpoint to return 202 while the operation is in progress and 200 when it completes. The previous simplification of GET to return only 200 would have caused the LRO client to terminate polling on the first poll attempt regardless of ScenarioRunProperties.status (status is only used by the status-monitor pattern, not Location-header polling). This regenerates the SDK from the updated TypeSpec where GET returns both ArmResponse<ScenarioRun> (200) and a 202 in-progress response with Location/Retry-After headers and the current ScenarioRun body. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
SDK LTGM. We need a final regen after specs PR merge. |
Configurations: 'specification/chaos/resource-manager/Microsoft.Chaos/Chaos/tspconfig.yaml', API Version: 2026-05-01-preview, SDK Release Type: beta, and CommitSHA: 'fba0ddc48535c777a154e285a0708f27c188f081' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6292130 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. Release plan link: https://apps.powerapps.com/apps/821ab569-ae60-420d-8264-d7b5d5ef734c?release-plan-id=c532e936-dc4e-f111-bec7-000d3a5a7aa2 Submitted by: renzopretto@microsoft.com
Release Plan Details
Spec pull request: Fix Versions enum ordering to retain stable 2025-01-01 in KnownVersions azure-rest-api-specs#43085
Spec API version: