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
|**Package version to publish**| ✅ Yes | Must exactly match `msal/sku.py __version__`. |`1.36.0` (release), `1.36.0rc1` (preview) |
155
-
|**Publish target**| ✅ Yes | Explicit destination — no auto-routing. |`MSAL-Python` (test.pypi.org) or `pypi` (production) |
159
+
|**Package version to publish**| Yes | Must exactly match `msal/sku.py __version__`. PEP 440 format only — no `-Preview` suffix. |`1.36.0` (release), `1.36.0rc1` (RC), `1.36.0b1` (beta) |
160
+
|**Publish target**| Yes | Explicit destination — no auto-routing. |`test.pypi.org (Preview / RC)` or `pypi.org (Production)`|
161
+
162
+
> **Version format:** PyPI enforces [PEP 440](https://peps.python.org/pep-0440/). Versions with `-` (e.g. `1.36.0-Preview`) are rejected. Use `rc1`, `b1`, or `a1` suffixes instead.
163
+
164
+
> **Version must be in sync:** Before queuing, update `msal/sku.py __version__` to the target version and push the change. The Validate stage checks the value on the branch the run is sourced from, not the pipeline default branch.
156
165
157
166
---
158
167
159
168
## Step 8 — End-to-End Release Walkthrough
160
169
161
170
### Publishing a preview / release candidate to test.pypi.org
162
171
163
-
1. Set `msal/sku.py __version__ = "1.36.0rc1"`
164
-
2. Go to **Pipelines → Run pipeline**
165
-
3. Enter `packageVersion = 1.36.0rc1`, select `publishTarget = MSAL-Python`
The following requirements were identified during initial setup and testing:
207
+
208
+
- The GitHub service connection **must** be created via OAuth (Grant authorization) in the ADO UI, not via CLI or PAT. The CLI `az pipelines create` command requires webhook installation on the GitHub repo, which requires org admin rights not available to service accounts.
209
+
- The pipeline **must** be created via the ADO REST API (`/_apis/build/definitions`) or UI — not via `az pipelines create` — when using an OAuth GitHub service connection without org-level admin rights.
210
+
- The `msal/sku.py __version__` must be updated and pushed to the source branch **before** the pipeline run is queued. The Validate stage reads the file from the checked-out branch at runtime.
211
+
- The `requirements.txt` file includes `-e .` which causes pip to install `msal` from PyPI as a transitive dependency of `azure-identity`, overwriting the local editable install. The template handles this by removing the `-e .` line and reinstalling the local package last with `--no-deps`.
212
+
- The `1.35.1` version bump (hotfix) was released from `origin/release-1.35.0` and was never merged back into `dev`. Before the next release from `dev`, this should be backfilled via PR: `https://github.com/AzureAD/microsoft-authentication-library-for-python/compare/dev...release-1.35.0`
213
+
214
+
---
215
+
192
216
## Troubleshooting
193
217
194
218
| Symptom | Likely cause | Fix |
195
219
|---------|-------------|-----|
196
220
|`403` on twine upload | Token expired or wrong scope | Regenerate API token on pypi.org; update the service connection |
197
221
|`File already exists` error | Version already published; PyPI does not allow overwriting | Bump version in `msal/sku.py`|
198
-
| Pipeline not triggered by tag | ADO only picks up tags after the pipeline is saved with the `tags:` trigger | Re-save the pipeline in ADO after adding the trigger |
222
+
| Validate stage: `msal/sku.py ''` (empty version) | Python import silently failed | The template uses `grep`/`sed` to read the version — verify `msal/sku.py` contains a `__version__ = "..."` line |
223
+
| Validate stage: version mismatch |`sku.py` on the source branch doesn't match the parameter entered | Update `msal/sku.py` on the branch the run is sourced from, not just the pipeline default branch |
224
+
| Tests: collection failure across all modules | PyPI `msal` installed over the local editable install | Ensure the template installs local package last with `--no-deps`|
225
+
|`az pipelines create` fails with webhook error | GitHub service connection PAT/account lacks org admin rights | Create the pipeline via the ADO UI using a browser session with org admin GitHub access |
226
+
| Pipeline creation fails: `Value cannot be null. Parameter name: Connection`| GitHub SC ID is wrong or SC was recreated | Re-query the SC ID with `az devops service-endpoint list` and use the current ID |
227
+
| Service connection shows `Authentication: PersonalAccessToken`| SC was created via CLI with a PAT | Delete and recreate via UI using OAuth (Grant authorization) so repos are enumerable |
199
228
|`TwineAuthenticate` says endpoint not found | Service connection name mismatch | Ensure `pythonUploadServiceConnection` value exactly matches the service connection name |
0 commit comments