Skip to content

Commit a7e5010

Browse files
authored
Merge branch 'main' into promote-consistent-response-schema-for-put-to-arm
2 parents b645f78 + 1cda440 commit a7e5010

51 files changed

Lines changed: 4350 additions & 4685 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
3+
changeKind: fix
4+
packages:
5+
- "@azure-tools/typespec-java"
6+
---
7+
8+
Remove dependencies on deprecated autorest packages

‎.github/skills/typespec-python-release/SKILL.md‎

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@ Prepare a release PR for `@azure-tools/typespec-python` from the repository root
1010
## Requirements
1111

1212
- Run every command from the repository root.
13-
- Use the current date in `YYYY-MM-DD` format for the branch name.
1413
- Release only `@azure-tools/typespec-python`.
15-
- Do not overwrite an existing branch.
14+
- Use the task branch supplied by the environment when available. Do not require a particular branch name or ask the user to choose one.
15+
- Do not delete or overwrite an existing branch.
16+
- Use any available authenticated integration to publish the branch and create the pull request; do not assume GitHub CLI is installed or authenticated.
1617

1718
## Workflow
1819

19-
### 1. Clean the Repository and Create the Branch
20+
### 1. Prepare the Repository and Task Branch
2021

21-
1. Clean the repository and update `main` with this exact sequence:
22+
1. If the environment has already supplied a task branch (for example, a cloud agent branch), work on that branch and skip the cleanup and checkout sequence below. Preserve existing task changes.
23+
2. Otherwise, clean the repository and update `main` with this exact sequence:
2224

2325
```bash
2426
git reset HEAD && git checkout . && git clean -fd && git checkout origin/main && git pull origin main
2527
```
2628

2729
This intentionally discards all uncommitted tracked and untracked files. Run it only when the user has asked to start the release workflow.
2830

29-
2. Create the publish branch from the clean, updated `origin/main` checkout using the current date:
31+
3. If no task branch was supplied, create a new branch from the clean, updated `origin/main` checkout. Choose an unused branch name without asking the user; do not delete or overwrite existing local or remote branches.
32+
4. Record the actual task branch name for publishing and PR verification:
3033

3134
```bash
32-
release_date=$(date +%F)
33-
git switch -c "publish/python-${release_date}"
35+
release_branch=$(git branch --show-current)
3436
```
3537

36-
If the branch already exists locally or remotely, stop and ask the user whether to reuse it or choose another date. Do not delete or overwrite it.
37-
3838
### 2. Update `@typespec/http-client-python`
3939

4040
1. Read the latest published version from npm:
@@ -60,7 +60,7 @@ Prepare a release PR for `@azure-tools/typespec-python` from the repository root
6060
pnpm chronus version --only @azure-tools/typespec-python
6161
```
6262

63-
3. Read the package version again. If Chronus changed it, use the generated changelog entry and do not add another one.
63+
3. Check Chronus's exit status and inspect its changes before reading the package version again. If it fails, report the error and investigate any partial changes; do not treat a partial version bump as a successful release. If it left the package and changelog unchanged, continue with the manual fallback below. If Chronus succeeds and changed the version, use the generated changelog entry and do not add another one.
6464
4. If Chronus did not change it:
6565
- Increment only the patch component in `packages/typespec-python/package.json`, from `a.b.c` to `a.b.(c+1)`.
6666
- Add this entry immediately below `# Release` in `packages/typespec-python/CHANGELOG.md`. The heading is the new `@azure-tools/typespec-python` package version; the bullet uses `$latest_http_client_python`. These versions are independent and are usually different:
@@ -73,51 +73,67 @@ Prepare a release PR for `@azure-tools/typespec-python` from the repository root
7373

7474
5. If the manual fallback was used, confirm the final package version is exactly one patch version above the recorded version. Otherwise, confirm Chronus versioned only `@azure-tools/typespec-python`.
7575

76-
### 4. Update and Validate the Lockfile
76+
### 4. Update Documentation and Validate the Lockfile
7777

7878
1. Update dependencies and `pnpm-lock.yaml`:
7979

8080
```bash
8181
pnpm install
8282
```
8383

