Skip to content

Commit a8c6499

Browse files
tanyasethi-msftRickWinterchlowellazure-sdksouravgupta-msft
authored
[azdatalake][STG84] Append with flush (#22245)
* Update package versions (#22201) * Update package versions * upgrade to MSAL v1.2.1 * add token_type to fake tokens * revert debugging --------- Co-authored-by: Charles Lowell <10964656+chlowell@users.noreply.github.com> * Increment package version after release of messaging/azeventgrid (#22060) * Increment package version after release of ai/azopenai (#22126) * azblob: STG91 upgrade (#22194) * azfile: STG91 upgrade (#22193) * update source link to new azopenai location (#22208) * link current instead of depricated path * remove newline at end of file * More azappconfig cleanup (#22209) * More azappconfig cleanup Update BeginCreateSnapshot to return the complete Snapshot type. Remove unused response types. Added some missed error checking in a few tests. * fix a few doc comments * Fix spelling (preceeding=> preceding) (#22202) Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> * Storage: Reject HTTP endpoints (#22183) * [azeventhubs] Fixing an issue where a processor wouldn't grab partitions (#22153) The processor load balancer had a bug where a processor would not claim partitions even if it didn't yet have the proper share. Added in stress tests (balance, multibalance) to run several scenarios with our supported strategies and different parallel owners. Fixes #22097 * Clean up ETags in azappconfig (#22212) Use azcore.ETag instead of string for public surface area. Add doc comments for non-standard ETag option names. * [azopenai] Fixing issue where you can't use whisper with m4a files. (#22210) Fixing issue where you can't use whisper with m4a files. * It's one of the formats that doesn't seem to be recognized without an explicit file extension, which you can pass via Filename * My tests were too heavily dependent on implementation details of the models. Changing this out to check that things are working correctly without checking the exact contents of the response. * Also, rerecorded tests since we're doing multiple audio tests as well. Fixes #22195 * Updating changelog for STG91 preview (#22216) * azfile: STG 91 Preview (#22217) * Increment package version after release of storage/azblob (#22219) * [azopenai] Update changelog for release. (#22215) * Replace string with azcore.ETag (#22218) Missed one in last round of clean-up. * Add script to go mod tidy modules (#22214) Will tidy all modules under the current working directory or under the specified directory. * Increment package version after release of storage/azfile (#22220) * Added Simon and Kushagra as code owners on GO Cosmos SDK (#22221) * [azservicebus] Updating batching to allow for a configurable wait time (#22154) Updating batching to allow for a configurable wait time. Can lead to fuller batches for people that want to tune it. Fixes #19172 * Sync eng/common directory with azure-sdk-tools for PR 7459 (#22222) * check for the presence of a compatible powershell. ensure that we always return a list of tags * allow the script to require pshell6+ * remove the en-us from the link --------- Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com> * Fix image tag for multiimage deployments (#22224) Co-authored-by: Liudmila Molkova <limolkova@microsoft.com> * Refresh azcontainerregistry module (#22161) * upgrade to latest codegen * merge resolver * enable span and add changelog * update module name * fix generator tool (#22205) * fix generator tool * gofmt * fix * goimports * azdatalake preview stg82 * azdatalake preview stg82 (#22227) * Rename azidentity/cache pipeline (#22231) * Handle errors in mod tidy script (#22234) * Sync eng/common directory with azure-sdk-tools for PR 7445 (#22233) * Add package filter parameter to select recursively found packages in release * Handle empty value for packageFilter --------- Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> * Use package filter to prevent recursive package publish (#22232) * append with flush --------- Co-authored-by: Rick Winter <rick.winter@microsoft.com> Co-authored-by: Charles Lowell <10964656+chlowell@users.noreply.github.com> Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: Sourav Gupta <98318303+souravgupta-msft@users.noreply.github.com> Co-authored-by: Felix <9039899+fkarg@users.noreply.github.com> Co-authored-by: Joel Hendrix <jhendrix@microsoft.com> Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Co-authored-by: Richard Park <51494936+richardpark-msft@users.noreply.github.com> Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com> Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com> Co-authored-by: Liudmila Molkova <limolkova@microsoft.com> Co-authored-by: Chenjie Shi <tadelesh.shi@live.cn> Co-authored-by: Peng Jiahui <46921893+Alancere@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
1 parent 0d997dd commit a8c6499

159 files changed

Lines changed: 5819 additions & 3118 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/sdk/data/azappconfig/ @antkmsft @jhendrixMSFT @rickwinter
2929

3030
# PRLabel: %Cosmos
31-
/sdk/data/azcosmos/ @ealsur @kirankumarkolli
31+
/sdk/data/azcosmos/ @ealsur @kirankumarkolli @simorenoh @kushagraThapar
3232

3333
# PRLabel: %Tables
3434
/sdk/data/aztables/ @jhendrixMSFT

eng/common/pipelines/templates/steps/create-tags-and-git-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
parameters:
22
ArtifactLocation: 'not-specified'
33
PackageRepository: 'not-specified'
4+
PackageFilter: ''
45
ReleaseSha: 'not-specified'
56
RepoId: $(Build.Repository.Name)
67
WorkingDirectory: ''
@@ -14,10 +15,11 @@ steps:
1415
arguments: >
1516
-artifactLocation ${{ parameters.ArtifactLocation }}
1617
-packageRepository ${{ parameters.PackageRepository }}
18+
-packageFilter "${{ parameters.PackageFilter }}"
1719
-releaseSha ${{ parameters.ReleaseSha }}
1820
-repoId ${{ parameters.RepoId }}
1921
-workingDirectory '${{ parameters.WorkingDirectory }}'
2022
pwsh: true
2123
timeoutInMinutes: 5
2224
env:
23-
GH_TOKEN: $(azuresdk-github-pat)
25+
GH_TOKEN: $(azuresdk-github-pat)

eng/common/scripts/Submit-PullRequest.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ The body message for the pull request.
2323
The labels added to the PRs. Multple labels seperated by comma, e.g "bug, service"
2424
.PARAMETER UserReviewers
2525
User reviewers to request after opening the PR. Users should be a comma-
26-
separated list with no preceeding `@` symbol (e.g. "user1,usertwo,user3")
26+
separated list with no preceding `@` symbol (e.g. "user1,usertwo,user3")
2727
.PARAMETER TeamReviewers
2828
List of github teams to add as reviewers
2929
.PARAMETER Assignees
3030
Users to assign to the PR after opening. Users should be a comma-separated list
31-
with no preceeding `@` symbol (e.g. "user1,usertwo,user3")
31+
with no preceding `@` symbol (e.g. "user1,usertwo,user3")
3232
.PARAMETER CloseAfterOpenForTesting
3333
Close the PR after opening to save on CI resources and prevent alerts to code
3434
owners, assignees, requested reviewers, or others.

eng/common/scripts/create-tags-and-git-release.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ param (
77
$artifactLocation, # the root of the artifact folder. DevOps $(System.ArtifactsDirectory)
88
$workingDirectory, # directory that package artifacts will be extracted into for examination (if necessary)
99
$packageRepository, # used to indicate destination against which we will check the existing version.
10+
$packageFilter,
1011
# valid options: PyPI, Nuget, NPM, Maven, C, CPP
1112
# used by CreateTags
1213
$releaseSha, # the SHA for the artifacts. DevOps: $(Release.Artifacts.<artifactAlias>.SourceVersion) or $(Build.SourceVersion)
@@ -26,6 +27,11 @@ Write-Host "Using API URL $apiUrl"
2627
# VERIFY PACKAGES
2728
$pkgList = VerifyPackages -artifactLocation $artifactLocation -workingDirectory $workingDirectory -apiUrl $apiUrl -releaseSha $releaseSha -continueOnError $continueOnError
2829

30+
if ($packageFilter) {
31+
Write-Host "Filtering discovered packages to '$packageFilter'"
32+
[array]$pkgList = $pkgList | Where-Object { $_.PackageId -like $packageFilter }
33+
}
34+
2935
if ($pkgList) {
3036
Write-Host "Given the visible artifacts, github releases will be created for the following:"
3137

eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ function DeployStressPackage(
257257
if ($pkg.Dockerfile -or $pkg.DockerBuildDir) {
258258
throw "The chart.yaml docker config is deprecated, please use the scenarios matrix instead."
259259
}
260-
260+
261261

262262
foreach ($dockerBuildConfig in $dockerBuildConfigs) {
263263
$dockerFilePath = $dockerBuildConfig.dockerFilePath
@@ -285,7 +285,7 @@ function DeployStressPackage(
285285
$dockerBuildCmd += $dockerBuildFolder
286286

287287
Run @dockerBuildCmd
288-
288+
289289
Write-Host "`nContainer image '$imageTag' successfully built. To run commands on the container locally:" -ForegroundColor Blue
290290
Write-Host " docker run -it $imageTag" -ForegroundColor DarkBlue
291291
Write-Host " docker run -it $imageTag <shell, e.g. 'bash' 'pwsh' 'sh'>" -ForegroundColor DarkBlue
@@ -302,7 +302,7 @@ function DeployStressPackage(
302302
}
303303
}
304304
$generatedHelmValues.scenarios = @( foreach ($scenario in $generatedHelmValues.scenarios) {
305-
$dockerPath = if ("image" -notin $scenario) {
305+
$dockerPath = if ("image" -notin $scenario.keys) {
306306
$dockerFilePath
307307
} else {
308308
Join-Path $pkg.Directory $scenario.image
@@ -476,7 +476,7 @@ function generateRetryTestsHelmValues ($pkg, $releaseName, $generatedHelmValues)
476476
$failedJobsScenario += $job.split("-$($pkg.ReleaseName)")[0]
477477
}
478478
}
479-
479+
480480
$releaseName = "$($pkg.ReleaseName)-$revision-retry"
481481

482482
$retryTestsHelmVal = @{"scenarios"=@()}

eng/common/testproxy/scripts/tag-merge/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This script merely allows the abstraction of some of this "combination" work.
1111

1212
### PreReqs
1313

14+
- Must have []`pshell 6+`](https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-windows)
1415
- Must have `git` available on your PATH
1516
- Must have the `test-proxy` available on your PATH
1617
- `test-proxy` is honored when the proxy is installed as a `dotnet tool`

eng/common/testproxy/scripts/tag-merge/merge-proxy-tags.ps1

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#Requires -Version 6.0
2+
#Requires -PSEdition Core
3+
14
<#
25
.SYNOPSIS
36
Merge multiple asset tagss worth of content into a single asset tag.
@@ -66,9 +69,6 @@ function Git-Command($CommandString, $WorkingDirectory, $HardExit=$true) {
6669
}
6770

6871
function Resolve-Proxy {
69-
# this script requires the presence of git
70-
Test-Exe-In-Path -ExeToLookFor "git" | Out-Null
71-
7272
$testProxyExe = "test-proxy"
7373
# this script requires the presence of the test-proxy on the PATH
7474
$proxyToolPresent = Test-Exe-In-Path -ExeToLookFor "test-proxy" -ExitOnError $false
@@ -184,7 +184,13 @@ function Start-Message($AssetsJson, $TargetTags, $AssetsRepoLocation, $MountDire
184184
function Finish-Message($AssetsJson, $TargetTags, $AssetsRepoLocation, $MountDirectory) {
185185
$len = $TargetTags.Length
186186

187-
Write-Host "`nSuccessfully combined $len tags. Invoke `"test-proxy push " -NoNewLine
187+
if ($TargetTags.GetType().Name -eq "String") {
188+
$len = 1
189+
}
190+
191+
$suffix = if ($len -gt 1) { "s" } else { "" }
192+
193+
Write-Host "`nSuccessfully combined $len tag$suffix. Invoke `"test-proxy push " -NoNewLine
188194
Write-Host $AssetsJson -ForegroundColor Green -NoNewLine
189195
Write-Host "`" to push the results as a new tag."
190196
}
@@ -270,12 +276,22 @@ function Combine-Tags($RemainingTags, $AssetsRepoLocation, $MountDirectory){
270276
# if we have successfully gotten to the end without any non-zero exit codes...delete the mergeprogress file, we're g2g
271277
Cleanup-Incomplete-Progress $MountDirectory
272278

273-
return $pushedTags
279+
return @($pushedTags)
274280
}
275281

276282
$ErrorActionPreference = "Stop"
277283

278-
# resolve the proxy location so that we can invoke it easily
284+
# this script requires the presence of git
285+
Test-Exe-In-Path -ExeToLookFor "git" | Out-Null
286+
287+
# this script expects at least powershell 6 (core)
288+
289+
if ($PSVersionTable["PSVersion"].Major -lt 6) {
290+
Write-Error "This script requires a version of powershell newer than 6. See http://aka.ms/powershell for resolution."
291+
exit 1
292+
}
293+
294+
# resolve the proxy location so that we can invoke it easily, if not present we exit here.
279295
$proxyExe = Resolve-Proxy
280296

281297
$AssetsJson = Resolve-Path $AssetsJson

eng/pipelines/templates/jobs/archetype-go-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ stages:
7474
- template: /eng/common/pipelines/templates/steps/create-tags-and-git-release.yml
7575
parameters:
7676
ArtifactLocation: $(Build.SourcesDirectory)/sdk/${{ parameters.ServiceDirectory }}
77+
PackageFilter: sdk/${{ parameters.ServiceDirectory }}
7778
ReleaseSha: $(Build.SourceVersion)
7879
RepoId: Azure/azure-sdk-for-go
7980
WorkingDirectory: $(System.DefaultWorkingDirectory)
80-
81+
8182
- ${{ if not(and(startsWith(parameters.ServiceDirectory, 'resourcemanager'), ne(parameters.ServiceDirectory, 'resourcemanager/internal'))) }}:
8283
- deployment: UpdatePackageVersion
8384
displayName: "Update Package Version"

eng/scripts/modtidy.ps1

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Param(
2+
[string]$searchPath = $PWD.Path
3+
)
4+
5+
$modFiles = Get-ChildItem -Path $searchPath -Include "go.mod" -Recurse
6+
7+
$tidyErrors = $modFiles | ForEach-Object -Parallel {
8+
Set-Location $_.Directory
9+
Write-Host (Get-Location)
10+
$output = go mod tidy 2>&1
11+
if ($LASTEXITCODE) {
12+
return @{ Directory = $_.Directory; Output = $output }
13+
}
14+
}
15+
16+
if ($tidyErrors) {
17+
Write-Error "Encountered the following tidy failures:" -ErrorAction 'Continue'
18+
foreach ($err in $tidyErrors) {
19+
Write-Host "=== $($err.Directory) ==="
20+
$err.Output
21+
}
22+
exit 1
23+
}

eng/tools/generator/cmd/v2/common/fileProcessor.go

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package common
55

66
import (
77
"bytes"
8+
"errors"
89
"fmt"
910
"io/fs"
1011
"io/ioutil"
@@ -543,11 +544,9 @@ func replaceModuleImport(path, rpName, namespaceName, previousVersion, currentVe
543544
if err != nil {
544545
return err
545546
}
546-
547547
if info.IsDir() {
548548
return nil
549549
}
550-
551550
suffix := false
552551
for i := 0; i < len(suffixes) && !suffix; i++ {
553552
suffix = strings.HasSuffix(info.Name(), suffixes[i])
@@ -566,11 +565,25 @@ func replaceModuleImport(path, rpName, namespaceName, previousVersion, currentVe
566565
}
567566
}
568567
}
569-
570568
return nil
571569
})
572570
}
573571

572+
func getModuleVersion(autorestPath string) (*semver.Version, error) {
573+
data, err := os.ReadFile(autorestPath)
574+
if err != nil {
575+
return nil, err
576+
}
577+
578+
for _, line := range strings.Split(string(data), "\n") {
579+
if strings.HasPrefix(line, autorest_md_module_version_prefix) {
580+
return semver.NewVersion(strings.TrimSpace(line[len(autorest_md_module_version_prefix):]))
581+
}
582+
}
583+
584+
return nil, errors.New("module-version does not exist in autorest.md")
585+
}
586+
574587
func existSuffixFile(path, suffix string) bool {
575588

576589
existed := false

0 commit comments

Comments
 (0)