Skip to content

Commit 527ec28

Browse files
committed
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python into move_get_client_for
* 'master' of https://github.com/Azure/azure-sdk-for-python: [Cosmos] Remove unused files (#11388) Sync eng/common directory with azure-sdk-tools repository (#11417) [form recognizer] consistency renames for FormTrainingClient (#11390) Release for azure mgmt eventhub (#11403) Network 2020 04 01 (#11405) link in to reference docs for sub-clients (#11396) Persistent caching for interactive credentials on Linux and macOS (#11319) [formrecognizer] add AAD auth support (#11275) Search docs/readme updates (#11391) Sync eng/common directory with azure-sdk-tools repository (#11387) Update tests for msal 1.3.0 (#11307)
2 parents b06c979 + e2e5295 commit 527ec28

File tree

214 files changed

+92497
-5291
lines changed

Some content is hidden

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

214 files changed

+92497
-5291
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Template for all Python Scripts in this repository
2+
parameters:
3+
OSVmImage: $(OSVmImage)
4+
5+
steps:
6+
- task: PythonScript@0
7+
displayName: Verify Agent OS
8+
inputs:
9+
scriptSource: inline
10+
script: |
11+
# Script verifies the operating system for the platform on which it is being run
12+
# Used in build pipelines to verify the build agent os
13+
# Variable: The friendly name or image name of the os to verfy against
14+
from __future__ import print_function
15+
import sys
16+
import platform
17+
18+
os_parameter = "${{ parameters.OSVmImage }}".lower()
19+
if os_parameter.startswith('mac') or os_parameter.startswith('darwin'):
20+
os_parameter = 'macOS'
21+
elif os_parameter.startswith('ubuntu') or os_parameter.startswith('linux'):
22+
os_parameter = 'Linux'
23+
elif os_parameter.startswith('vs') or os_parameter.startswith('win'):
24+
os_parameter = 'Windows'
25+
else:
26+
raise Exception('Variable OSVmImage is empty or has an unexpected value [${{ parameters.OSVmImage }}]')
27+
28+
29+
print("Job requested to run on OS: %s" % (os_parameter))
30+
31+
agent_os = platform.system()
32+
agent_os = 'macOS' if agent_os == 'Darwin' else agent_os
33+
34+
if (agent_os.lower() == os_parameter.lower()):
35+
print('Job ran on OS: %s' % (agent_os))
36+
print('##vso[task.setvariable variable=OSName]%s' % (agent_os))
37+
else:
38+
raise Exception('Job ran on the wrong OS: %s' % (agent_os))

eng/common/scripts/artifact-metadata-parsing.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function IsMavenPackageVersionPublished($pkgId, $pkgVersion, $groupId) {
113113
try {
114114

115115
$uri = "https://oss.sonatype.org/content/repositories/releases/$groupId/$pkgId/$pkgVersion/$pkgId-$pkgVersion.pom"
116-
$pomContent = Invoke-WebRequest-WithHandling -Method "GET" -url $uri
116+
$pomContent = Invoke-RestMethod -MaximumRetryCount 3 -Method "GET" -uri $uri
117117

118118
if ($pomContent -ne $null -or $pomContent.Length -eq 0) {
119119
return $true
@@ -239,7 +239,7 @@ function IsNugetPackageVersionPublished($pkgId, $pkgVersion) {
239239
$nugetUri = "https://api.nuget.org/v3-flatcontainer/$($pkgId.ToLowerInvariant())/index.json"
240240

241241
try {
242-
$nugetVersions = Invoke-WebRequest-WithHandling -url $nugetUri -Method "GET"
242+
$nugetVersions = Invoke-RestMethod -MaximumRetryCount 3 -uri $nugetUri -Method "GET"
243243

244244
return $nugetVersions.versions.Contains($pkgVersion)
245245
}
@@ -314,7 +314,7 @@ function ParseCArtifact($pkg, $workingDirectory) {
314314
# Returns the pypi publish status of a package id and version.
315315
function IsPythonPackageVersionPublished($pkgId, $pkgVersion) {
316316
try {
317-
$existingVersion = (Invoke-WebRequest-WithHandling -Method "Get" -url "https://pypi.org/pypi/$pkgId/$pkgVersion/json").info.version
317+
$existingVersion = (Invoke-RestMethod -MaximumRetryCount 3 -Method "Get" -uri "https://pypi.org/pypi/$pkgId/$pkgVersion/json").info.version
318318

319319
# if existingVersion exists, then it's already been published
320320
return $True

sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py

Lines changed: 0 additions & 129 deletions
This file was deleted.

sdk/cosmos/azure-cosmos/azure/cosmos/_hash_partition_resolver.py

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)