You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update http-client-python CONTRIBUTING with end-to-end release workflow
Update the downstream testing and post-release sections to reflect the
new CI and regeneration infrastructure:
- Branded emitter CI runs automatically on unbranded PRs
- Manual regeneration workflow supports both branded/unbranded emitters
- Post-release steps for updating azure-sdk-for-python
- Generated code location in azure-sdk-for-python
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: packages/http-client-python/CONTRIBUTING.md
+43-22Lines changed: 43 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,37 +105,58 @@ Before creating a pull request:
105
105
106
106
## Downstream Testing
107
107
108
-
Due to the integration with `@azure-tools/typespec-python`, we require downstream testing to ensure compatibility.
108
+
This package (`@typespec/http-client-python`) is the **unbranded emitter**. It is wrapped by the **branded emitter** (`@azure-tools/typespec-python`), which lives in [Azure/typespec-azure](https://github.com/Azure/typespec-azure/tree/main/packages/typespec-python).
109
109
110
-
### Automatic Downstream PR Creation
110
+
### How CI Works
111
111
112
-
After your PR is created and CI passes:
112
+
When you open a PR against this package:
113
113
114
-
1.**Get the build artifact URL**:
115
-
- In your PR's CI results, click on "5 published; 1 consumed" (or similar)
2.**Branded emitter CI** also runs automatically — it builds `@azure-tools/typespec-python` from [`Azure/typespec-azure`](https://github.com/Azure/typespec-azure/tree/main/packages/typespec-python) against your PR's version of `@typespec/http-client-python` to verify compatibility.
118
116
119
-
2.**Trigger downstream testing**:
120
-
- Run [this pipeline](https://dev.azure.com/azure-sdk/internal/_build?definitionId=7257) with:
121
-
-`PULL-REQUEST-URL`: Your PR URL from step 1
122
-
-`ARTIFACTS_URL`: The artifact URL from step 1
117
+
Both must pass before your PR can be merged.
123
118
124
-
3.**Review downstream changes**:
125
-
- The pipeline will create a PR in [autorest.python](https://github.com/Azure/autorest.python)
126
-
- Follow the [autorest.python CONTRIBUTING.md](https://github.com/Azure/autorest.python/blob/main/CONTRIBUTING.md) for any additional changes needed
119
+
### Manual Regeneration Testing
127
120
128
-
4.**Merge process**:
129
-
- Ensure the downstream PR passes all tests
130
-
- Merge your original TypeSpec PR once downstream testing is complete
121
+
You can manually trigger the [TypeSpec Python Regenerate Tests](https://github.com/Azure/azure-sdk-for-python/actions/workflows/typespec-python-regenerate.yml) workflow in `azure-sdk-for-python` to regenerate tests with either emitter:
131
122
132
-
### Post-Release Updates
123
+
-**Branded** (`@azure-tools/typespec-python`): Select "branded" and optionally specify a version. If no version is given, it uses the version from [`eng/emitter-package.json`](https://github.com/Azure/azure-sdk-for-python/blob/main/eng/emitter-package.json).
124
+
-**Unbranded** (`@typespec/http-client-python`): Select "unbranded" and optionally specify a version. If no version is given, it uses the latest published version on npm.
133
125
134
-
After your changes are released:
126
+
The workflow checks out `microsoft/typespec` (at the ref you specify, defaulting to `main`), builds the regeneration infrastructure, installs the target emitter from npm, and runs the full regeneration.
135
127
136
-
1. Update the [autorest.python](https://github.com/Azure/autorest.python) repository to use the released version
137
-
2. Run `pnpm install` to update dependency mappings
138
-
3. Release the autorest emitters with your changes
128
+
### Post-Release: Updating azure-sdk-for-python
129
+
130
+
Once a new version of the branded emitter (`@azure-tools/typespec-python`) is released, follow these steps to update `azure-sdk-for-python`:
131
+
132
+
1.**Update `eng/emitter-package.json`** in [Azure/azure-sdk-for-python](https://github.com/Azure/azure-sdk-for-python):
133
+
134
+
Update the `@azure-tools/typespec-python` version to the newly released version:
This updates the `devDependencies` in `eng/emitter-package.json` to match the branded emitter's peer dependencies.
152
+
153
+
3.**Create a PR** with the updated `eng/emitter-package.json` and submit it to `azure-sdk-for-python`.
154
+
155
+
4.**Automatic regeneration**: Once the PR merges to `main`, the [TypeSpec Python Regenerate Tests](https://github.com/Azure/azure-sdk-for-python/actions/workflows/typespec-python-regenerate.yml) workflow triggers automatically (it watches for changes to `eng/emitter-package.json`). It regenerates all test code and creates a follow-up PR with the updated generated files.
156
+
157
+
5.**Generated code location**: The regenerated tests are checked in at [`eng/tools/azure-sdk-tools/emitter/generated/`](https://github.com/Azure/azure-sdk-for-python/tree/main/eng/tools/azure-sdk-tools/emitter/generated) in `azure-sdk-for-python`, split into:
158
+
-`azure/` — Tests generated with the branded emitter (Azure SDK specs)
159
+
-`unbranded/` — Tests generated with the unbranded emitter (TypeSpec HTTP specs)
0 commit comments