Skip to content

Commit

Permalink
Azkeys Pull in latest main (#15961)
Browse files Browse the repository at this point in the history
* Add ARM-specific bearer token policy (#15885)

* Add ARM-specific bearer token policy

Removed support for auxiliary tenants from the runtime version of this
policy as this is specific to ARM.

* add tests for expiring resource

* remove superfluous x-ms-date header

* remove policy.TokenRequestOptions from AuthenticationOptions

* refactor bearer token policy constructors

* Update azservicebus test fake (#15735)

* Add release date for azcore v0.20.0 (#15915)

* Increment version for azcore releases (#15919)

Increment package version after release of azcore

* Fully automate cluster buildout. Add azure file share mount to stress tests. (#15918)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Fix azidentity CI (#15886)

* Add DefaultAzureCredential struct (#15759)

* Add AzureCLICredentialOptions.TenantID (#15761)

* Changed ThroughputOptions to use azcore Etag (#15900)

Co-authored-by: Jason Amos <digitalamerica@gmail.com>

* [azservicebus] Cleanup/changes from API review (removal of processor and singular receives) (#15901)

API trimming/modifications based on review:

* Unexport Processor
* Unexport the singular message APIs (ReceiveMessage, ReceiveDeferredMessage) in favor of their plural counterparts.
* Deleting processor sample but would have anyways since we had an example file for it.
* Remove mentions of the Processor from our readme/migrationguide
* Remove mentions of the Processor in doc comments on exported types

* Clean up/organize script and json files in top level directory (#15453)

* Clean up/organize script and json files in top level directory

* Add eng/tools to coverage config and alphabetize it

* [Cosmos DB] [API Review] Move to azcore 0.20 and fit and finish (#15927)

* Port to azcore 0.20

* Item using byte array

* adding header policy tests

* more tests

* readme

* to int32

* lint

* Set floor of one second for polling delay (#15905)

To avoid excessive polling.
Add 429 to list of retriable HTTP status codes.

* Release sdk/resourcemanager/streamanalytics/armstreamanalytics v0.1.0 (#15840)

* [Release] sdk/resourcemanager/streamanalytics/armstreamanalytics/0.1.0 generation from spec commit: 3c16aae50c7110e1aad241ac93995621d4093d46

* fix

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Arcturus <ufo54153@gmail.com>

* Release sdk/resourcemanager/databricks/armdatabricks v0.1.0 (#15842)

* [Release] sdk/resourcemanager/databricks/armdatabricks/0.1.0 generation from spec commit: 3c16aae50c7110e1aad241ac93995621d4093d46

* fix

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Release sdk/resourcemanager/scheduler/armscheduler v0.1.0 (#15843)

* [Release] sdk/resourcemanager/scheduler/armscheduler/0.1.0 generation from spec commit: 3c16aae50c7110e1aad241ac93995621d4093d46

* fix

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Release sdk/resourcemanager/notificationhubs/armnotificationhubs v0.1.0 (#15844)

* [Release] sdk/resourcemanager/notificationhubs/armnotificationhubs/0.1.0 generation from spec commit: 2a5304178ab7416e40622808dea5b630fb7854d9

* fix

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Release sdk/resourcemanager/search/armsearch v0.1.0 (#15846)

* [Release] sdk/resourcemanager/search/armsearch/0.1.0 generation from spec commit: 2a5304178ab7416e40622808dea5b630fb7854d9

* fix

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Release sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.1.0 (#15847)

* Release sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.1.0

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Release sdk/resourcemanager/mediaservices/armmediaservices v0.1.0 (#15866)

* [Release] sdk/resourcemanager/mediaservices/armmediaservices/0.1.0 generation from spec commit: c4d19b8362dfa8001c78062659ab88c529ece7b6

* fix

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Release sdk/resourcemanager/cognitiveservices/armcognitiveservices v0.1.0 (#15890)

* [Release] sdk/resourcemanager/cognitiveservices/armcognitiveservices/0.1.0 generation from spec commit: 762ca1046eedf2b2dba28784dd4aebffab2a9897

* fix

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Release sdk/resourcemanager/relay/armrelay v0.1.0 (#15892)

* [Release] sdk/resourcemanager/relay/armrelay/0.1.0 generation from spec commit: 769e09cac92c50b1f9fa6468775b7cb7de16bb06

* fix

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Release sdk/resourcemanager/managementgroups/armmanagementgroups v0.1.0 (#15909)

* [Release] sdk/resourcemanager/managementgroups/armmanagementgroups/0.1.0 generation from spec commit: 4aebac1bd77282ae8efe3dd2886e864537d31762

* fix

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Align azidentity environment variables with other SDKs (#15928)

* [Cosmos DB] Use time.Time to represent Timestamps/LastModified (#15939)

* manual serialization

* with pointer

* boolean signature

* Removing dead code

* Add latest released version to prepare prerelease (#15941)

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>

* Release sdk/resourcemanager/resourcehealth/armresourcehealth v0.1.0 (#15910)

* [Release] sdk/resourcemanager/resourcehealth/armresourcehealth/0.1.0 generation from spec commit: 4aebac1bd77282ae8efe3dd2886e864537d31762

* fix

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* [azservicebus] Allow for renewing message and session locks (#15929)

Adding in message lock renewal and session lock renewal.

* Updating codeowners for Service Bus (#15943)

CODEOWNERS for Service Bus

* Remove old CI parameter (#15947)

* Release sdk/resourcemanager/datalake-analytics/armdatalakeanalytics v0.1.0 (#15938)

* [Release] sdk/resourcemanager/datalake-analytics/armdatalakeanalytics/0.1.0 generation from spec commit: 348665d474283df6a73d6a2ec6defef271251f13

* fix

* Update CHANGELOG.md

Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>

* Increment version for resourcemanager/resourcehealth/armresourcehealth releases (#15952)

Increment package version after release of resourcemanager/resourcehealth/armresourcehealth

* Increment version for resourcemanager/managementgroups/armmanagementgroups releases (#15951)

Increment package version after release of resourcemanager/managementgroups/armmanagementgroups

* Increment version for resourcemanager/mediaservices/armmediaservices releases (#15949)

Increment package version after release of resourcemanager/mediaservices/armmediaservices

* Increment version for resourcemanager/relay/armrelay releases (#15948)

Increment package version after release of resourcemanager/relay/armrelay

* Increment version for resourcemanager/databricks/armdatabricks releases (#15933)

Increment package version after release of resourcemanager/databricks/armdatabricks

* Increment version for resourcemanager/streamanalytics/armstreamanalytics releases (#15932)

Increment package version after release of resourcemanager/streamanalytics/armstreamanalytics

* Increment version for resourcemanager/servicefabric/armservicefabric releases (#15873)

Increment package version after release of resourcemanager/servicefabric/armservicefabric

* Increment version for resourcemanager/mysql/armmysqlflexibleservers releases (#15868)

Increment package version after release of resourcemanager/mysql/armmysqlflexibleservers

* Increment version for resourcemanager/appplatform/armappplatform releases (#15860)

Increment package version after release of resourcemanager/appplatform/armappplatform

* update version number (#15850)

* Increment version for resourcemanager/datalake-analytics/armdatalakeanalytics releases (#15953)

Increment package version after release of resourcemanager/datalake-analytics/armdatalakeanalytics

* Increment package version after release of resourcemanager/cognitiveservices/armcognitiveservices (#15950)

* Increment package version after release of resourcemanager/notificationhubs/armnotificationhubs (#15937)

* Increment package version after release of resourcemanager/alertsmanagement/armalertsmanagement (#15936)

* Increment package version after release of resourcemanager/search/armsearch (#15935)

* Increment package version after release of resourcemanager/scheduler/armscheduler (#15934)

* Increment package version after release of resourcemanager/operationsmanagement/armoperationsmanagement (#15869)

* Increment package version after release of resourcemanager/mysql/armmysql (#15867)

* Increment package version after release of resourcemanager/recoveryservices/armrecoveryservices (#15861)

* Increment package version after release of resourcemanager/datalake-store/armdatalakestore (#15859)

* Increment version for resourcemanager/iothub/armiothub releases (#15832)

* Increment package version after release of resourcemanager/iothub/armiothub

* bump version

Co-authored-by: ArcturusZhang <dapzhang@microsoft.com>

* Increment version for resourcemanager/security/armsecurity releases (#15827)

* Increment package version after release of resourcemanager/security/armsecurity

* bump version

Co-authored-by: ArcturusZhang <dapzhang@microsoft.com>

* Revise azidentity errors (#15924)

* missing coverage for sb

Co-authored-by: Joel Hendrix <jhendrix@microsoft.com>
Co-authored-by: Charles Lowell <chlowe@microsoft.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Co-authored-by: Jason <71847735+jay-most@users.noreply.github.com>
Co-authored-by: Jason Amos <digitalamerica@gmail.com>
Co-authored-by: Richard Park <51494936+richardpark-msft@users.noreply.github.com>
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
Co-authored-by: JiahuiPeng <46921893+804873052@users.noreply.github.com>
Co-authored-by: Arcturus <ufo54153@gmail.com>
Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
Co-authored-by: Dapeng Zhang <dapzhang@microsoft.com>
  • Loading branch information
13 people authored Oct 27, 2021
1 parent 3cc0215 commit ef657fd
Show file tree
Hide file tree
Showing 404 changed files with 74,767 additions and 2,549 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
# PRLabel: %Tables
/sdk/data/aztables/ @seankane-msft @jhendrixMSFT

# PRLabel: %Service Bus
/sdk/messaging/azservicebus @richardpark-msft @jhendrixMSFT

# PRLabel: %Mgmt
/sdk/resourcemanager/ @ArcturusZhang @lirenhe

Expand Down
8 changes: 6 additions & 2 deletions eng/common/scripts/Prepare-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,15 @@ else
$releaseDateString = $ParsedReleaseDate.ToString("MM/dd/yyyy")
$month = $ParsedReleaseDate.ToString("MMMM")

Write-Host
Write-Host "Assuming release is in $month with release date $releaseDateString" -ForegroundColor Green
if (Test-Path "Function:GetExistingPackageVersions")
{
$releasedVersions = GetExistingPackageVersions -PackageName $packageProperties.Name -GroupId $packageProperties.Group
$latestReleasedVersion = $releasedVersions[$releasedVersions.Count - 1]
Write-Host "Latest released version: ${latestReleasedVersion}" -ForegroundColor Green
}

$currentProjectVersion = $packageProperties.Version

$newVersion = Read-Host -Prompt "Input the new version, or press Enter to use use current project version '$currentProjectVersion'"

if (!$newVersion)
Expand Down
4 changes: 2 additions & 2 deletions eng/common/scripts/stress-testing/deploy-stress-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ function DeployStressTests(
[string]$environment = 'test',
[string]$repository = 'images',
[boolean]$pushImages = $false,
[string]$clusterGroup = 'rg-stress-test-cluster-',
[string]$clusterGroup = 'rg-stress-cluster-test',
[string]$deployId = 'local',
[string]$subscription = 'Azure SDK Test Resources'
[string]$subscription = 'Azure SDK Developer Playground'
) {
if ($PSCmdlet.ParameterSetName -eq 'DoLogin') {
Login $subscription $clusterGroup $pushImages
Expand Down
36 changes: 20 additions & 16 deletions eng/config.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@
{
"Packages": [
{
"Name": "azidentity",
"CoverageGoal": 0.68
"Name": "azblob",
"CoverageGoal": 0.45
},
{
"Name": "azcore",
"CoverageGoal": 0.85
},
{
"Name": "azcosmos",
"CoverageGoal": 0.40
},
{
"Name": "azcore",
"CoverageGoal": 0.85
"Name": "azidentity",
"CoverageGoal": 0.68
},
{
"Name": "internal",
"CoverageGoal": 0.70
"Name": "azkeys",
"CoverageGoal": 0.72
},
{
"Name": "data",
"CoverageGoal": 0.62
"Name": "azsecrets",
"CoverageGoal": 0.76
},
{
"Name": "azblob",
"CoverageGoal": 0.45
"Name": "azservicebus",
"CoverageGoal": 0.24
},
{
"Name": "messaging",
"CoverageGoal": 0.10
"Name": "data",
"CoverageGoal": 0.62
},
{
"Name": "azsecrets",
"CoverageGoal": 0.76
"Name": "eng/tools",
"CoverageGoal": 0.0
},
{
"Name": "azkeys",
"CoverageGoal": 0.72
"Name": "internal",
"CoverageGoal": 0.70
}
]
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion eng/tools/generator/autorest/model/generateOptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"io/ioutil"
)

// GenerateOptions deserialize from generate_options.json file in root directory of azure-sdk-for-go
// GenerateOptions deserialize from eng/generate_options.json file in root directory of azure-sdk-for-go
type GenerateOptions struct {
AutorestArguments []string `json:"autorestArguments"`
AdditionalOptions []string `json:"additionalOptions,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion eng/tools/generator/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package common

const (
// DefaultOptionPath the default path of the option file
DefaultOptionPath = "generate_options.json"
DefaultOptionPath = "eng/generate_options.json"

Services = "services"
ChangelogFilename = "CHANGELOG.md"
Expand Down
1 change: 0 additions & 1 deletion findTestedPackages.sh

This file was deleted.

11 changes: 11 additions & 0 deletions sdk/azcore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## 0.20.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 0.20.0 (2021-10-22)

### Breaking Changes
Expand All @@ -18,6 +28,7 @@
* Added string typdef `arm.Endpoint` to provide a hint toward expected ARM client endpoints
* `azcore.ClientOptions` contains common pipeline configuration settings
* Added support for multi-tenant authorization in `arm/runtime`
* Require one second minimum when calling `PollUntilDone()`

### Bug Fixes
* Fixed a potential panic when creating the default Transporter.
Expand Down
12 changes: 6 additions & 6 deletions sdk/azcore/arm/runtime/poller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func TestNewPollerAsync(t *testing.T) {
t.Fatal(err)
}
var result mockType
_, err = poller.PollUntilDone(context.Background(), 10*time.Millisecond, &result)
_, err = poller.PollUntilDone(context.Background(), time.Second, &result)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -147,7 +147,7 @@ func TestNewPollerBody(t *testing.T) {
t.Fatal(err)
}
var result mockType
_, err = poller.PollUntilDone(context.Background(), 10*time.Millisecond, &result)
_, err = poller.PollUntilDone(context.Background(), time.Second, &result)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -184,7 +184,7 @@ func TestNewPollerLoc(t *testing.T) {
t.Fatal(err)
}
var result mockType
_, err = poller.PollUntilDone(context.Background(), 10*time.Millisecond, &result)
_, err = poller.PollUntilDone(context.Background(), time.Second, &result)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -215,7 +215,7 @@ func TestNewPollerInitialRetryAfter(t *testing.T) {
t.Fatalf("unexpected poller type %s", pt.String())
}
var result mockType
_, err = poller.PollUntilDone(context.Background(), 10*time.Millisecond, &result)
_, err = poller.PollUntilDone(context.Background(), time.Second, &result)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -273,7 +273,7 @@ func TestNewPollerFailedWithError(t *testing.T) {
t.Fatalf("unexpected poller type %s", pt.String())
}
var result mockType
_, err = poller.PollUntilDone(context.Background(), 10*time.Millisecond, &result)
_, err = poller.PollUntilDone(context.Background(), time.Second, &result)
if err == nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -309,7 +309,7 @@ func TestNewPollerSuccessNoContent(t *testing.T) {
t.Fatal(err)
}
var result mockType
_, err = poller.PollUntilDone(context.Background(), 10*time.Millisecond, &result)
_, err = poller.PollUntilDone(context.Background(), time.Second, &result)
if err != nil {
t.Fatal(err)
}
Expand Down
6 changes: 4 additions & 2 deletions sdk/azcore/internal/pollers/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ func (l *Poller) FinalResponse(ctx context.Context, respType interface{}) (*http
// PollUntilDone will handle the entire span of the polling operation until a terminal state is reached,
// then return the final HTTP response for the polling operation and unmarshal the content of the payload
// into the respType interface that is provided.
// freq - the time to wait between polling intervals if the endpoint doesn't send a Retry-After header.
// A good starting value is 30 seconds. Note that some resources might benefit from a different value.
// freq - the time to wait between intervals in absence of a Retry-After header. Minimum is one second.
func (l *Poller) PollUntilDone(ctx context.Context, freq time.Duration, respType interface{}) (*http.Response, error) {
if freq < time.Second {
return nil, errors.New("polling frequency minimum is one second")
}
start := time.Now()
logPollUntilDoneExit := func(v interface{}) {
log.Writef(log.EventLRO, "END PollUntilDone() for %T: %v, total time: %s", l.lro, v, time.Since(start))
Expand Down
15 changes: 11 additions & 4 deletions sdk/azcore/internal/pollers/poller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ func TestNewPoller(t *testing.T) {
t.Fatal("unexpected empty resume token")
}
resp, err = p.PollUntilDone(context.Background(), 1*time.Millisecond, nil)
if err == nil {
t.Fatal("unexpected nil error")
}
if resp != nil {
t.Fatal("expected nil response")
}
resp, err = p.PollUntilDone(context.Background(), time.Second, nil)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -167,7 +174,7 @@ func TestNewPollerWithFinalGET(t *testing.T) {
Shape string `json:"shape"`
}
var w widget
resp, err := p.PollUntilDone(context.Background(), 1*time.Millisecond, &w)
resp, err := p.PollUntilDone(context.Background(), time.Second, &w)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -198,7 +205,7 @@ func TestNewPollerFail1(t *testing.T) {
p := NewPoller(&fakePoller{Ep: srv.URL()}, firstResp, pl, func(*http.Response) error {
return errors.New("failed")
})
resp, err := p.PollUntilDone(context.Background(), 1*time.Millisecond, nil)
resp, err := p.PollUntilDone(context.Background(), time.Second, nil)
if err == nil {
t.Fatal("unexpected nil error")
} else if s := err.Error(); s != "failed" {
Expand All @@ -221,7 +228,7 @@ func TestNewPollerFail2(t *testing.T) {
p := NewPoller(&fakePoller{Ep: srv.URL()}, firstResp, pl, func(*http.Response) error {
return errors.New("failed")
})
resp, err := p.PollUntilDone(context.Background(), 1*time.Millisecond, nil)
resp, err := p.PollUntilDone(context.Background(), time.Second, nil)
if err == nil {
t.Fatal("unexpected nil error")
} else if s := err.Error(); s != "failed" {
Expand All @@ -244,7 +251,7 @@ func TestNewPollerError(t *testing.T) {
p := NewPoller(&fakePoller{Ep: srv.URL()}, firstResp, pl, func(*http.Response) error {
return errors.New("failed")
})
resp, err := p.PollUntilDone(context.Background(), 1*time.Millisecond, nil)
resp, err := p.PollUntilDone(context.Background(), time.Second, nil)
if err == nil {
t.Fatal("unexpected nil error")
} else if s := err.Error(); s != "fatal" {
Expand Down
2 changes: 1 addition & 1 deletion sdk/azcore/internal/shared/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ const (
Module = "azcore"

// Version is the semantic version (see http://semver.org) of this module.
Version = "v0.20.0"
Version = "v0.20.1"
)
1 change: 1 addition & 0 deletions sdk/azcore/runtime/policy_retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func setDefaults(o *policy.RetryOptions) {
if o.StatusCodes == nil {
o.StatusCodes = []int{
http.StatusRequestTimeout, // 408
http.StatusTooManyRequests, // 429
http.StatusInternalServerError, // 500
http.StatusBadGateway, // 502
http.StatusServiceUnavailable, // 503
Expand Down
Loading

0 comments on commit ef657fd

Please sign in to comment.