Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into add_sample_check

* 'master' of https://github.com/Azure/azure-sdk-for-python: (388 commits)
  [text analytics] add normalized_text (#17074)
  Renaming with_token identity function (#17066)
  Adapt to azure core's cloud event (#17063)
  align perf tests with js (#17069)
  [Perfstress][Storage] Added FileShare perf tests (#15834)
  [formrecognizer] Adding custom forms perf test (#16969)
  Fix LanguageShort typo (#17068)
  sas creds updates (#17065)
  [eventgrid] Fix Sample eh (#17064)
  [Perfstress][Storage] Added Datalake perf tests (#15861)
  [text analytics] Healthcare n-ary relations (#16997)
  ServiceBus dict-representation acceptance and kwarg-update functionality  (#14807)
  [text analytics] add perf tests (#17060)
  Add cloud event to core (#16800)
  [Perf] Small fixes to storage-blob (#17055)
  [EG] Regenerate Code (#17053)
  Scrub batch shared keys (#17030)
  [Tables] Add SAS to tables (#16717)
  T2 containerservice 2021 03 03 (#17050)
  Addressing issues with CredScan (#16944)
  ...
  • Loading branch information
iscai-msft committed Mar 3, 2021
2 parents a8aa4f7 + 4ee7f35 commit c31c0f9
Show file tree
Hide file tree
Showing 5,447 changed files with 1,171,510 additions and 343,190 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ omit =
*/test*
env*

[paths]
source =
sdk/
**/sdk

[report]
exclude_lines =
pragma: no cover
Expand Down
15 changes: 9 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/sdk/identity/ @chlowell @mccoyp @schaabs

# PRLabel: %Event Hubs
/sdk/eventhub/ @annatisch @yunhaoling @KieranBrantnerMagee
/sdk/eventhub/ @annatisch @yunhaoling @swathipil @rakshith91

# PRLabel: %Storage
/sdk/storage/ @amishra-dev @zezha-msft @annatisch @xiafu-msft @tasherif-msft @kasobol-msft
Expand All @@ -36,7 +36,7 @@
/sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish

# PRLabel: %Communication
/sdk/communication/ @RezaJooyandeh @turalf @ankitarorabit @memontic-ms @Azure/azure-sdk-communication-code-reviewers
/sdk/communication/ @turalf @ankitarorabit @memontic-ms @Azure/azure-sdk-communication-code-reviewers

# PRLabel: %KeyVault
/sdk/keyvault/ @schaabs @chlowell @mccoyp
Expand All @@ -45,7 +45,7 @@
/sdk/loganalytics/ @alexeldeib

# PRLabel: %Monitor - Exporter
/sdk/monitor/azure-opentelemetry-exporter-azuremonitor @rakshith91 @lmazuel @hectorhdzg @lzchen
/sdk/monitor/azure-monitor-opentelemetry-exporter @rakshith91 @lmazuel @lzchen

# PRLabel: %Consumption
/sdk/consumption/ @sandeepnl
Expand All @@ -66,7 +66,7 @@
/sdk/datadatamigration/ @vchske

# PRLabel: %Event Grid
/sdk/eventgrid/ @lmazuel @rakshith91 @KieranBrantnerMagee
/sdk/eventgrid/ @lmazuel @yunhaoling @swathipil @rakshith91

# PRLabel: %HDInsight
/sdk/hdinsight/ @idear1203
Expand All @@ -90,7 +90,7 @@
/sql/sql/ @jaredmoo

# PRLabel: %Service Bus
/sdk/servicebus/ @annatisch @yunhaoling @KieranBrantnerMagee @rakshith91
/sdk/servicebus/ @annatisch @yunhaoling @swathipil @rakshith91

# PRLabel: %Synapse
/sdk/synapse/ @aim-for-better @idear1203
Expand All @@ -102,14 +102,17 @@
/sdk/textanalytics/ @kristapratico @iscai-msft @abhahn

# PRLabel: %Cognitive - Form Recognizer
/sdk/formrecognizer/ @kristapratico @iscai-msft
/sdk/formrecognizer/ @kristapratico @iscai-msft @catalinaperalta

# PRLabel: %Cognitive - Metrics Advisor
/sdk/metricsadvisor/ @xiangyan99 @kristapratico

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

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

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

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ build/

# Test results
TestResults/
ENV_DIR/

# tox generated artifacts
test-junit-*.xml
Expand Down
7 changes: 4 additions & 3 deletions build_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
import argparse
import os
import glob
from subprocess import check_call
import sys

from subprocess import check_call

DEFAULT_DEST_FOLDER = "./dist"

Expand All @@ -19,8 +20,8 @@ def create_package(name, dest_folder=DEFAULT_DEST_FOLDER):
absdirs = [os.path.dirname(package) for package in (glob.glob('{}/setup.py'.format(name)) + glob.glob('sdk/*/{}/setup.py'.format(name)))]

absdirpath = os.path.abspath(absdirs[0])
check_call(['python', 'setup.py', 'bdist_wheel', '-d', dest_folder], cwd=absdirpath)
check_call(['python', 'setup.py', "sdist", "--format", "zip", '-d', dest_folder], cwd=absdirpath)
check_call([sys.executable, 'setup.py', 'bdist_wheel', '-d', dest_folder], cwd=absdirpath)
check_call([sys.executable, 'setup.py', "sdist", "--format", "zip", '-d', dest_folder], cwd=absdirpath)


if __name__ == '__main__':
Expand Down
35 changes: 35 additions & 0 deletions ci_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# DO NOT EDIT THIS FILE
# This file is generated automatically and any changes will be lost.

trigger:
branches:
include:
- master
- main
- hotfix/*
- release/*
- restapi*
paths:
include:
- sdk/MyService/

pr:
branches:
include:
- master
- main
- feature/*
- hotfix/*
- release/*
- restapi*
paths:
include:
- sdk/MyService/

extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: MyService
Artifacts:
- name: azure_mgmt_MyService
safeName: azuremgmtMyService
8 changes: 8 additions & 0 deletions common/smoketest/requirements-release.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
azure-core>=0.0.0b1
azure-identity>=0.0.0b1
azure-cosmos>=4.0.0b5
azure-eventhub>=0.0.0b1
azure-keyvault-certificates>=0.0.0b1
azure-keyvault-keys>=0.0.0b1
azure-keyvault-secrets>=0.0.0b1
azure-storage-blob>=0.0.0b1
2 changes: 1 addition & 1 deletion common/smoketest/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ azure-eventhub
azure-keyvault-certificates
azure-keyvault-keys
azure-keyvault-secrets
azure-storage-blob
azure-storage-blob
125 changes: 3 additions & 122 deletions common/smoketest/smoke-test.yml
Original file line number Diff line number Diff line change
@@ -1,123 +1,4 @@
variables:
InstallAsyncRequirements: true

jobs:
- job:
strategy:
matrix:
Python_27_Linux (AzureCloud):
PythonVersion: '2.7'
InstallAsyncRequirements: false
OSVmImage: ubuntu-18.04
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_37_Linux (AzureCloud):
PythonVersion: '3.7'
OSVmImage: ubuntu-18.04
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Linux (AzureCloud):
PythonVersion: '3.8'
OSVmImage: ubuntu-18.04
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Linux (AzureCloud Canary):
PythonVersion: '3.8'
OSVmImage: ubuntu-18.04
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview)
ArmTemplateParameters: $(azureCloudArmParameters)
Location: 'eastus2euap'
Python_37_Windows (AzureCloud):
PythonVersion: '3.7'
OSVmImage: windows-2019
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Windows (AzureCloud):
PythonVersion: '3.8'
OSVmImage: windows-2019
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_37_Mac (AzureCloud):
PythonVersion: '3.7'
OSVmImage: macOS-10.15
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Mac (AzureCloud):
PythonVersion: '3.8'
OSVmImage: macOS-10.15
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Linux (AzureUSGovernment):
PythonVersion: '3.8'
OSVmImage: ubuntu-18.04
SubscriptionConfiguration: $(sub-config-gov-test-resources)
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
Python_37_Windows (AzureUSGovernment):
PythonVersion: '3.7'
OSVmImage: windows-2019
SubscriptionConfiguration: $(sub-config-gov-test-resources)
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
Python_38_Linux (AzureChinaCloud):
PythonVersion: '3.8'
OSVmImage: ubuntu-18.04
SubscriptionConfiguration: $(sub-config-cn-test-resources)
Location: 'chinanorth'
ArmTemplateParameters: $(azureChinaCloudArmParameters)
Python_37_Windows (AzureChinaCloud):
PythonVersion: '3.7'
OSVmImage: windows-2019
SubscriptionConfiguration: $(sub-config-cn-test-resources)
Location: 'chinanorth'
ArmTemplateParameters: $(azureChinaCloudArmParameters)

pool:
vmImage: $(OSVmImage)

variables:
Location: ''
azureCloudArmParameters: "@{ storageEndpointSuffix = 'core.windows.net'; azureCloud = 'AzureCloud'; }"
azureUSGovernmentArmParameters: "@{ storageEndpointSuffix = 'core.usgovcloudapi.net'; azureCloud = 'AzureUSGovernment'; }"
azureChinaCloudArmParameters: "@{ storageEndpointSuffix = 'core.chinacloudapi.cn'; azureCloud = 'AzureChinaCloud'; }"

steps:
- task: UsePythonVersion@0
displayName: "Use Python $(PythonVersion)"
inputs:
versionSpec: $(PythonVersion)

- script: |
python -m pip install pip==20.0.2
pip --version
displayName: pip --version
- script: pip install -r ./common/smoketest/requirements.txt --pre --no-deps --index-url https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple
displayName: Install requirements from dev feed without dependencies

- script: pip install -r ./common/smoketest/requirements_async.txt
displayName: "Install requirements_async.txt"
condition: and(succeeded(), eq(variables['InstallAsyncRequirements'], 'true'))

- script: python ./common/smoketest/dependencies.py -r ./common/smoketest/requirements.txt | tee ./common/smoketest/requirements_dependencies.txt
displayName: Create dependency list from installed dev packages

- script: pip install -r ./common/smoketest/requirements_dependencies.txt
displayName: Install dev package dependencies from PyPI

- script: pip freeze
displayName: Show installed packages (pip freeze)

- template: /eng/common/TestResources/deploy-test-resources.yml
parameters:
ServiceDirectory: '$(Build.SourcesDirectory)/common/smoketest/'
SubscriptionConfiguration: $(SubscriptionConfiguration)
Location: $(Location)
ArmTemplateParameters: $(ArmTemplateParameters)

- script: python ./common/smoketest/program.py
displayName: Run Smoke Test

- template: /eng/common/TestResources/remove-test-resources.yml
parameters:
ServiceDirectory: '$(Build.SourcesDirectory)/common/smoketest/'
SubscriptionConfiguration: $(SubscriptionConfiguration)

- template: /eng/pipelines/templates/jobs/smoke-test.yml
parameters:
Daily: true
2 changes: 1 addition & 1 deletion doc/dev/mgmt/swagger/multi_api/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is the AutoRest configuration file for Network.

## Getting Started

To build the SDK for Network, simply [Install AutoRest](https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md) and in this folder, run:
To build the SDK for Network, simply [Install AutoRest](https://github.com/Azure/autorest/blob/master/docs/install/readme.md) and in this folder, run:

> `autorest`
Expand Down
2 changes: 1 addition & 1 deletion doc/dev/mgmt/swagger/single_api/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is the AutoRest configuration file for Cdn.

---
## Getting Started
To build the SDK for Cdn, simply [Install AutoRest](https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md) and in this folder, run:
To build the SDK for Cdn, simply [Install AutoRest](https://github.com/Azure/autorest/blob/master/docs/install/readme.md) and in this folder, run:

> `autorest`
Expand Down
11 changes: 6 additions & 5 deletions doc/dev/mgmt/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ sdk/storage/azure-mgmt-storage> pytest

You can provide directories or individual files as positional arguments to specify particular tests to run rather than running the entire test suite. For example:
```Shell
sdk/storage/azure-mgmt-storage> pytest sdk/storage/azure-mgmt-storage/
sdk/storage/azure-mgmt-storage> pytest sdk/storage/azure-mgmt-storage/tests/test_mgmt_storage.py
sdk/storage/azure-mgmt-storage> pytest
sdk/storage/azure-mgmt-storage> pytest tests/test_mgmt_storage.py
```

If you have print statements in your tests for debugging you can add the `-s` flag to send those print statements to standard output:
```Shell
sdk/storage/azure-mgmt-storage> pytest sdk/storage/azure-mgmt-storage/ -s
sdk/storage/azure-mgmt-storage> pytest -s
```

## Getting Azure credentials
Expand Down Expand Up @@ -106,6 +106,7 @@ def get_credentials(**kwargs):
```python
def get_azure_core_credentials(**kwargs):
from azure.identity import ClientSecretCredential
import os
return ClientSecretCredential(
client_id = os.environ['AZURE_CLIENT_ID'],
client_secret = os.environ['AZURE_CLIENT_SECRET'],
Expand Down Expand Up @@ -309,11 +310,11 @@ class ExampleSqlServerTestCase(AzureMgmtTestCase):
```

<!-- LINKS -->
[arm_apis]: https://docs.microsoft.com/en-us/rest/api/resources/
[arm_apis]: https://docs.microsoft.com/rest/api/resources/
[azure_devtools]: https://pypi.org/project/azure-devtools/
[azure_portal]: https://portal.azure.com/
[decorators]: https://www.python.org/dev/peps/pep-0318/
[dev_setup]: ../dev_setup.md
[dev_setup]: https://github.com/Azure/azure-sdk-for-python/blob/master/doc/dev/dev_setup.md
[devtools_testutils]: https://github.com/Azure/azure-sdk-for-python/tree/master/tools/azure-sdk-tools/devtools_testutils
[mgmt_settings_fake]: https://github.com/Azure/azure-sdk-for-python/blob/master/tools/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py
[pytest]: https://docs.pytest.org/en/latest/
Expand Down
Loading

0 comments on commit c31c0f9

Please sign in to comment.