Skip to content

Commit

Permalink
[azdatalake][STG84] Append with flush (#22245)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* 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 <[email protected]>

* 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) <[email protected]>

* Fix image tag for multiimage deployments (#22224)

Co-authored-by: Liudmila Molkova <[email protected]>

* 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 <[email protected]>

* Use package filter to prevent recursive package publish (#22232)

* append with flush

---------

Co-authored-by: Rick Winter <[email protected]>
Co-authored-by: Charles Lowell <[email protected]>
Co-authored-by: Azure SDK Bot <[email protected]>
Co-authored-by: Sourav Gupta <[email protected]>
Co-authored-by: Felix <[email protected]>
Co-authored-by: Joel Hendrix <[email protected]>
Co-authored-by: Anton Kolesnyk <[email protected]>
Co-authored-by: Richard Park <[email protected]>
Co-authored-by: Kushagra Thapar <[email protected]>
Co-authored-by: Scott Beddall (from Dev Box) <[email protected]>
Co-authored-by: Liudmila Molkova <[email protected]>
Co-authored-by: Chenjie Shi <[email protected]>
Co-authored-by: Peng Jiahui <[email protected]>
Co-authored-by: Ben Broderick Phillips <[email protected]>
  • Loading branch information
15 people authored Jan 17, 2024
1 parent 0d997dd commit a8c6499
Show file tree
Hide file tree
Showing 159 changed files with 5,819 additions and 3,118 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/sdk/data/azappconfig/ @antkmsft @jhendrixMSFT @rickwinter

# PRLabel: %Cosmos
/sdk/data/azcosmos/ @ealsur @kirankumarkolli
/sdk/data/azcosmos/ @ealsur @kirankumarkolli @simorenoh @kushagraThapar

# PRLabel: %Tables
/sdk/data/aztables/ @jhendrixMSFT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parameters:
ArtifactLocation: 'not-specified'
PackageRepository: 'not-specified'
PackageFilter: ''
ReleaseSha: 'not-specified'
RepoId: $(Build.Repository.Name)
WorkingDirectory: ''
Expand All @@ -14,10 +15,11 @@ steps:
arguments: >
-artifactLocation ${{ parameters.ArtifactLocation }}
-packageRepository ${{ parameters.PackageRepository }}
-packageFilter "${{ parameters.PackageFilter }}"
-releaseSha ${{ parameters.ReleaseSha }}
-repoId ${{ parameters.RepoId }}
-workingDirectory '${{ parameters.WorkingDirectory }}'
pwsh: true
timeoutInMinutes: 5
env:
GH_TOKEN: $(azuresdk-github-pat)
GH_TOKEN: $(azuresdk-github-pat)
4 changes: 2 additions & 2 deletions eng/common/scripts/Submit-PullRequest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ The body message for the pull request.
The labels added to the PRs. Multple labels seperated by comma, e.g "bug, service"
.PARAMETER UserReviewers
User reviewers to request after opening the PR. Users should be a comma-
separated list with no preceeding `@` symbol (e.g. "user1,usertwo,user3")
separated list with no preceding `@` symbol (e.g. "user1,usertwo,user3")
.PARAMETER TeamReviewers
List of github teams to add as reviewers
.PARAMETER Assignees
Users to assign to the PR after opening. Users should be a comma-separated list
with no preceeding `@` symbol (e.g. "user1,usertwo,user3")
with no preceding `@` symbol (e.g. "user1,usertwo,user3")
.PARAMETER CloseAfterOpenForTesting
Close the PR after opening to save on CI resources and prevent alerts to code
owners, assignees, requested reviewers, or others.
Expand Down
6 changes: 6 additions & 0 deletions eng/common/scripts/create-tags-and-git-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ param (
$artifactLocation, # the root of the artifact folder. DevOps $(System.ArtifactsDirectory)
$workingDirectory, # directory that package artifacts will be extracted into for examination (if necessary)
$packageRepository, # used to indicate destination against which we will check the existing version.
$packageFilter,
# valid options: PyPI, Nuget, NPM, Maven, C, CPP
# used by CreateTags
$releaseSha, # the SHA for the artifacts. DevOps: $(Release.Artifacts.<artifactAlias>.SourceVersion) or $(Build.SourceVersion)
Expand All @@ -26,6 +27,11 @@ Write-Host "Using API URL $apiUrl"
# VERIFY PACKAGES
$pkgList = VerifyPackages -artifactLocation $artifactLocation -workingDirectory $workingDirectory -apiUrl $apiUrl -releaseSha $releaseSha -continueOnError $continueOnError

if ($packageFilter) {
Write-Host "Filtering discovered packages to '$packageFilter'"
[array]$pkgList = $pkgList | Where-Object { $_.PackageId -like $packageFilter }
}

if ($pkgList) {
Write-Host "Given the visible artifacts, github releases will be created for the following:"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function DeployStressPackage(
if ($pkg.Dockerfile -or $pkg.DockerBuildDir) {
throw "The chart.yaml docker config is deprecated, please use the scenarios matrix instead."
}


foreach ($dockerBuildConfig in $dockerBuildConfigs) {
$dockerFilePath = $dockerBuildConfig.dockerFilePath
Expand Down Expand Up @@ -285,7 +285,7 @@ function DeployStressPackage(
$dockerBuildCmd += $dockerBuildFolder

Run @dockerBuildCmd

Write-Host "`nContainer image '$imageTag' successfully built. To run commands on the container locally:" -ForegroundColor Blue
Write-Host " docker run -it $imageTag" -ForegroundColor DarkBlue
Write-Host " docker run -it $imageTag <shell, e.g. 'bash' 'pwsh' 'sh'>" -ForegroundColor DarkBlue
Expand All @@ -302,7 +302,7 @@ function DeployStressPackage(
}
}
$generatedHelmValues.scenarios = @( foreach ($scenario in $generatedHelmValues.scenarios) {
$dockerPath = if ("image" -notin $scenario) {
$dockerPath = if ("image" -notin $scenario.keys) {
$dockerFilePath
} else {
Join-Path $pkg.Directory $scenario.image
Expand Down Expand Up @@ -476,7 +476,7 @@ function generateRetryTestsHelmValues ($pkg, $releaseName, $generatedHelmValues)
$failedJobsScenario += $job.split("-$($pkg.ReleaseName)")[0]
}
}

$releaseName = "$($pkg.ReleaseName)-$revision-retry"

$retryTestsHelmVal = @{"scenarios"=@()}
Expand Down
1 change: 1 addition & 0 deletions eng/common/testproxy/scripts/tag-merge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This script merely allows the abstraction of some of this "combination" work.

### PreReqs

- Must have []`pshell 6+`](https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-windows)
- Must have `git` available on your PATH
- Must have the `test-proxy` available on your PATH
- `test-proxy` is honored when the proxy is installed as a `dotnet tool`
Expand Down
28 changes: 22 additions & 6 deletions eng/common/testproxy/scripts/tag-merge/merge-proxy-tags.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#Requires -Version 6.0
#Requires -PSEdition Core

<#
.SYNOPSIS
Merge multiple asset tagss worth of content into a single asset tag.
Expand Down Expand Up @@ -66,9 +69,6 @@ function Git-Command($CommandString, $WorkingDirectory, $HardExit=$true) {
}

function Resolve-Proxy {
# this script requires the presence of git
Test-Exe-In-Path -ExeToLookFor "git" | Out-Null

$testProxyExe = "test-proxy"
# this script requires the presence of the test-proxy on the PATH
$proxyToolPresent = Test-Exe-In-Path -ExeToLookFor "test-proxy" -ExitOnError $false
Expand Down Expand Up @@ -184,7 +184,13 @@ function Start-Message($AssetsJson, $TargetTags, $AssetsRepoLocation, $MountDire
function Finish-Message($AssetsJson, $TargetTags, $AssetsRepoLocation, $MountDirectory) {
$len = $TargetTags.Length

Write-Host "`nSuccessfully combined $len tags. Invoke `"test-proxy push " -NoNewLine
if ($TargetTags.GetType().Name -eq "String") {
$len = 1
}

$suffix = if ($len -gt 1) { "s" } else { "" }

Write-Host "`nSuccessfully combined $len tag$suffix. Invoke `"test-proxy push " -NoNewLine
Write-Host $AssetsJson -ForegroundColor Green -NoNewLine
Write-Host "`" to push the results as a new tag."
}
Expand Down Expand Up @@ -270,12 +276,22 @@ function Combine-Tags($RemainingTags, $AssetsRepoLocation, $MountDirectory){
# if we have successfully gotten to the end without any non-zero exit codes...delete the mergeprogress file, we're g2g
Cleanup-Incomplete-Progress $MountDirectory

return $pushedTags
return @($pushedTags)
}

$ErrorActionPreference = "Stop"

# resolve the proxy location so that we can invoke it easily
# this script requires the presence of git
Test-Exe-In-Path -ExeToLookFor "git" | Out-Null

# this script expects at least powershell 6 (core)

if ($PSVersionTable["PSVersion"].Major -lt 6) {
Write-Error "This script requires a version of powershell newer than 6. See http://aka.ms/powershell for resolution."
exit 1
}

# resolve the proxy location so that we can invoke it easily, if not present we exit here.
$proxyExe = Resolve-Proxy

$AssetsJson = Resolve-Path $AssetsJson
Expand Down
3 changes: 2 additions & 1 deletion eng/pipelines/templates/jobs/archetype-go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ stages:
- template: /eng/common/pipelines/templates/steps/create-tags-and-git-release.yml
parameters:
ArtifactLocation: $(Build.SourcesDirectory)/sdk/${{ parameters.ServiceDirectory }}
PackageFilter: sdk/${{ parameters.ServiceDirectory }}
ReleaseSha: $(Build.SourceVersion)
RepoId: Azure/azure-sdk-for-go
WorkingDirectory: $(System.DefaultWorkingDirectory)

- ${{ if not(and(startsWith(parameters.ServiceDirectory, 'resourcemanager'), ne(parameters.ServiceDirectory, 'resourcemanager/internal'))) }}:
- deployment: UpdatePackageVersion
displayName: "Update Package Version"
Expand Down
23 changes: 23 additions & 0 deletions eng/scripts/modtidy.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Param(
[string]$searchPath = $PWD.Path
)

$modFiles = Get-ChildItem -Path $searchPath -Include "go.mod" -Recurse

$tidyErrors = $modFiles | ForEach-Object -Parallel {
Set-Location $_.Directory
Write-Host (Get-Location)
$output = go mod tidy 2>&1
if ($LASTEXITCODE) {
return @{ Directory = $_.Directory; Output = $output }
}
}

if ($tidyErrors) {
Write-Error "Encountered the following tidy failures:" -ErrorAction 'Continue'
foreach ($err in $tidyErrors) {
Write-Host "=== $($err.Directory) ==="
$err.Output
}
exit 1
}
19 changes: 16 additions & 3 deletions eng/tools/generator/cmd/v2/common/fileProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package common

import (
"bytes"
"errors"
"fmt"
"io/fs"
"io/ioutil"
Expand Down Expand Up @@ -543,11 +544,9 @@ func replaceModuleImport(path, rpName, namespaceName, previousVersion, currentVe
if err != nil {
return err
}

if info.IsDir() {
return nil
}

suffix := false
for i := 0; i < len(suffixes) && !suffix; i++ {
suffix = strings.HasSuffix(info.Name(), suffixes[i])
Expand All @@ -566,11 +565,25 @@ func replaceModuleImport(path, rpName, namespaceName, previousVersion, currentVe
}
}
}

return nil
})
}

func getModuleVersion(autorestPath string) (*semver.Version, error) {
data, err := os.ReadFile(autorestPath)
if err != nil {
return nil, err
}

for _, line := range strings.Split(string(data), "\n") {
if strings.HasPrefix(line, autorest_md_module_version_prefix) {
return semver.NewVersion(strings.TrimSpace(line[len(autorest_md_module_version_prefix):]))
}
}

return nil, errors.New("module-version does not exist in autorest.md")
}

func existSuffixFile(path, suffix string) bool {

existed := false
Expand Down
13 changes: 9 additions & 4 deletions eng/tools/generator/cmd/v2/common/generation.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,23 +306,28 @@ func (ctx *GenerateContext) GenerateForSingleRPNamespace(generateParam *Generate
return nil, err
}

oldModuleVersion, err := getModuleVersion(filepath.Join(packagePath, "autorest.md"))
if err != nil {
return nil, err
}

log.Printf("Replace version in autorest.md and constants...")
if err = ReplaceVersion(packagePath, version.String()); err != nil {
return nil, err
}

if _, err := os.Stat(filepath.Join(packagePath, "fake")); !os.IsNotExist(err) && changelog.HasBreakingChanges() {
if _, err := os.Stat(filepath.Join(packagePath, "fake")); !os.IsNotExist(err) && oldModuleVersion.Major() != version.Major() {
log.Printf("Replace fake module v2+...")
if err = replaceModuleImport(packagePath, generateParam.RPName, generateParam.NamespaceName, previousVersion, version.String(),
if err = replaceModuleImport(packagePath, generateParam.RPName, generateParam.NamespaceName, oldModuleVersion.String(), version.String(),
"fake", ".go"); err != nil {
return nil, err
}
}

// When sdk has major version bump, the live test needs to update the module referenced in the code.
if changelog.HasBreakingChanges() && existSuffixFile(packagePath, "_live_test.go") {
if oldModuleVersion.Major() != version.Major() && existSuffixFile(packagePath, "_live_test.go") {
log.Printf("Replace live test module v2+...")
if err = replaceModuleImport(packagePath, generateParam.RPName, generateParam.NamespaceName, previousVersion, version.String(),
if err = replaceModuleImport(packagePath, generateParam.RPName, generateParam.NamespaceName, oldModuleVersion.String(), version.String(),
"", "_live_test.go"); err != nil {
return nil, err
}
Expand Down
7 changes: 7 additions & 0 deletions sdk/ai/azopenai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## 0.4.1 (2024-01-16)

### Bugs Fixed

- `AudioTranscriptionOptions.Filename` and `AudioTranslationOptions.Filename` fields are now properly propagated, allowing
for disambiguating the format of an audio file when OpenAI can't detect it. (PR#22210)

## 0.4.0 (2023-12-11)

Support for many of the features mentioned in OpenAI's November Dev Day and Microsoft's 2023 Ignite conference
Expand Down
4 changes: 2 additions & 2 deletions sdk/ai/azopenai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ comments.

<!-- LINKS -->
[azure_openai_access]: https://learn.microsoft.com/azure/cognitive-services/openai/overview#how-do-i-get-access-to-azure-openai
[azopenai_repo]: https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/cognitiveservices/azopenai
[azopenai_repo]: https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/ai/azopenai
[azopenai_pkg_go]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai
[azure_identity]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity
[azure_sub]: https://azure.microsoft.com/free/
Expand All @@ -95,4 +95,4 @@ comments.
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
[coc_contact]: mailto:[email protected]
[azure_openai_quickstart]: https://learn.microsoft.com/azure/cognitive-services/openai/quickstart
[azure_openai_quickstart]: https://learn.microsoft.com/azure/cognitive-services/openai/quickstart
2 changes: 1 addition & 1 deletion sdk/ai/azopenai/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "go",
"TagPrefix": "go/ai/azopenai",
"Tag": "go/ai/azopenai_b42da78821"
"Tag": "go/ai/azopenai_85a01b7ac6"
}
Loading

0 comments on commit a8c6499

Please sign in to comment.