Skip to content

Commit f6e42f0

Browse files
xirzecCopilotJialinHuang803
authored
Fix stale typespec-ts modular-unit snapshot after ARM doc changes (Azure#4795) (Azure#4796)
## Why PR Azure#4494 ("Improve documentation for ARM library decorators, interfaces, and models") added `@doc("")` to the ARM `ArmResourceActionAsync` operation template, so those operations no longer emit a public doc comment. Because Azure#4494 did not touch `packages/typespec-ts/**`, `ci-typescript.yml` never ran on it, and the stale `modular-unit` scenario snapshot landed on `main` unnoticed. This made the **typespec-ts / CI -> Run unit tests** job red on `main` and on every typespec-ts PR (including Azure#4788). ## What changed - Updated the `bodyOptionalParameterName.md` modular-unit scenario to drop the now-empty ARM operation doc comment (`/** A long-running resource action. */`) and the corresponding sample summary text, matching what the current ARM library emits. - Added an `internal` chronus changeset for `@azure-tools/typespec-ts`. ## Notes for reviewers - The drift was narrower than the issue implied. Only `bodyOptionalParameterName.md` actually failed: its `backup` op uses `ArmResourceActionAsync` (which got `@doc("")`). `lroPaging.md` still passes because its `suspend` op uses `ArmResourceActionAsyncBase`, which Azure#4494 left with a public doc, so it correctly still emits `A long-running resource action.` - I did not commit the full `SCENARIOS_UPDATE=true` output. Write mode reformats every scenario through prettier and produced 46 changed files (+1039/-763), but 44 of those were pure formatting noise: the runner's assertion is whitespace-normalized (`ignoreWeirdLine`), so those never actually failed. I discarded the noise and hand-applied only the 3 genuine doc removals to keep the diff minimal and reviewable. ## Verification - `pnpm unit-test` -> 657 passed - `pnpm test-next` -> 252 passed - `pnpm chronus verify` -> clean - prettier `--check` on changed files -> clean ## Follow-up (out of scope) ARM library (`typespec-azure-resource-manager`) changes can alter typespec-ts emitted output but do not trigger `ci-typescript.yml`, so this drift class can recur. Consider widening the workflow `paths` triggers to include the emitter's TypeSpec library dependencies. Tracked separately. Fixes: Azure#4795 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: JialinHuang803 <139532647+JialinHuang803@users.noreply.github.com>
1 parent cd9c422 commit f6e42f0

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@azure-tools/typespec-ts"
5+
---
6+
7+
Regenerate stale `modular-unit` scenario snapshot to match the ARM library doc changes from #4494, which moved the `ArmResourceActionAsync` operation doc to `@dev` (`@doc("")`) so those operations no longer emit a public doc comment.

packages/typespec-ts/test/modular-unit/scenarios/samples/parameters/bodyOptionalParameterName.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export async function _backupDeserialize(result: PathUncheckedResponse): Promise
190190

191191
return backupResultDeserializer(result.body);
192192
}
193-
/** A long-running resource action. */
193+
194194
export function backup(
195195
context: Client,
196196
resourceGroupName: string,
@@ -217,9 +217,9 @@ import { HardwareSecurityModulesClient } from "@azure/internal-test";
217217
import { DefaultAzureCredential } from "@azure/identity";
218218

219219
/**
220-
* This sample demonstrates how to a long-running resource action.
220+
* This sample demonstrates how to
221221
*
222-
* @summary a long-running resource action.
222+
* @summary
223223
* x-ms-original-file: 2021-10-01-preview/json_for_CloudHsmClusters_backup.json
224224
*/
225225
async function cloudHsmClustersBackup(): Promise<void> {

0 commit comments

Comments
 (0)