Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…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)
  ...
  • Loading branch information
iscai-msft committed May 6, 2021
2 parents 93decd7 + ef4faf8 commit 3dc1198
Show file tree
Hide file tree
Showing 7,449 changed files with 1,176,678 additions and 401,145 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
13 changes: 11 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/sdk/storage/ @amishra-dev @zezha-msft @annatisch @xiafu-msft @tasherif-msft @kasobol-msft

# PRLabel: %App Configuration
/sdk/appconfiguration/ @xiangyan99
/sdk/appconfiguration/ @xiangyan99 @seankane-msft

/sdk/applicationinsights/azure-applicationinsights/ @divya-jay @geneh @alongafni
/sdk/loganalytics/azure-loganalytics/ @divya-jay @geneh @alongafni
Expand Down Expand Up @@ -71,6 +71,9 @@
# PRLabel: %HDInsight
/sdk/hdinsight/ @idear1203

# PRLabel: %Models repository
/sdk/modelsrepository/ @cartertinney @digimaun

# PRLabel: %Machine Learning Compute
/sdk/machinelearningcompute/ @shutchings

Expand Down Expand Up @@ -107,12 +110,18 @@
# PRLabel: %Cognitive - Metrics Advisor
/sdk/metricsadvisor/ @xiangyan99 @kristapratico

# PRLabel: %Cognitive - Translator
/sdk/translation/ @kristapratico @mohamedshabanofficial

# PRLabel: %Tables
/sdk/tables/ @seankane-msft

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

# PRLabel: %Container Registry
/sdk/containerregistry/ @seankane-msft

# Smoke Tests
/common/smoketest/ @lmazuel @chlowell @annatisch @rakshith91 @shurd @southpolesteve

Expand All @@ -124,5 +133,5 @@
# Eng Sys
###########
/eng/ @weshaggard @scbedd @mitchdenny @danieljurek
/**/tests.yml @danieljurek
/**/tests.yml @benbp
/**/ci.yml @mitchdenny
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ Mypy install and run.
**Example: Invoke tox, breaking into the debugger on failure**
`tox -e whl -c ../../../eng/tox/tox.ini -- --pdb`

### Performance Testing

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).

### More Reading

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.
Expand Down
4 changes: 2 additions & 2 deletions ci_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ extends:
parameters:
ServiceDirectory: MyService
Artifacts:
- name: azure_mgmt_MyService
safeName: azuremgmtMyService
- name: azure-mgmt-MyService
safeName: azuremgmtMyService
2 changes: 1 addition & 1 deletion common/smoketest/smoke-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jobs:
- template: /eng/pipelines/templates/jobs/smoke-test.yml
- template: /eng/pipelines/templates/jobs/smoke.tests.yml
parameters:
Daily: true
114 changes: 114 additions & 0 deletions doc/dev/conda-builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Azure SDK for Python Conda Distributions

## Local Environment Setup

Follow the instructions [here](https://docs.conda.io/projects/conda-build/en/latest/install-conda-build.html) to install `conda` and `conda-build`.

## CI Build Process

There will be a `CondaArtifact` defined in the `ci.yml` of each service directory. (`sdk/<service>`)

A Conda Artifact defines:
- The location of the `meta.yml`
- Which packages will be pulled into the combined artifact
- The name of the combined artifact
- Any other necessary details.

## How to Build an Azure SDK Conda Package Locally

### Set up your conda environment

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`.

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:

1. Our channel `https://azuresdkconda.blob.core.windows.net/channel1/` is added to the set to download packages
2. The environment variable `AZURESDK_CONDA_VERSION` will be set exactly once.


Reference the `conda_env.yml` in your local build by pass `-f <path to conda_env.yml>` when you create your conda environment.

```
conda env create --yes --quiet --name ${{ artifact.name }} -f $(Build.SourcesDirectory)/eng/conda_env.yml
```

### Create Your Build Directory
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.

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.

```
- name: azure-storage
meta_source: meta.yml
common_root: azure/storage
checkout:
- package: azure-storage-blob
checkout_path: sdk/storage
version: 12.8.0
- package: azure-storage-queue
checkout_path: sdk/storage
version: 12.1.5
- package: azure-storage-file-share
checkout_path: sdk/storage
version: 12.4.1
- package: azure-storage-file-datalake
checkout_path: sdk/storage
version: 12.3.0
```

- `name: azure-storage`: will be the name of the "combined" sdist package that we generate.
- `meta_source: meta.yml`: this is the path (relative to the service directory) to the target conda package meta.yml.
- `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.
- `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.

Before we continue, you should be aware of two primary locations that are necessary, but not referenced directly in the `ci.yml`.

The `build` folder and the `output` folder. The `build` folder (`$(Conda.Build)` variable in CI) is where we will...

- store the cloned package code
- generate the combined sdist

To locally repro without magic given a specific `checkout` artifact:

```
<cd sdk-for-python>
git checkout `<package>_<version>`
grab the entire <package> directory under the <checkout_path>. place into your `build` folder.
```

Given the `storage` example. This is what your `build` folder should look like prior to invoking `build_conda_artifacts.py`.

```
<build directory>/
azure-storage-blob/ <-- the package directly ripped from specified tag
azure-storage-file-datalake/
azure-storage-file-share/
azure-storage-queue/
```

### Create the Combined SDist

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.


```
python `build_conda_artifacts.py`
-d "<output folder>"
-b "<build folder>"
-m "<resolvable path to sdk/storage/meta.yml>"
-r "azure/storage"
-n "azure-storage"
-s "storage"
-e "<resolvable path to repo root>/eng/conda_env.yml"
-c "<resolvable path to sdk/storage/ci.yml>"
```

### Generate the Conda Package

Locally, from the anaconda prompt, set the environment variable `STORAGE_SOURCE_DISTRIBUTION` to the location of the generated sdist. After that:

```bash
export STORAGE_SOURCE_DISTRIBUTION=<path/to/generated/sdist>
cd <meta.yml directory>
conda-build . --output-folder <conda.output>
```
Loading

0 comments on commit 3dc1198

Please sign in to comment.