84-
2. Inspect `git diff --check`, `git diff --stat`, and `git status --short`.
85-
3. Verify the release includes only expected files:
84+
2. After installation, build the Python emitter and its workspace dependencies, then regenerate documentation only for `packages/typespec-python`. The dependency build is required in fresh worktrees, where the documentation script's package-only build otherwise fails with missing workspace module declarations. Run these commands from the repository root; `--dir` runs the documentation script in the Python package:
85+
86+
```bash
87+
pnpm -r --filter "@azure-tools/typespec-python..." build
88+
pnpm --dir packages/typespec-python run regen-docs
89+
```
90+
91+
3. After versioning and documentation generation, add an `internal` change description for only the Python emitter:
92+
93+
```bash
94+
pnpm change add @azure-tools/typespec-python --kind internal --message "Release @azure-tools/typespec-python <version> with @typespec/http-client-python <latest-http-client-python-version>."
95+
```
96+
97+
Replace the placeholders with the final package version and dependency version. Inspect `.chronus/changes/` to verify that the command actually created a valid change file; an exit status of zero is not sufficient. Chronus can print `No package changed. Exiting.` and create no file when the release edits are still uncommitted. If the command fails or creates no valid file, report the outcome and manually create a uniquely named `.md` file under `.chronus/changes/` if needed, using this format:
98+
99+
```markdown
100+
---
101+
changeKind: internal
102+
packages:
103+
- "@azure-tools/typespec-python"
104+
---
105+
106+
Release @azure-tools/typespec-python <version> with @typespec/http-client-python <latest-http-client-python-version>.
107+
```
108+
109+
Verify the file has `changeKind: internal` and lists only `@azure-tools/typespec-python`. Do not rerun Chronus versioning after adding it; the file must remain in the release PR.
110+
111+
4. Inspect `git diff --check`, `git diff --stat`, and `git status --short`.
112+
5. Verify the release includes only expected files:
86113
- `pnpm-workspace.yaml`, when its dependency range changed
87114
- `pnpm-lock.yaml`
88115
- `packages/typespec-python/package.json`
89116
- `packages/typespec-python/CHANGELOG.md`
117+
- `packages/typespec-python/README.md`
118+
- `website/src/content/docs/docs/emitters/clients/typespec-python/reference/emitter.md`
90119
- TypeSpec Python change files consumed by Chronus, if any
120+
- The new `internal` TypeSpec Python change file under `.chronus/changes/`
91121

92122
Stop and investigate before committing if other packages were versioned or unrelated files changed.
93123

94124
### 5. Commit and Create the Pull Request
95125

96126
1. Read the final version from `packages/typespec-python/package.json` and use it as `<version>` below.
97-
2. Stage and commit all changes:
127+
2. Stage and commit the validated release changes, including the new `internal` change file:
98128

99129
```bash
100130
git add -A
101131
git commit -m "[python] release <version>"
102132
```
103133

104-
3. Push the new branch:
105-
106-
```bash
107-
git push --set-upstream origin "publish/python-${release_date}"
108-
```
109-
110-
4. Create a pull request targeting `main` from `publish/python-${release_date}` with this exact title and an empty body:
111-
112-
```bash
113-
gh pr create --repo Azure/typespec-azure --base main --head "publish/python-${release_date}" --title "[python] release <version>" --body ""
114-
```
115-
116-
5. Verify the created pull request has the expected title and an empty body:
117-
118-
```bash
119-
gh pr view "publish/python-${release_date}" --repo Azure/typespec-azure --json title,body,url
120-
```
134+
3. Publish the actual task branch using an available authenticated mechanism, such as Git, an MCP integration, or the cloud agent's publishing workflow. Use a personal fork when required by repository permissions. Do not assume the remote is named `origin` or the branch follows a particular naming convention.
135+
4. Create a pull request against `Azure/typespec-azure`, targeting `main` from the published task branch, with the exact title `[python] release <version>` and an empty body. Choose an available authenticated tool or integration; GitHub CLI is optional. If publishing or PR creation is unavailable, stop and report the blocker so the user can finish.
136+
5. Verify the created pull request's repository, base and head branches, exact title, empty body, and inclusion of the new `internal` change file using the available integration.
121137

122138
### 6. Review and Improve the Process
123139

‎.github/workflows/agentics-maintenance.yml‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
discussions: write
9595
steps:
9696
- name: Setup Scripts
97-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
97+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
9898
with:
9999
destination: ${{ runner.temp }}/gh-aw/actions
100100

