Skip to content

Commit 3dc1198

Browse files
committed
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python into azure_purview_scanning
* 'master' of https://github.com/Azure/azure-sdk-for-python: (550 commits) del useless files (Azure#18528) delete existing useless files for trafficmanager (Azure#18525) Define new replacer to replace keys in recording (Azure#18294) [purview] add purview nspkg to ci (Azure#18523) ignore analysis for swagger readmes (Azure#18520) [purview] add azure-purview-nspkg (Azure#18518) [AppConfiguration] Appconfig consistency (Azure#18493) [Container Registry] Improved samples (Azure#18263) [Container Registry] renamings (Azure#18492) [ServiceBus] internal code rename and sample readme update (Azure#18516) [EventHub] update link in sample readme (Azure#18517) Post Process Event Names Script (Azure#18419) [Tables] use etag from entity if match condition is given (Azure#18271) adding operation-location to headers that are scrubbed (Azure#18514) [Tables] Adds support for AzureNamedKeyCredential (Azure#18456) [Tables] delete_entity takes an entity instead of row and partition key (Azure#18269) [Tables] Removed TableEntity attribute wrapper (Azure#18489) [EventHub&ServiceBus] Bump uAMQP dependency (Azure#17942) [ServiceBus] add keyword override support to update_ methods in mgmt module (Azure#18210) Add compatibility switch to disable CAE (Azure#18148) ...
2 parents 93decd7 + ef4faf8 commit 3dc1198

File tree

7,449 files changed

+1176678
-401145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,449 files changed

+1176678
-401145
lines changed

.github/CODEOWNERS

+11-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/sdk/storage/ @amishra-dev @zezha-msft @annatisch @xiafu-msft @tasherif-msft @kasobol-msft
2727

2828
# PRLabel: %App Configuration
29-
/sdk/appconfiguration/ @xiangyan99
29+
/sdk/appconfiguration/ @xiangyan99 @seankane-msft
3030

3131
/sdk/applicationinsights/azure-applicationinsights/ @divya-jay @geneh @alongafni
3232
/sdk/loganalytics/azure-loganalytics/ @divya-jay @geneh @alongafni
@@ -71,6 +71,9 @@
7171
# PRLabel: %HDInsight
7272
/sdk/hdinsight/ @idear1203
7373

74+
# PRLabel: %Models repository
75+
/sdk/modelsrepository/ @cartertinney @digimaun
76+
7477
# PRLabel: %Machine Learning Compute
7578
/sdk/machinelearningcompute/ @shutchings
7679

@@ -107,12 +110,18 @@
107110
# PRLabel: %Cognitive - Metrics Advisor
108111
/sdk/metricsadvisor/ @xiangyan99 @kristapratico
109112

113+
# PRLabel: %Cognitive - Translator
114+
/sdk/translation/ @kristapratico @mohamedshabanofficial
115+
110116
# PRLabel: %Tables
111117
/sdk/tables/ @seankane-msft
112118

113119
# PRLabel: %Media
114120
/sdk/media/ @naiteeks @bennage @giakas
115121

122+
# PRLabel: %Container Registry
123+
/sdk/containerregistry/ @seankane-msft
124+
116125
# Smoke Tests
117126
/common/smoketest/ @lmazuel @chlowell @annatisch @rakshith91 @shurd @southpolesteve
118127

@@ -124,5 +133,5 @@
124133
# Eng Sys
125134
###########
126135
/eng/ @weshaggard @scbedd @mitchdenny @danieljurek
127-
/**/tests.yml @danieljurek
136+
/**/tests.yml @benbp
128137
/**/ci.yml @mitchdenny

CONTRIBUTING.md

+4
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ Mypy install and run.
111111
**Example: Invoke tox, breaking into the debugger on failure**
112112
`tox -e whl -c ../../../eng/tox/tox.ini -- --pdb`
113113

114+
### Performance Testing
115+
116+
SDK performance testing is supported via the custom `perfstress` framework. For full details on this framework, and how to write and run tests for an SDK - see the [perfstress tests documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/perfstress_tests.md).
117+
114118
### More Reading
115119

116120
We maintain an [additional document](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/eng_sys_checks.md) that has a ton of detail as to what is actually _happening_ in these executions.

ci_template.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ extends:
3131
parameters:
3232
ServiceDirectory: MyService
3333
Artifacts:
34-
- name: azure_mgmt_MyService
35-
safeName: azuremgmtMyService
34+
- name: azure-mgmt-MyService
35+
safeName: azuremgmtMyService

common/smoketest/smoke-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
jobs:
2-
- template: /eng/pipelines/templates/jobs/smoke-test.yml
2+
- template: /eng/pipelines/templates/jobs/smoke.tests.yml
33
parameters:
44
Daily: true

