Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b93fd3e
Complete azure-identity prototype (#5547)
chlowell Jun 3, 2019
93a794d
[AutoPR] sqlvirtualmachine/resource-manager (#5652)
AutorestCI Jun 3, 2019
a151fd3
fixes retry bug on 202 status code (#5669)
kristapratico Jun 4, 2019
ed2eb26
Packaging (#5672)
xiangyan99 Jun 4, 2019
2eaf608
[AutoPR] rdbms/resource-manager (#5644)
AutorestCI Jun 5, 2019
e20d485
[azure-core] fixes sphinx paths and some docstring formatting (#5699)
kristapratico Jun 5, 2019
c895db2
resolving bad behavior for "python -m pytest -m 'blah'." It confuses …
scbedd Jun 6, 2019
d9f2307
use msi for emulator tests on cosmos master (#5524)
bryevdv Jun 6, 2019
f3813d0
KV client and auth file (#5716)
lmazuel Jun 6, 2019
6795925
adds exceptions docs and edits/typo fixes to core readme (#5730)
kristapratico Jun 6, 2019
7df999b
Skipping CG except where explicitly called out. (#5752)
mitchdenny Jun 7, 2019
c8991f7
azure-identity architecture board feedback (#5728)
chlowell Jun 7, 2019
5599cf1
policies.credentials -> .authentication (#5750)
chlowell Jun 7, 2019
9c07a77
Tools folder (#5734)
lmazuel Jun 7, 2019
b82d567
[AutoPR] cosmos-db/resource-manager (#5742)
AutorestCI Jun 7, 2019
ee8ff2c
Key Vault clients use azure-identity credentials (#5694)
chlowell Jun 8, 2019
e4d9945
New folder for devtools
lmazuel Jun 10, 2019
824a5a2
Devtools (#5759)
lmazuel Jun 10, 2019
47fc3c4
Certs track 2 API design (#5601)
samvaity Jun 10, 2019
bf65ba0
fixes bug in configure_redirects (#5761)
kristapratico Jun 10, 2019
a4469a6
Bearer token policy takes scopes as variadic args (#5767)
chlowell Jun 10, 2019
e8882fb
Fix regression of PipelineRequest in retry (#5791)
xiangyan99 Jun 11, 2019
89a8cc9
ignore mypy errors (#5798)
chlowell Jun 11, 2019
1e2f0ab
StreamingRetry (#5785)
xiangyan99 Jun 11, 2019
55c8295
fixes 'no redirects' configuration on redirect policy (#5790)
kristapratico Jun 11, 2019
88eb9bb
[azure-core] Fixes 'no retries' config in retry policy (#5803)
kristapratico Jun 12, 2019
5ea51ff
[AutoPR] hanaonazure/resource-manager (#5808)
AutorestCI Jun 12, 2019
cd30903
[AutoPR] storage/resource-manager (#5713)
AutorestCI Jun 12, 2019
1729c9e
Multi API script improvement (#5789)
lmazuel Jun 12, 2019
4a7c671
Storage 4.0.0
lmazuel Jun 12, 2019
fcfc79f
Generated from 941eb8a9146ee9275f17e77068db65c7cad51381
AutorestCI Jun 12, 2019
d0c5345
Merge remote-tracking branch 'upstream/master' into restapi_auto_6300
lmazuel Jun 12, 2019
7ed5beb
Multi-api and ACR
lmazuel Jun 12, 2019
e4d96f9
3.0.0rc2
lmazuel Jun 12, 2019
524f000
Generated from 941eb8a9146ee9275f17e77068db65c7cad51381
AutorestCI Jun 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .azure-pipelines/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ variables:
PythonVersion: '3.6'
ReleaseTag: 'RELEASE_CANDIDATE'
TestMarkArgument: 'not cosmosEmulator'

skipComponentGovernanceDetection: true

jobs:
- job: 'Build'

Expand Down
2 changes: 2 additions & 0 deletions .azure-pipelines/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ variables:

jobs:
- job: 'DocGen'
variables:
skipComponentGovernanceDetection: true
timeoutInMinutes: 120
pool:
vmImage: 'vs2017-win2016'
Expand Down
2 changes: 2 additions & 0 deletions .azure-pipelines/tests-nightly-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ trigger:
jobs:

- job: Validate_Nightly_Python_Build
variables:
skipComponentGovernanceDetection: true

timeoutInMinutes: 90

Expand Down
4 changes: 3 additions & 1 deletion .azure-pipelines/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

jobs:
- job: 'Test'

variables:
skipComponentGovernanceDetection: true

timeoutInMinutes: 120
strategy:
matrix:
Expand Down
5 changes: 4 additions & 1 deletion .azure-pipelines/update_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
trigger:
- master

variables:
skipComponentGovernanceDetection: true

pool:
vmImage: 'ubuntu-latest'

Expand All @@ -15,7 +18,7 @@ steps:
inputs:
versionSpec: 3.7

- script: python3 -m pip install -e "git+https://github.com/Azure/azure-sdk-for-python#subdirectory=azure-sdk-tools&egg=azure-sdk-tools"
- script: python3 -m pip install -e "git+https://github.com/Azure/azure-sdk-for-python#subdirectory=tools/azure-sdk-tools&egg=azure-sdk-tools"
displayName: 'Install Azure SDK tools'

- script: python3 -m packaging_tools.update_pr -v --pr-number $(System.PullRequest.PullRequestNumber) --repo $(Build.Repository.Name)
Expand Down
2 changes: 1 addition & 1 deletion .docsettings.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
omitted_paths:
- azure-sdk-tools/*
- tools/*
- scripts/*
- azure-mgmt-netapp/tests/*
- "azure-mgmt*/*"
Expand Down
113 changes: 75 additions & 38 deletions scripts/dev_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,81 +14,118 @@
from collections import Counter
from subprocess import check_call, CalledProcessError

root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), '..', '..'))
root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", ".."))

def pip_command(command, additional_dir='.', error_ok=False):

def pip_command(command, additional_dir=".", error_ok=False):
try:
print('Executing: {} from {}'.format(command, additional_dir))
check_call([sys.executable, '-m', 'pip'] + command.split(), cwd=os.path.join(root_dir, additional_dir))
print("Executing: {} from {}".format(command, additional_dir))
check_call(
[sys.executable, "-m", "pip"] + command.split(),
cwd=os.path.join(root_dir, additional_dir),
)
print()
except CalledProcessError as err:
print(err, file=sys.stderr)
if not error_ok:
sys.exit(1)


# optional argument in a situation where we want to build a variable subset of packages
parser = argparse.ArgumentParser(description='Set up the dev environment for selected packages.')
parser.add_argument('--packageList', '-p',
dest='packageList',
default='',
help='Comma separated list of targeted packages. Used to limit the number of packages that dependencies will be installed for.')
parser = argparse.ArgumentParser(
description="Set up the dev environment for selected packages."
)
parser.add_argument(
"--packageList",
"-p",
dest="packageList",
default="",
help="Comma separated list of targeted packages. Used to limit the number of packages that dependencies will be installed for.",
)
args = parser.parse_args()

packages = {('.', os.path.dirname(p)) for p in glob.glob('azure*/setup.py')}
# Handle the SDK folder as well
packages.update({tuple(os.path.dirname(f).rsplit(os.sep, 1)) for f in glob.glob('sdk/*/azure*/setup.py')})
packages = {
tuple(os.path.dirname(f).rsplit(os.sep, 1))
for f in glob.glob("sdk/*/azure*/setup.py") + glob.glob("tools/azure*/setup.py")
}
# [(base_folder, package_name), ...] to {package_name: base_folder, ...}
packages = {package_name: base_folder for (base_folder, package_name) in packages}

# keep targeted packages separate. python2 needs the nspkgs to work properly.
if not args.packageList:
targeted_packages = list(packages.keys())
else:
targeted_packages = [os.path.relpath(x.strip()) for x in args.packageList.split(',')]
targeted_packages = [
os.path.relpath(x.strip()) for x in args.packageList.split(",")
]

# Extract nspkg and sort nspkg by number of "-"
nspkg_packages = [p for p in packages.keys() if 'nspkg' in p]
nspkg_packages.sort(key = lambda x: len([c for c in x if c == '-']))
nspkg_packages = [p for p in packages.keys() if "nspkg" in p]
nspkg_packages.sort(key=lambda x: len([c for c in x if c == "-"]))

# Manually push meta-packages at the end, in reverse dependency order
meta_packages = ['azure-mgmt', 'azure']
meta_packages = ["azure-mgmt", "azure"]

content_packages = sorted([p for p in packages.keys() if p not in nspkg_packages+meta_packages and p in targeted_packages])
content_packages = sorted(
[
p
for p in packages.keys()
if p not in nspkg_packages + meta_packages and p in targeted_packages
]
)

# Put azure-common in front
if 'azure-common' in content_packages:
content_packages.remove('azure-common')
content_packages.insert(0, 'azure-common')
# Install tests dep first
if "azure-devtools" in content_packages:
content_packages.remove("azure-devtools")
content_packages.insert(0, "azure-devtools")

if 'azure-sdk-tools' in content_packages:
content_packages.remove('azure-sdk-tools')
content_packages.insert(1, 'azure-sdk-tools')
if "azure-sdk-tools" in content_packages:
content_packages.remove("azure-sdk-tools")
content_packages.insert(1, "azure-sdk-tools")

print('Running dev setup...')
print('Root directory \'{}\'\n'.format(root_dir))
# Put azure-common in front of content package
if "azure-common" in content_packages:
content_packages.remove("azure-common")
content_packages.insert(2, "azure-common")

print("Running dev setup...")
print("Root directory '{}'\n".format(root_dir))

# install private whls if there are any
privates_dir = os.path.join(root_dir, 'privates')
privates_dir = os.path.join(root_dir, "privates")
if os.path.isdir(privates_dir) and os.listdir(privates_dir):
whl_list = ' '.join([os.path.join(privates_dir, f) for f in os.listdir(privates_dir)])
pip_command('install {}'.format(whl_list))
whl_list = " ".join(
[os.path.join(privates_dir, f) for f in os.listdir(privates_dir)]
)
pip_command("install {}".format(whl_list))

# install nspkg only on py2, but in wheel mode (not editable mode)
if sys.version_info < (3, ):
if sys.version_info < (3,):
for package_name in nspkg_packages:
pip_command('install {}/{}/'.format(packages[package_name], package_name))
pip_command("install {}/{}/".format(packages[package_name], package_name))

# install packages
print("Packages to install: {}".format(content_packages))
for package_name in content_packages:
print("Installing {}".format(package_name))
print("\nInstalling {}".format(package_name))
# if we are running dev_setup with no arguments. going after dev_requirements will be a pointless exercise
# and waste of cycles as all the dependencies will be installed regardless.
if os.path.isfile('{}/{}/dev_requirements.txt'.format(packages[package_name], package_name)):
pip_command('install -r dev_requirements.txt', os.path.join(packages[package_name], package_name))
pip_command('install --ignore-requires-python -e {}'.format(os.path.join(packages[package_name], package_name)))
if os.path.isfile(
"{}/{}/dev_requirements.txt".format(packages[package_name], package_name)
):
pip_command(
"install -r dev_requirements.txt",
os.path.join(packages[package_name], package_name),
)
pip_command(
"install --ignore-requires-python -e {}".format(
os.path.join(packages[package_name], package_name)
)
)

# On Python 3, uninstall azure-nspkg if he got installed
if sys.version_info >= (3, ):
pip_command('uninstall -y azure-nspkg', error_ok=True)
if sys.version_info >= (3,):
pip_command("uninstall -y azure-nspkg", error_ok=True)

print("Finished dev setup.")

print('Finished dev setup.')
10 changes: 7 additions & 3 deletions scripts/devops_tasks/common_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ def process_glob_string(glob_string, target_root_dir):
# dedup, in case we have double coverage from the glob strings. Example: "azure-mgmt-keyvault,azure-mgmt-*"
return list(set(collected_top_level_directories))

def run_check_call(command_array, working_directory, acceptable_return_codes = []):
print('Command Array: {0}, Target Working Directory: {1}'.format(command_array, working_directory))
def run_check_call(command_array, working_directory, acceptable_return_codes = [], run_as_shell = False):
try:
check_call(command_array, cwd = working_directory)
if run_as_shell:
print('Command Array: {0}, Target Working Directory: {1}'.format(' '.join(command_array), working_directory))
check_call(' '.join(command_array), cwd = working_directory, shell = True)
else:
print('Command Array: {0}, Target Working Directory: {1}'.format(command_array, working_directory))
check_call(command_array, cwd = working_directory)
except CalledProcessError as err:
if err.returncode not in acceptable_return_codes:
print(err) #, file = sys.stderr
Expand Down
2 changes: 1 addition & 1 deletion scripts/devops_tasks/setup_execute_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def prep_and_run_tests(targeted_packages, python_version, test_res):
command_array = [python_version, '-m', 'pytest']
command_array.extend(test_res)
command_array.extend(targeted_packages)
run_check_call(command_array, root_dir, ALLOWED_RETURN_CODES)
run_check_call(command_array, root_dir, ALLOWED_RETURN_CODES, True)

if __name__ == '__main__':
parser = argparse.ArgumentParser(description = 'Install Dependencies, Install Packages, Test Azure Packages, Called from DevOps YAML Pipeline')
Expand Down
Loading