@@ -113,7 +113,7 @@ jobs:
113113
issues: write
114114
steps:
115115
- name: Setup Scripts
116-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
116+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
117117
with:
118118
destination: ${{ runner.temp }}/gh-aw/actions
119119

@@ -132,7 +132,7 @@ jobs:
132132
pull-requests: write
133133
steps:
134134
- name: Setup Scripts
135-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
135+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
136136
with:
137137
destination: ${{ runner.temp }}/gh-aw/actions
138138

@@ -152,7 +152,7 @@ jobs:
152152
actions: write
153153
steps:
154154
- name: Setup Scripts
155-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
155+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
156156
with:
157157
destination: ${{ runner.temp }}/gh-aw/actions
158158

@@ -181,7 +181,7 @@ jobs:
181181
persist-credentials: false
182182

183183
- name: Setup Scripts
184-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
184+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
185185
with:
186186
destination: ${{ runner.temp }}/gh-aw/actions
187187

@@ -196,7 +196,7 @@ jobs:
196196
await main();
197197
198198
- name: Install gh-aw
199-
uses: github/gh-aw-actions/setup-cli@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
199+
uses: github/gh-aw-actions/setup-cli@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
200200
with:
201201
version: v0.86.2
202202

@@ -228,7 +228,7 @@ jobs:
228228
pull-requests: write
229229
steps:
230230
- name: Setup Scripts
231-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
231+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
232232
with:
233233
destination: ${{ runner.temp }}/gh-aw/actions
234234

@@ -275,7 +275,7 @@ jobs:
275275
persist-credentials: false
276276

277277
- name: Setup Scripts
278-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
278+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
279279
with:
280280
destination: ${{ runner.temp }}/gh-aw/actions
281281

@@ -321,7 +321,7 @@ jobs:
321321
persist-credentials: false
322322

323323
- name: Setup Scripts
324-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
324+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
325325
with:
326326
destination: ${{ runner.temp }}/gh-aw/actions
327327

@@ -336,7 +336,7 @@ jobs:
336336
await main();
337337
338338
- name: Install gh-aw
339-
uses: github/gh-aw-actions/setup-cli@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
339+
uses: github/gh-aw-actions/setup-cli@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
340340
with:
341341
version: v0.86.2
342342

@@ -367,7 +367,7 @@ jobs:
367367
persist-credentials: false
368368

369369
- name: Setup Scripts
370-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
370+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
371371
with:
372372
destination: ${{ runner.temp }}/gh-aw/actions
373373

@@ -382,7 +382,7 @@ jobs:
382382
await main();
383383
384384
- name: Install gh-aw
385-
uses: github/gh-aw-actions/setup-cli@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
385+
uses: github/gh-aw-actions/setup-cli@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
386386
with:
387387
version: v0.86.2
388388

@@ -472,7 +472,7 @@ jobs:
472472
persist-credentials: false
473473

474474
- name: Setup Scripts
475-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
475+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
476476
with:
477477
destination: ${{ runner.temp }}/gh-aw/actions
478478

@@ -487,7 +487,7 @@ jobs:
487487
await main();
488488
489489
- name: Install gh-aw
490-
uses: github/gh-aw-actions/setup-cli@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
490+
uses: github/gh-aw-actions/setup-cli@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
491491
with:
492492
version: v0.86.2
493493

@@ -564,7 +564,7 @@ jobs:
564564
issues: write
565565
steps:
566566
- name: Setup Scripts
567-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
567+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
568568
with:
569569
destination: ${{ runner.temp }}/gh-aw/actions
570570

@@ -601,7 +601,7 @@ jobs:
601601
persist-credentials: false
602602

603603
- name: Setup Scripts
604-
uses: github/gh-aw-actions/setup@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
604+
uses: github/gh-aw-actions/setup@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
605605
with:
606606
destination: ${{ runner.temp }}/gh-aw/actions
607607

@@ -616,7 +616,7 @@ jobs:
616616
await main();
617617
618618
- name: Install gh-aw
619-
uses: github/gh-aw-actions/setup-cli@a65c3ae1e11016c37f426bb3847a6f5e1a7d58df # v0.90.0
619+
uses: github/gh-aw-actions/setup-cli@a63fe074b43ff5f66bcf1af0dc77f7bfc85b9d93 # v0.91.4
620620
with:
621621
version: v0.86.2
622622

