Skip to content

Commit

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

* 'master' of https://github.com/Azure/azure-sdk-for-python: (68 commits)
  Pin Deps in "TestOldest" Regression (Azure#14316)
  Sync eng/common directory with azure-sdk-tools for PR 1052 (Azure#14232)
  [Storage][FileShare]Regenerate code for file tier (Azure#14302)
  [ServiceBus] ServiceBus Operation Timeout Support (Azure#13854)
  Increment package version after release of azure_data_tables (Azure#14309)
  Increment version for textanalytics releases (Azure#14295)
  [formrecognizer] add locale to receipt samples (Azure#14292)
  [form recognizer] add sample business cards to test forms (Azure#14303)
  add back code (Azure#14289)
  update release date (Azure#14291)
  Increment version for search releases (Azure#14290)
  Update Changelog for communication packages (Azure#14268)
  Changelog for azure-identity 1.5.0b2 (Azure#14288)
  [text analytics] changelog add release date, fix wording (Azure#14286)
  Computer Vision 0.7.0 release (Azure#14269)
  SetDevVersion Is Triggering Oddly (Azure#14261)
  Revise get_token docs (Azure#14263)
  Increment version for servicebus releases (Azure#14265)
  redo the dep update (Azure#14264)
  [EventGrid] Prepare for beta3 release (Azure#14262)
  ...
  • Loading branch information
iscai-msft committed Oct 7, 2020
2 parents 10c6917 + a56ef3e commit 5228c2d
Show file tree
Hide file tree
Showing 1,081 changed files with 130,060 additions and 18,059 deletions.
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
# PRLabel: %Storage
/sdk/storage/ @amishra-dev @zezha-msft @annatisch @rakshith91 @xiafu-msft @tasherif-msft @kasobol-msft

# PRLabel: %App Configuration
/sdk/appconfiguration/ @xiangyan99

/sdk/applicationinsights/azure-applicationinsights/ @divya-jay @geneh @alongafni
/sdk/loganalytics/azure-loganalytics/ @divya-jay @geneh @alongafni

Expand All @@ -33,7 +36,7 @@
/sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish

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

# PRLabel: %KeyVault
/sdk/keyvault/ @schaabs @chlowell @iscai-msft
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Last stable versions of packages that have been provided for usage with Azure an

### Management: New Releases
A new set of management libraries that follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/) are now available. These new libraries provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more.
Documentation and code samples for these new libraries can be found [here](http://aka.ms/azsdk/python/mgmt). In addition, a migration guide that shows how to transition from older versions of libraries is located [here](https://azure.github.io/azure-sdk-for-python/mgmt_preview_quickstart.html#migration-guide).
Documentation and code samples for these new libraries can be found [here](http://aka.ms/azsdk/python/mgmt). In addition, a migration guide that shows how to transition from older versions of libraries is located [here](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/sphinx/mgmt_quickstart.rst#migration-guide).

You can find the [most up to date list of all of the new packages on our page](https://azure.github.io/azure-sdk/releases/latest/mgmt/python.html)

Expand Down
1 change: 1 addition & 0 deletions eng/ci_tools.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# requirements leveraged by ci tools
cryptography==3.1
setuptools==44.1.0; python_version == '2.7'
setuptools==46.4.0; python_version >= '3.5'
virtualenv==20.0.23
Expand Down
14 changes: 10 additions & 4 deletions eng/common/pipelines/templates/steps/create-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ parameters:
GHTeamReviewersVariable: ''
# Multiple labels seperated by comma, e.g. "bug, APIView"
PRLabels: ''
SkipCheckingForChanges: false

steps:

Expand All @@ -35,15 +36,19 @@ steps:
echo "##vso[task.setvariable variable=HasChanges]$false"
echo "No changes so skipping code push"
}
displayName: Check for changes
condition: and(succeeded(), eq(${{ parameters.SkipCheckingForChanges }}, false))
workingDirectory: ${{ parameters.WorkingDirectory }}
ignoreLASTEXITCODE: true

- pwsh: |
# Remove the repo owner from the front of the repo name if it exists there
$repoName = "${{ parameters.RepoName }}" -replace "^${{ parameters.RepoOwner }}/", ""
echo "##vso[task.setvariable variable=RepoNameWithoutOwner]$repoName"
echo "RepoName = $repName"
displayName: Check for changes
echo "RepoName = $repoName"
displayName: Remove Repo Owner from Repo Name
condition: succeeded()
workingDirectory: ${{ parameters.WorkingDirectory }}
ignoreLASTEXITCODE: true

- task: PowerShell@2
displayName: Push changes
Expand All @@ -57,6 +62,7 @@ steps:
-CommitMsg "${{ parameters.CommitMsg }}"
-GitUrl "https://$(azuresdk-github-pat)@github.com/${{ parameters.PROwner }}/$(RepoNameWithoutOwner).git"
-PushArgs "${{ parameters.PushArgs }}"
-SkipCommit $${{parameters.SkipCheckingForChanges}}
- task: PowerShell@2
displayName: Create pull request
Expand Down
53 changes: 53 additions & 0 deletions eng/common/scripts/Add-Issue-Comment.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[CmdletBinding(SupportsShouldProcess = $true)]
param(
[Parameter(Mandatory = $true)]
[string]$RepoOwner,

[Parameter(Mandatory = $true)]
[string]$RepoName,

[Parameter(Mandatory = $true)]
[string]$IssueNumber,

[Parameter(Mandatory = $false)]
[string]$CommentPrefix,

[Parameter(Mandatory = $true)]
[string]$Comment,

[Parameter(Mandatory = $false)]
[string]$CommentPostFix,

[Parameter(Mandatory = $true)]
[string]$AuthToken
)

. "${PSScriptRoot}\logging.ps1"

$headers = @{
Authorization = "bearer $AuthToken"
}

$apiUrl = "https://api.github.com/repos/$RepoOwner/$RepoName/issues/$IssueNumber/comments"

$commentPrefixValue = [System.Environment]::GetEnvironmentVariable($CommentPrefix)
$commentValue = [System.Environment]::GetEnvironmentVariable($Comment)
$commentPostFixValue = [System.Environment]::GetEnvironmentVariable($CommentPostFix)

if (!$commentPrefixValue) { $commentPrefixValue = $CommentPrefix }
if (!$commentValue) { $commentValue = $Comment }
if (!$commentPostFixValue) { $commentPostFixValue = $CommentPostFix }

$PRComment = "$commentPrefixValue $commentValue $commentPostFixValue"

$data = @{
body = $PRComment
}

try {
$resp = Invoke-RestMethod -Method POST -Headers $headers -Uri $apiUrl -Body ($data | ConvertTo-Json)
}
catch {
LogError "Invoke-RestMethod [ $apiUrl ] failed with exception:`n$_"
exit 1
}
62 changes: 62 additions & 0 deletions eng/common/scripts/New-ReleaseAsset.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<#
.SYNOPSIS
Uploads the release asset and returns the resulting object from the upload
.PARAMETER ReleaseTag
Tag to look up release
.PARAMETER AssetPath
Location of the asset file to upload
.PARAMETER GitHubRepo
Name of the GitHub repo to search (of the form Azure/azure-sdk-for-cpp)
#>

param (
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string] $ReleaseTag,

[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string] $AssetPath,

[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string] $GitHubRepo,

[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string] $GitHubPat
)

# Get information about release at $ReleaseTag
$releaseInfoUrl = "https://api.github.com/repos/$GitHubRepo/releases/tags/$ReleaseTag"
Write-Verbose "Requesting release info from $releaseInfoUrl"
$release = Invoke-RestMethod `
-Uri $releaseInfoUrl `
-Method GET

$assetFilename = Split-Path $AssetPath -Leaf

# Upload URL comes in the literal form (yes, those curly braces) of:
# https://uploads.github.com/repos/Azure/azure-sdk-for-cpp/releases/123/assets{?name,label}
# Converts to something like:
# https://uploads.github.com/repos/Azure/azure-sdk-for-cpp/releases/123/assets?name=foo.tar.gz
# Docs: https://docs.github.com/en/rest/reference/repos#get-a-release-by-tag-name
$uploadUrl = $release.upload_url.Split('{')[0] + "?name=$assetFilename"

Write-Verbose "Uploading $assetFilename to $uploadUrl"

$asset = Invoke-RestMethod `
-Uri $uploadUrl `
-Method POST `
-InFile $AssetPath `
-Credential $credentials `
-Headers @{ Authorization = "token $GitHubPat" } `
-ContentType "application/gzip"

Write-Verbose "Upload complete. Browser download URL: $($asset.browser_download_url)"

return $asset
56 changes: 56 additions & 0 deletions eng/common/scripts/Queue-Pipeline.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[CmdletBinding(SupportsShouldProcess = $true)]
param(
[Parameter(Mandatory = $true)]
[string]$Organization,

[Parameter(Mandatory = $true)]
[string]$Project,

[Parameter(Mandatory = $true)]
[string]$SourceBranch,

[Parameter(Mandatory = $true)]
[int]$DefinitionId,

[Parameter(Mandatory = $false)]
[string]$VsoQueuedPipelines,

[Parameter(Mandatory = $true)]
[string]$AuthToken
)

. "${PSScriptRoot}\logging.ps1"

$headers = @{
Authorization = "Basic $AuthToken"
}

$apiUrl = "https://dev.azure.com/$Organization/$Project/_apis/build/builds?api-version=6.0"

$body = @{
sourceBranch = $SourceBranch
definition = @{ id = $DefinitionId }
}

Write-Verbose ($body | ConvertTo-Json)

try {
$resp = Invoke-RestMethod -Method POST -Headers $headers $apiUrl -Body ($body | ConvertTo-Json) -ContentType application/json
}
catch {
LogError "Invoke-RestMethod [ $apiUrl ] failed with exception:`n$_"
exit 1
}

LogDebug "Pipeline [ $($resp.definition.name) ] queued at [ $($resp._links.web.href) ]"

if ($VsoQueuedPipelines) {
$enVarValue = [System.Environment]::GetEnvironmentVariable($VsoQueuedPipelines)
$QueuedPipelineLinks = if ($enVarValue) {
"$enVarValue<br>[$($resp.definition.name)]($($resp._links.web.href))"
}else {
"[$($resp.definition.name)]($($resp._links.web.href))"
}
$QueuedPipelineLinks
Write-Host "##vso[task.setvariable variable=$VsoQueuedPipelines]$QueuedPipelineLinks"
}
22 changes: 15 additions & 7 deletions eng/common/scripts/git-branch-push.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ param(
[string] $GitUrl,

[Parameter(Mandatory = $false)]
[string] $PushArgs = ""
[string] $PushArgs = "",

[Parameter(Mandatory = $false)]
[boolean] $SkipCommit = $false
)

# This is necessay because of the janky git command output writing to stderr.
Expand Down Expand Up @@ -57,12 +60,17 @@ if ($LASTEXITCODE -ne 0)
exit $LASTEXITCODE
}

Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"[email protected]`" commit -am `"$($CommitMsg)`""
git -c user.name="azure-sdk" -c user.email="[email protected]" commit -am "$($CommitMsg)"
if ($LASTEXITCODE -ne 0)
{
Write-Error "Unable to add files and create commit LASTEXITCODE=$($LASTEXITCODE), see command output above."
exit $LASTEXITCODE
if (!$SkipCommit) {
Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"[email protected]`" commit -am `"$($CommitMsg)`""
git -c user.name="azure-sdk" -c user.email="[email protected]" commit -am "$($CommitMsg)"
if ($LASTEXITCODE -ne 0)
{
Write-Error "Unable to add files and create commit LASTEXITCODE=$($LASTEXITCODE), see command output above."
exit $LASTEXITCODE
}
}
else {
Write-Host "Skipped applying commit"
}

# The number of retries can be increased if necessary. In theory, the number of retries
Expand Down
1 change: 0 additions & 1 deletion eng/common/scripts/modules/ChangeLog-Operations.psm1
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Common Changelog Operations

$RELEASE_TITLE_REGEX = "(?<releaseNoteTitle>^\#+.*(?<version>\b\d+\.\d+\.\d+([^0-9\s][^\s:]+)?)(\s(?<releaseStatus>\(Unreleased\)|\(\d{4}-\d{2}-\d{2}\)))?)"

# Returns a Collection of changeLogEntry object containing changelog info for all version present in the gived CHANGELOG
Expand Down
1 change: 1 addition & 0 deletions eng/common/scripts/modules/Package-Properties.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This Files has been retired
# Helper functions for retireving useful information from azure-sdk-for-* repo
# Example Use : Import-Module .\eng\common\scripts\modules
class PackageProps
Expand Down
3 changes: 2 additions & 1 deletion eng/ignore-links.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
https://docs.microsoft.com/python/api/overview/azure/{{package_doc_id}}
https://docs.microsoft.com/python/api/overview/azure/{{package_doc_id}}
https://pypi.org/project/azure-servicebus/7.0.0b7/
10 changes: 9 additions & 1 deletion eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,15 @@ jobs:
pool:
vmImage: '$(OSVmImage)'

steps:
steps:
- task: PowerShell@2
displayName: Prep template pipeline for release
condition: and(succeeded(),eq(variables['TestPipeline'],'true'))
inputs:
pwsh: true
workingDirectory: $(Build.SourcesDirectory)
filePath: eng/scripts/SetTestPipelineVersion.ps1

- pwsh: |
$toxenvvar = "whl,sdist"
if (('$(Build.Reason)' -eq 'Schedule') -and ('$(System.TeamProject)' -eq 'internal')) {
Expand Down
7 changes: 7 additions & 0 deletions eng/pipelines/templates/stages/archetype-python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ stages:
deploy:
steps:
- checkout: self
- task: PowerShell@2
displayName: Prep template pipeline for release
condition: and(succeeded(),eq(variables['TestPipeline'],'true'))
inputs:
pwsh: true
workingDirectory: $(Build.SourcesDirectory)
filePath: eng/scripts/SetTestPipelineVersion.ps1
- template: /eng/pipelines/templates/steps/stage-filtered-artifacts.yml
parameters:
SourceFolder: ${{parameters.ArtifactName}}
Expand Down
8 changes: 8 additions & 0 deletions eng/pipelines/templates/steps/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ parameters:
BuildDocs: true

steps:
- task: PowerShell@2
displayName: Prep template pipeline for release
condition: and(succeeded(),eq(variables['TestPipeline'],'true'))
inputs:
pwsh: true
workingDirectory: $(Build.SourcesDirectory)
filePath: eng/scripts/SetTestPipelineVersion.ps1

- script: |
echo "##vso[build.addbuildtag]Scheduled"
displayName: 'Tag scheduled builds'
Expand Down
11 changes: 11 additions & 0 deletions eng/pipelines/templates/steps/test_regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ parameters:
BuildTargetingString: 'azure-*'
ServiceDirectory: ''
BuildStagingDirectory: $(Build.ArtifactStagingDirectory)
DevFeedName: 'public/azure-sdk-for-python'

steps:
- task: UsePythonVersion@0
Expand All @@ -18,6 +19,16 @@ steps:
pip install -r eng/ci_tools.txt
displayName: 'Prep Environment'
- template: ../steps/set-dev-build.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}

- ${{if eq(variables['System.TeamProject'], 'internal') }}:
- template: ../steps/auth-dev-feed.yml
parameters:
DevFeedName: ${{ parameters.DevFeedName }}

- task: PythonScript@0
displayName: 'Test Latest Released Dependents'
inputs:
Expand Down
Loading

0 comments on commit 5228c2d

Please sign in to comment.