doc/dev/conda-builds.md

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Azure SDK for Python Conda Distributions
2+
3+
## Local Environment Setup
4+
5+
Follow the instructions [here](https://docs.conda.io/projects/conda-build/en/latest/install-conda-build.html) to install `conda` and `conda-build`.
6+
7+
## CI Build Process
8+
9+
There will be a `CondaArtifact` defined in the `ci.yml` of each service directory. (`sdk/<service>`)
10+
11+
A Conda Artifact defines:
12+
- The location of the `meta.yml`
13+
- Which packages will be pulled into the combined artifact
14+
- The name of the combined artifact
15+
- Any other necessary details.
16+
17+
## How to Build an Azure SDK Conda Package Locally
18+
19+
### Set up your conda environment
20+
21+
You will notice that all the azure-sdk conda distributions have the **same** version number and requirement set. This is due to the fact that the azure-sdk team pushes our conda packages out in waves. To support this, all versions are set via a common environment variable `AZURESDK_CONDA_VERSION`.
22+
23+
We keep this environment variable set properly across all our builds by using a common `conda_env.yml` when creating our build environment. This environment definition ensures that:
24+
25+
1. Our channel `https://azuresdkconda.blob.core.windows.net/channel1/` is added to the set to download packages
26+
2. The environment variable `AZURESDK_CONDA_VERSION` will be set exactly once.
27+
28+
29+
Reference the `conda_env.yml` in your local build by pass `-f <path to conda_env.yml>` when you create your conda environment.
30+
31+
```
32+
conda env create --yes --quiet --name ${{ artifact.name }} -f $(Build.SourcesDirectory)/eng/conda_env.yml
33+
```
34+
35+
### Create Your Build Directory
36+
Given how Conda packages are comprised of multiple source distributions _combined_, the buildable source does not exist directly within the azure-sdk-for-python repo. Currently, there is _some_ manual work that needs to be done.
37+
38+
To begin, check your `ci.yml` for a `CondaArtifact`. Each these artifacts will become a single conda package. Let's use `storage/ci.yml` as an example.
39+
40+
```
41+
- name: azure-storage
42+
meta_source: meta.yml
43+
common_root: azure/storage
44+
checkout:
45+
- package: azure-storage-blob
46+
checkout_path: sdk/storage
47+
version: 12.8.0
48+
- package: azure-storage-queue
49+
checkout_path: sdk/storage
50+
version: 12.1.5
51+
- package: azure-storage-file-share
52+
checkout_path: sdk/storage
53+
version: 12.4.1
54+
- package: azure-storage-file-datalake
55+
checkout_path: sdk/storage
56+
version: 12.3.0
57+
```
58+
59+
- `name: azure-storage`: will be the name of the "combined" sdist package that we generate.
60+
- `meta_source: meta.yml`: this is the path (relative to the service directory) to the target conda package meta.yml.
61+
- `common_root: azure/storage`: when generating the combined package, where will we begin combining? This is tightly bound to folder structure within the generated sdist.
62+
- `checkout`: the `checkout` setting is a list of target packages that will go into the combined artifact. These targets will be individually sparse cloned, and copied into the conda build directory. Currently, this is a **manual step** in your local build. Reference `eng/pipelines/templates/get-tagged-code.yml` for exact details on how CI does it.
63+
64+
Before we continue, you should be aware of two primary locations that are necessary, but not referenced directly in the `ci.yml`.
65+
66+
The `build` folder and the `output` folder. The `build` folder (`$(Conda.Build)` variable in CI) is where we will...
67+
68+
- store the cloned package code
69+
- generate the combined sdist
70+
71+
To locally repro without magic given a specific `checkout` artifact:
72+
73+
```
74+
<cd sdk-for-python>
75+
git checkout `<package>_<version>`
76+
grab the entire <package> directory under the <checkout_path>. place into your `build` folder.
77+
```
78+
79+
Given the `storage` example. This is what your `build` folder should look like prior to invoking `build_conda_artifacts.py`.
80+
81+
```
82+
<build directory>/
83+
azure-storage-blob/ <-- the package directly ripped from specified tag
84+
azure-storage-file-datalake/
85+
azure-storage-file-share/
86+
azure-storage-queue/
87+
```
88+
89+
### Create the Combined SDist
90+
91+
Once you have a directory assembled, invoke the script to build. The below command is formatted for visibility, recombine the lines however necessary for your chosen shell environment.
92+
93+
94+
```
95+
python `build_conda_artifacts.py`
96+
-d "<output folder>"
97+
-b "<build folder>"
98+
-m "<resolvable path to sdk/storage/meta.yml>"
99+
-r "azure/storage"
100+
-n "azure-storage"
101+
-s "storage"
102+
-e "<resolvable path to repo root>/eng/conda_env.yml"
103+
-c "<resolvable path to sdk/storage/ci.yml>"
104+
```
105+
106+
### Generate the Conda Package
107+
108+
Locally, from the anaconda prompt, set the environment variable `STORAGE_SOURCE_DISTRIBUTION` to the location of the generated sdist. After that:
109+
110+
```bash
111+
export STORAGE_SOURCE_DISTRIBUTION=<path/to/generated/sdist>
112+
cd <meta.yml directory>
113+
conda-build . --output-folder <conda.output>
114+
```

0 commit comments

Comments
 (0)