‎.github/workflows/copilot-setup-steps.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
- name: Checkout repository
1414
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1515
- name: Install gh-aw extension
16-
uses: github/gh-aw/actions/setup-cli@c35393777e5604a63721d09512263b1383301d4f # v0.89.21
16+
uses: github/gh-aw/actions/setup-cli@382f4b025fefaa7d6b2492c3608f098340bf6536 # v0.91.3
1717
with:
1818
version: v0.50.1

‎.github/workflows/nightly-e2e.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292

9393
- name: Setup language runtime
9494
if: matrix.mise-install-args
95-
uses: jdx/mise-action@9149ea85001c7435d5a66bb127d6a1b6227cb0a5 # v5.0.0
95+
uses: jdx/mise-action@2d8d4cafcbd33be2ea37d2b6f5ad595363d1f1ca # v5.1.1
9696
with:
9797
install_args: ${{ matrix.mise-install-args }}
9898

‎core‎

Submodule core updated 354 files

‎eng/scripts/doc-updater/knowledge/azure-resource-manager.md‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,20 +156,28 @@ The former multi-purpose `arm-resource-operation` checks are represented by thre
156156

157157
Concrete ARM resource identities are seeded only by registered read or createOrUpdate operations with valid ARM resource instance paths. List, action, update, delete, and check-existence operations can attach to an existing resolved resource but do not create resource identities by themselves.
158158

159+
Identity paths are matched case-insensitively for literal segments and by position for variable segments. A createOrUpdate operation can establish a resource without a read operation; list-only and action-only operation sets cannot.
160+
159161
## ARM Request and Response Rules
160162

161163
- `no-query-in-collection` allows only `api-version` and case-sensitive `$filter` on collection GET operations.
162-
- `no-query-in-point-op` allows only `api-version` on point GET, PUT, PATCH, and DELETE operations.
164+
- `no-query-in-point-op` allows only `api-version` (case-insensitively) on GET, PUT, PATCH, and DELETE resource-instance paths.
163165
- `no-query-in-post` allows only `api-version` on POST operations; other inputs belong in the request body.
164-
- `list-operation-missing-pageable` requires collection GET operations to use TypeSpec paging metadata with a continuation link.
166+
- `list-operation-missing-pageable` requires collection GET operations to use TypeSpec paging metadata with a continuation link. Standard ARM list operation templates supply this metadata.
165167
- `list-response-envelope` requires collection GET response models to contain exactly `value` and `nextLink`.
166168
- `use-application-json-content-type` requires `application/json` request and response bodies in ARM provider namespaces.
167169
- `use-model-request-body` requires non-multipart request bodies to use plain models without indexers.
168170
- `no-tenant-level-apis` reports ARM PUT routes beginning with `/providers`, except the `/operations` endpoint.
169171
- `lro-response-mismatch` validates that PUT and PATCH final results match the resource type, DELETE final results are `void`, and POST final results match successful response bodies.
170172

173+
When these rules are added or promoted, update both the generated linter reference and the manually maintained rule evaluation and RPC coverage guides.
174+
171175
The `lro-response-mismatch` implementation has a detailed adjacent Markdown file but no `docs` association in its TypeScript rule definition. Consequently, `pnpm regen-docs` generates only its short description. Fixing the association requires an edit under `packages/typespec-azure-resource-manager/src/rules/`.
172176

173-
## Relationship Documentation Feedback
177+
## Feature Files
178+
179+
The internal `getFeatureFileSet` accessor returns the enum configured by `@featureFiles`, or `undefined` when the decorator is absent. The `arm-feature-file-usage-discourage` rule tests for `undefined`; an empty or otherwise falsey-looking enum state still represents configured feature files.
180+
181+
## Documentation Feedback
174182

175-
Use the defaults from `...ResourceNameParameter<RelationshipModel>` unless the API truly requires custom key, segment, or pattern values. Link to canonical samples through the published samples site (`https://azure.github.io/typespec-azure/docs/samples/...`) rather than the repository source tree.
183+
Use rendered documentation URLs for canonical sample links and link to canonical samples through the published samples site (`https://azure.github.io/typespec-azure/docs/samples/...`) rather than the repository source tree. In examples, omit every template argument that is equal to its declared default, including inferred `ResourceNameParameter` key, segment, and name-pattern values.

0 commit comments

Comments
 (0)