Update endpoint pattern regex for long TLD#9456
Conversation
2,5 was too limiting for evolving customer requirements (i.e. '.microsoft'). removing the upper bound for TLD length
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @itsjayway, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
Hi @itsjayway
|
There was a problem hiding this comment.
Pull request overview
This PR updates the endpoint pattern regex to support longer top-level domains (TLDs) by removing the upper bound restriction, and updates the Azure Footprint Monitoring Management API from version 2020-02-01-preview to 2024-09-16-preview.
Key Changes:
- Regex pattern update: Changed TLD length from
{2,5}to{2,}to support long TLDs like '.microsoft' - API version bump across all operation files from 2020-02-01-preview to 2024-09-16-preview
- Extension version bump from 1.0.0 to 1.0.1
Reviewed changes
Copilot reviewed 34 out of 93 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/footprint/setup.py |
Version bump to 1.0.1 |
src/footprint/azext_footprint/manual/version.py |
Version bump to 1.0.1 |
src/footprint/HISTORY.rst |
Added changelog entry for version 1.0.1 |
src/footprint/azext_footprint/vendored_sdks/footprint/models/_models.py |
Updated endpoint regex pattern from {2,5} to {2,} for TLD length |
| Operation files (sync/async) | Updated API version to 2024-09-16-preview across all operation modules |
| Client configuration files | Updated API version to 2024-09-16-preview |
src/footprint/azext_footprint/tests/latest/recordings/test_footprint.yaml |
Updated test recordings with new API version |
azdev_env/* |
Virtual environment files that should not be committed |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
Hey @necusjz, thanks for your review. Could you provide guidance in resolving the errors preventing merge?
|
7ad232b to
6ed3d3b
Compare
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
| 'name': {'readonly': True}, | ||
| 'type': {'readonly': True}, | ||
| 'endpoint_id': {'readonly': True, 'max_length': 32, 'min_length': 32, 'pattern': r'[a-f0-9]{32}'}, | ||
| 'endpoint': {'required': True, 'max_length': 1024, 'min_length': 0, 'pattern': r'^[a-z0-9\*]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?$'}, |
There was a problem hiding this comment.
The change is applied in SDK, but not in CLI extension?
There was a problem hiding this comment.
Thanks for your review @jsntcy. This change needs to be done in both places. Our requests go to RPaaS whose specification can be found here https://github.com/Azure/azure-rest-api-specs-pr/blob/RPSaaSMaster/specification/footprintmonitoring/resource-manager/Microsoft.FootprintMonitoring/preview/2024-09-16-preview/footprintProfiles.json#L1375C11-L1375C87
Is there an additional path that I'm missing?
|
[Release] Update index.json for extension [ footprint-1.0.1b1 ] : https://dev.azure.com/msazure/One/_build/results?buildId=146641489&view=results |
* Update endpoint pattern regex for long TLD 2,5 was too limiting for evolving customer requirements (i.e. '.microsoft'). removing the upper bound for TLD length * change api-version to 2024-09-16-preview from 2024-09-16-preview * updated test * updates as per PR guidance * remove venv * match version witth setup.py and sort history.rst by latest first * change release description
2,5 was too limiting for evolving customer requirements (i.e. '.microsoft'). removing the upper bound for TLD length
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.