Skip to content

Commit 962f930

Browse files
authored
Clean up broken links to repair aggregate report pipeline (Azure#29289)
1 parent 48f8205 commit 962f930

File tree

8 files changed

+49
-42
lines changed

8 files changed

+49
-42
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Mypy install and run.
107107
```
108108

109109
#### `sphinx` environment
110-
Generate shpinx doc for this package.
110+
Generate sphinx doc for this package.
111111

112112
```
113113
\> tox -e sphinx -c <path to tox.ini>
@@ -117,7 +117,7 @@ Generate shpinx doc for this package.
117117

118118
`tox` supports custom arguments, and the defined pytest environments within the common `tox.ini` also allow these. Essentially, separate the arguments you want passed to `pytest` by a `--` in your tox invocation.
119119

120-
[Tox Documentation on Positional Arguments](https://tox.readthedocs.io/en/latest/example/general.html#interactively-passing-positional-arguments)
120+
[Tox Documentation on Positional Arguments](https://tox.wiki/en/latest/config.html#substitutions-for-positional-arguments-in-commands)
121121

122122
**Example: Invoke tox, breaking into the debugger on failure**
123123
`tox -e whl -c ../../../eng/tox/tox.ini -- --pdb`

doc/dev/mgmt/multiapi.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Multi-api packaging and ARM SDK
22

3-
Several SDKs on this repository are able to support multi-api in a single package. If you're a SDK maintener, this documentation explains the rational of it, and the technical details.
3+
Several SDKs on this repository are able to support multi-api in a single package. If you're a SDK maintainer, this documentation explains the rational of it, and the technical details.
44

55
## Overview and rationale
66

@@ -10,7 +10,7 @@ It means a given specific package is able to do calls to several different API v
1010

1111
### Why would I need to call anything else than the latest API version?
1212

13-
Because there is different flavors of Azure that are not necessarly provided with the same set of API versions. For example Azure Governement, Azure Stack usually needs a few months to get the latest available API version.
13+
Because there is different flavors of Azure that are not necessarily provided with the same set of API versions. For example Azure Government, Azure Stack usually needs a few months to get the latest available API version.
1414

1515
### Why a multi-api package?
1616

@@ -66,9 +66,9 @@ Main design guidelines:
6666
- For people that want a specific API version for a specific need, specifying API version should be possible
6767
e.g. `client = ComputeManagementClient(credentials, sub_id, api_version='2018-06-01')`
6868
- For people who target a single Azure Profile, specifying it should be be possible
69-
e.g. `client = ComputeManagementClient(credentials, sub_id, profile=KnownProfile.v2018_06_01_bybrid)`
69+
e.g. `client = ComputeManagementClient(credentials, sub_id, profile=KnownProfile.v2018_06_01_hybrid)`
7070

71-
The first condition has impact on models loading, by default they should load the latest API vesion transparently:
71+
The first condition has impact on models loading, by default they should load the latest API version transparently:
7272
```python
7373
# Loads the latest version of the model
7474
from azure.mgmt.compute.models import VirtualMachineCreateParameter
@@ -118,5 +118,3 @@ If this is not the same API version, then we need to bend the rules a little: we
118118
## Possible improvements
119119

120120
Current implementation assumes operation group are unique, and as discussed it's not always the case. Also, this limitation has impact on intellisense right now. Example, if a user types `compute_client.virtual_machines.` and hit the intellisense shortcut, users won't see any suggestions. It's because the `virtual_machines` property is dynamic and can change depending of dynamic configuration.
121-
122-
To improve intellisense and allow operation level profile, the concept would be to make the [operation mixin multi-api concept](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py) applicable to operation groups as well. I estimate this work to a week of dev-ish.

doc/dev/test_proxy_troubleshooting.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@ Documentation of the motivations and goals of the test proxy can be found [here]
88
GitHub repository, and documentation of how to set up and use the proxy can be found [here][detailed_docs].
99

1010
## Table of contents
11-
- [General troubleshooting tip](#general-troubleshooting-tip)
12-
- [Test collection failure](#test-collection-failure)
13-
- [Errors in tests using resource preparers](#errors-in-tests-using-resource-preparers)
14-
- [Playback failures from body matching errors](#playback-failures-from-body-matching-errors)
15-
- [Recordings not being produced](#recordings-not-being-produced)
16-
- [KeyError during container startup](#keyerror-during-container-startup)
17-
- [ConnectionError during test startup](#connectionerror-during-test-startup)
18-
- [Different error than expected when using proxy](#different-error-than-expected-when-using-proxy)
19-
- [Test setup failure in test pipeline](#test-setup-failure-in-test-pipeline)
20-
- [Fixture not found error](#fixture-not-found-error)
11+
- [Guide for test proxy troubleshooting](#guide-for-test-proxy-troubleshooting)
12+
- [Table of contents](#table-of-contents)
13+
- [General troubleshooting tip](#general-troubleshooting-tip)
14+
- [Test collection failure](#test-collection-failure)
15+
- [Errors in tests using resource preparers](#errors-in-tests-using-resource-preparers)
16+
- [Playback failures from body matching errors](#playback-failures-from-body-matching-errors)
17+
- [Recordings not being produced](#recordings-not-being-produced)
18+
- [KeyError during container startup](#keyerror-during-container-startup)
19+
- [ConnectionError during test startup](#connectionerror-during-test-startup)
20+
- [Different error than expected when using proxy](#different-error-than-expected-when-using-proxy)
21+
- [Test setup failure in test pipeline](#test-setup-failure-in-test-pipeline)
22+
- [Fixture not found error](#fixture-not-found-error)
2123

2224
## General troubleshooting tip
2325

@@ -107,6 +109,7 @@ Tests that aren't recorded should omit the `recorded_by_proxy` decorator. Howeve
107109
parameters that are provided by a preparer like the `devtools_testutils` [EnvironmentVariableLoader][env_var_loader],
108110
you may see a new test setup error after migrating to the test proxy. For example, imagine a test is decorated with a
109111
preparer that provides a Key Vault URL as a `azure_keyvault_url` parameter:
112+
110113
```python
111114
class TestExample(AzureRecordedTestCase):
112115

@@ -115,6 +118,7 @@ class TestExample(AzureRecordedTestCase):
115118
```
116119

117120
The above would work in the old test setup, but with the test proxy, running the test will yield
121+
118122
```text
119123
_______ ERROR at setup of TestExample.test_example _______
120124
...
@@ -134,7 +138,7 @@ expected in either case.
134138
[detailed_docs]: https://github.com/Azure/azure-sdk-tools/tree/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md
135139
[env_var_loader]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/envvariable_loader.py
136140
[env_var_section]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md#fetch-environment-variables
137-
[general_docs]: https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/README.md
141+
[general_docs]: https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/documentation/test-proxy/initial-investigation.md
138142
[mgmt_recorded_test_case]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/mgmt_recorded_testcase.py
139143
[migration_guide]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md
140144
[proxy_pipelines]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md#enable-the-test-proxy-in-pipelines

doc/dev/tests-advanced.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Setup Python Development Environment - Advanced
22
In this document we will provide additional information about the test environments:
33

4-
- [Test Mixin Classes](#test-mixin-classes)
5-
- [Resource Preparers](#preparers)
6-
- [Examples with Preparers](#examples-with-preparers)
7-
- [mgmt_settings_real.py](#mgmt_settings_real-file)
4+
- [Setup Python Development Environment - Advanced](#setup-python-development-environment---advanced)
5+
- [Test Mixin Classes](#test-mixin-classes)
6+
- [Preparers](#preparers)
7+
- [Examples with Preparers](#examples-with-preparers)
8+
- [Example 2: Basic Preparer Usage with Storage](#example-2-basic-preparer-usage-with-storage)
9+
- [Example 3: Cached Preparer Usage](#example-3-cached-preparer-usage)
10+
- [mgmt\_settings\_real file](#mgmt_settings_real-file)
811

912
## Test Mixin Classes
1013
Many of our test suites use a mixin class to reduce re-writing code in multiple test files. For example, in the Tables test suite there is a `_shared` directory containing two of these mixin classes, a [sync one](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/tests/_shared/testcase.py) and an [async version](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/tests/_shared/asynctestcase.py). These classes will often have ways to create connection strings from an account name and key, formulate the account url, configure logging, or validate service responses. In order for these mixin classes to be used by both the functional and unit tests they should inherit from `object`. For example:
@@ -74,8 +77,8 @@ class TestTablesUnit(TablesTestMixin):
7477
assert client.account_url == "https://{}.tables.core.windows.net/".format(account)
7578
```
7679

77-
7880
## Preparers
81+
7982
The Azure SDK team has created some in house tools to help with easier testing. These additional tools are located in the `devtools_testutils` package that was installed with your `dev_requirements.txt`. In this package are the preparers that will be commonly used throughout the repository to test various resources. A preparer is a way to programmatically create fresh resources to run our tests against and then deleting them after running a test suite. These help guarantee standardized behavior by starting each test group from a fresh resource and account.
8083

8184
If this situation is a requirement for your tests, you can opt to create a new preparer for your service from the management plane library for a service. There are already a few preparers built in the [devtools_testutils](https://github.com/Azure/azure-sdk-for-python/tree/main/tools/azure-sdk-tools/devtools_testutils). Most prepares will start with the [`ResourceGroupPreparer`](https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/resource_testcase.py#L29-L99) to first create a resource group for your service.
@@ -86,8 +89,6 @@ To build your own preparer you will need to use the management plane library to
8689
|-|-|-|
8790
| Resource Group | [link](https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/resource_testcase.py#L57-L85) | [link](https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/resource_testcase.py#L87-L99) |
8891
| Storage Account | [link](https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/storage_testcase.py#L53-L102) | [link](https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/storage_testcase.py#L104-L107) |
89-
| KeyVault | [link](https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/keyvault_preparer.py#L84-L131) | [link](https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/keyvault_preparer.py#L133-L138) |
90-
9192

9293
## Examples with Preparers
9394

@@ -107,7 +108,7 @@ from devtools_testutils import (
107108
class ExampleStorageTestCase(AzureTestCase):
108109

109110
@ResourceGroupPreparer()
110-
@StorageAcountPreparer()
111+
@StorageAccountPreparer()
111112
def test_create_table(self, resource_group, location, storage_account, storage_account_key):
112113
account_url = self.account_url(storage_account, "table")
113114
client = self.create_client_from_credential(TableServiceClient, storage_account_key, account_url=account_url)
@@ -141,7 +142,7 @@ from devtools_testutils import (
141142
class ExampleStorageTestCase(AzureTestCase):
142143

143144
@CachedResourceGroupPreparer(name_prefix="storagetest")
144-
@CachedStorageAcountPreparer(name_prefix="storagetest")
145+
@CachedStorageAccountPreparer(name_prefix="storagetest")
145146
def test_create_table(self, resource_group, location, storage_account, storage_account_key):
146147
account_url = self.account_url(storage_account, "table")
147148
client = self.create_client_from_credential(TableServiceClient, storage_account_key, account_url=account_url)
@@ -152,7 +153,7 @@ class ExampleStorageTestCase(AzureTestCase):
152153
assert valid_table_name == table.table_name
153154

154155
@CachedResourceGroupPreparer(name_prefix="storagetest")
155-
@CachedStorageAcountPreparer(name_prefix="storagetest")
156+
@CachedStorageAccountPreparer(name_prefix="storagetest")
156157
def test_create_table_if_exists (self, resource_group, location, storage_account, storage_account_key):
157158
account_url = self.account_url(storage_account, "table")
158159
client = self.create_client_from_credential(TableServiceClient, storage_account_key, account_url=account_url)

doc/dev/tests.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,13 @@ ServicePreparer = functools.partial(
264264
```
265265

266266
The parameters for the `functools.partial` method are:
267-
* The EnvironmentVariableLoader class
268-
* The service folder that holds your code (in this example, `sdk/testservice`). This value is used to search your
267+
268+
- The EnvironmentVariableLoader class
269+
- The service folder that holds your code (in this example, `sdk/testservice`). This value is used to search your
269270
environment variables for the appropriate values.
270-
* The remaining arguments are key-value kwargs, with the keys being the environment variables needed for the tests, and
271+
- The remaining arguments are key-value kwargs, with the keys being the environment variables needed for the tests, and
271272
the value being a fake value to use in recordings.
272-
* These values should have the same formatting as the real values because they are used in playback mode and will need
273+
- These values should have the same formatting as the real values because they are used in playback mode and will need
273274
to pass any client side validation. The fake value should also be a unique value to the other key-value pairs.
274275

275276
A method that's decorated by the ServicePreparer from the example would be called with `testservice_endpoint` and
@@ -733,7 +734,7 @@ Tests that use the Shared Access Signature (SAS) to authenticate a client should
733734
[packaging]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/packaging.md
734735
[podman]: https://podman.io/
735736
[proxy_cert_docs]: https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/documentation/test-proxy/trusting-cert-per-language.md
736-
[proxy_general_docs]: https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/README.md
737+
[proxy_general_docs]: https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md
737738
[proxy_migration_guide]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md
738739
[py_sanitizers]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/sanitizers.py
739740
[pytest_invocation]: https://pytest.org/latest/how-to/usage.html

scripts/cadl_refresh_sdk/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# Overview
2+
23
The script is to refresh SDK code
34

4-
# Prerequisites
5-
1. Install [Powershell 7+](https://learn.microsoft.com/en-us/shows/it-ops-talk/how-to-install-powershell-7)
5+
## Prerequisites
6+
7+
1. Install [Powershell 7+](https://learn.microsoft.com/shows/it-ops-talk/how-to-install-powershell-7)
68
2. Install [Python 3.7+](https://www.python.org/downloads/release/python-370/)
79
3. Install [Nodejs](https://nodejs.org/en/download/)
810

9-
# Usage
11+
## Usage
12+
1013
Step into root folder of this repo and run cmd with sdk folder:
1114
```powershell
1215
D:\azure-sdk-for-python> python .\scripts\cadl_refresh_sdk\main.py .\sdk\contosowidgetmanager\azure-contosowidgetmanager

sdk/videoanalyzer/azure-media-videoanalyzer-edge/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Use the client library for Video Analyzer Edge to:
99
- Simplify interactions with the [Microsoft Azure IoT SDKs](https://github.com/azure/azure-iot-sdks)
1010
- Programmatically construct pipeline topologies and live pipelines
1111

12-
[Package (PyPI)][package] | [Product documentation][doc_product] | [Direct methods][doc_direct_methods] | [Pipelines][doc_pipelines] | [Source code][source] | [Samples][samples]
12+
[Package (PyPI)][package] | [Product documentation][doc_product] | [Direct methods][doc_direct_methods] | [Archived MS Docs][doc_pipelines] | [Source code][source] | [Samples][samples]
1313

1414
## Getting started
1515

@@ -142,12 +142,12 @@ additional questions or comments.
142142
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
143143
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
144144
[coc_contact]: mailto:opencode@microsoft.com
145-
[doc_pipelines]: https://go.microsoft.com/fwlink/?linkid=2162396
145+
[doc_pipelines]: https://github.com/MicrosoftDocs/azure-docs/blob/4ba87bedc7b17a32903c99afb3ca4163be0dcc90/articles/azure-video-analyzer/video-analyzer-docs/overview.md
146146
[package]: https://aka.ms/ava/sdk/client/python
147147
[source]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/videoanalyzer
148148
[samples]: https://go.microsoft.com/fwlink/?linkid=2162278
149-
[doc_product]: https://go.microsoft.com/fwlink/?linkid=2162396
150-
[doc_direct_methods]: https://go.microsoft.com/fwlink/?linkid=2162396
149+
[doc_product]: https://github.com/MicrosoftDocs/azure-docs/blob/4ba87bedc7b17a32903c99afb3ca4163be0dcc90/articles/azure-video-analyzer/video-analyzer-docs/overview.md
150+
[doc_direct_methods]: https://github.com/MicrosoftDocs/azure-docs/blob/4ba87bedc7b17a32903c99afb3ca4163be0dcc90/articles/azure-video-analyzer/video-analyzer-docs/overview.md
151151
[iot-device-sdk]: https://pypi.org/project/azure-iot-device/
152152
[iot-hub-sdk]: https://pypi.org/project/azure-iot-hub/
153153
[github-page-issues]: https://github.com/Azure/azure-sdk-for-python/issues
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Microsoft Azure SDK for Python
22

3-
We’re retiring the Azure Video Analyzer preview service; you're advised to transition your applications off of Video Analyzer by 01 December 2022. This SDK is no longer maintained and won’t work after the service is retired. To learn how to transition off, please refer to: [Transition from Azure Video Analyzer - Azure Video Analyzer | Microsoft Docs](https://docs.microsoft.com/azure/azure-video-analyzer/video-analyzer-docs/transition-from-video-analyzer)
3+
We’re retiring the Azure Video Analyzer preview service; you're advised to transition your applications off of Video Analyzer by 01 December 2022. This SDK is no longer maintained and won’t work after the service is retired. To learn how to transition off, please refer to: [Transition from Azure Video Analyzer - Azure Video Analyzer | Archived Microsoft Docs](https://github.com/MicrosoftDocs/azure-docs/blob/4ba87bedc7b17a32903c99afb3ca4163be0dcc90/articles/azure-video-analyzer/video-analyzer-docs/transition-from-video-analyzer.md)
44

55
The complete list of available packages can be found at: https://aka.ms/azsdk/python/all

0 commit comments

Comments
 (0)