Skip to content

Update ARM samples to common-types v6 - #5787

Open
Yuchao Yan (msyyc) wants to merge 2 commits into
mainfrom
prepare-arm-samples-common-types-v6
Open

Yuchao Yan (msyyc) wants to merge 2 commits into
mainfrom
prepare-arm-samples-common-types-v6

Conversation

@msyyc

@msyyc Yuchao Yan (msyyc) commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Extract the ARM sample/common-types updates requested in the review of #5271 into a separate prerequisite PR. This PR changes no production linter policy, registration or enablement.

  • Update current ARM samples to common-types v6 and carry their corresponding emitted OpenAPI snapshots together.
  • Add the seven v6 JSON fixtures required by the samples' local references. They are byte-identical to packages/samples/common-types/existing/v6, whose provenance is Azure/azure-rest-api-specs.
  • Extend the existing common-types synchronization script to write every supported version (v3-v6) to both the canonical baseline and the ARM sample fixture location, without a v6-specific branch.
  • Complete the older sample fixture sets with the four missing v3/v4 files from their canonical baselines. Existing v3-v5 sample fixture contents and legacy sample version selections remain unchanged.
  • Remove the redundant references.test.ts file. The existing synchronization CI job checks fixture freshness; recursive local-reference and JSON-pointer validation was executed as a one-time acceptance check, not retained as continuous test coverage.

Legacy and version-compatibility samples retain their existing versions. Suppressions needed specifically by #5271's proposed latest-version warning remain in that rule PR, not here. Once this prerequisite lands, #5271 can incorporate main and drop the duplicated sample delta; no merge is performed by this workflow.

Local validation after review

Validated in an isolated worktree based on b12756724b5efd54875f0ecbc0cb3892e913c53f, with the unchanged compiler pin 50240c7db77895b261ab2a511f7f79e5650db59b.

  • mise exec -- pnpm -r --filter '@azure-tools/typespec-samples...' build: passed.
  • mise exec -- pnpm exec vitest run --config vitest.config.fast.ts --project azure-samples packages/samples/test/samples.test.ts --testNamePattern 'Azure Resource Manager' --pool=threads --maxWorkers=1 --reporter=dot: 32 passed, 8 unrelated data-plane cases excluded by the selector. The canonical snapshot suite checks compilation diagnostics as well as emitted output.
  • One-time controlled execution of the actual eng/scripts/sync-common-types.ts, with downloads supplied from the pinned canonical fixtures and unexpected network requests rejected: all four versions written to both destinations; all 22 fixture pairs byte-identical, including the four previously absent v3/v4 sample files.
  • One-time recursive validation of the ARM OpenAPI snapshots and transitively referenced common types: 44 documents and 2,623 local references, including JSON pointer targets, passed. This receipt does not provide ongoing reference-validation coverage.
  • mise exec -- pnpm check:eng, root mise exec -- pnpm format, root mise exec -- pnpm lint, and git diff --check: passed.
  • mise exec -- pnpm exec chronus verify --since b12756724b5efd54875f0ecbc0cb3892e913c53f: passed; no public-package release note is needed for these engineering/private-sample changes.

Fresh-worktree dependency restoration populated the required Node tooling but its unrelated Python-emitter prepare hook failed with a TLS handshake failure downloading Python package metadata. The sample dependency closure and the existing engineering bundle-uploader dependency were built separately; all validation commands listed above passed. No dependency manifests, lockfile, compiler pointer, timeout limits or verification checks were changed.

These are local validation results, not a claim that CI on the review-fix commit has passed.

Synchronize the v6 sample fixtures with their canonical source and validate local snapshot references.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

📦 Package size report

1 package changed size, +21.03 KB (+0.1%) packed overall.

Package Packed (base → head) Δ Packed Unpacked (base → head) Δ Unpacked
@azure-tools/typespec-ts 531.60 KB → 550.66 KB +19.05 KB (+3.6%) 🔴 2.67 MB → 2.75 MB +84.13 KB (+3.1%) 🔴
13 package(s) with no notable change
Package Packed (base → head) Δ Packed Unpacked (base → head) Δ Unpacked
@azure-tools/typespec-java 20.22 MB → 20.22 MB +2.01 KB (+0.0%) 22.51 MB → 22.52 MB +3.53 KB (+0.0%)
@azure-tools/typespec-metadata 15.91 KB → 15.88 KB -23 B (-0.1%) 62.26 KB → 62.08 KB -181 B (-0.3%)
@azure-tools/typespec-azure-examples 80.17 KB → 80.15 KB -14 B (-0.0%) 383.36 KB → 383.36 KB —
@azure-tools/azure-http-specs 143.53 KB → 143.53 KB — 1.20 MB → 1.20 MB —
@azure-tools/typespec-autorest 87.87 KB → 87.87 KB — 424.17 KB → 424.17 KB —
@azure-tools/typespec-autorest-canonical 7.42 KB → 7.42 KB — 26.00 KB → 26.00 KB —
@azure-tools/typespec-azure-core 136.55 KB → 136.55 KB — 733.30 KB → 733.30 KB —
@azure-tools/typespec-azure-portal-core 36.26 KB → 36.26 KB — 242.62 KB → 242.62 KB —
@azure-tools/typespec-azure-resource-manager 192.89 KB → 192.89 KB — 1.15 MB → 1.15 MB —
@azure-tools/typespec-azure-rulesets 6.00 KB → 6.00 KB — 35.20 KB → 35.20 KB —
@azure-tools/typespec-client-generator-core 248.86 KB → 248.86 KB — 1.32 MB → 1.32 MB —
@azure-tools/typespec-go 264.28 KB → 264.28 KB — 1.35 MB → 1.35 MB —
@azure-tools/typespec-python 42.58 KB → 42.58 KB — 166.02 KB → 166.02 KB —

Packed = gzipped .tgz published to npm. Unpacked = total extracted size. 🆕 added, 🗑️ removed. Packages from the core/ submodule are not included.
🔴 grew · 🟢 shrank — only changes of at least 512 B and 0.5% are marked.

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

Comment thread eng/scripts/sync-common-types.ts Outdated
Comment thread packages/samples/test/references.test.ts Outdated
Write all supported common-types versions to both fixture locations, fill missing v3/v4 fixtures, and remove the redundant reference test file. Retain recursive reference validation as recorded one-time acceptance evidence.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants