Skip to content

Commit

Permalink
Rebase master to Feature/live test other clouds. (#12714)
Browse files Browse the repository at this point in the history
* [Storage] Add test case for accesstier (#12340)

* [Datafactory] Enable Excel SDK (#12282)

* Enable Excel SDK

* update

Co-authored-by: zhanyu2014 <[email protected]>

* update Azure.ClientSdk.Analyzers to 20200529.1 (#12370)

* make it required (#12354)

* Tables: Query support for dictionary entities and CreateFilter (#12366)

* Support for dictionary entities and CreateFilter

* add comment to CreateFilter

* take the new Azure.ClientSdk.Analyzers and remove pragmas

* remove redundant .ToList() calls in tests

* make CreateFilter less prominant on the client

* Initial commit to master for Azure Digital Twins .Net SDK. (#12398)

* Update Batch SDK regeneration instructions (#12347)

* K8sConfiguration .Net SDK - Create (#12227)

* K8sConfiguration .Net SDK - Create

* include k8s in CI

* Project version and dependencies update

Co-authored-by: nanthi <nanthi@NANTHI01>
Co-authored-by: Yeming Liu <[email protected]>

* Support Sku capabilities. Bump to 7.3.0 (#12328)

* Support Sku capabilities. Bump to 7.3.0

* Generate from AutoRest

* Removed color and imageType from the VisualFeature enum (#12375)

* Removed color and imageType from the VisualFeature enum

* Modified test data and removed changes to generated code (so the deprecated enum still exists in there)

* Regenerated CreateSkillsetReturnsCorrectDefinitionImageAnalysisKeyPhrase.json on dogfood

* Generate new .NET SDK based on #9377 (#12364)

* Generate new .NET SDK based on #9377

* Update package version

* [Event Hubs Client] Migration Guide Updates (#12402)

The focus of these changes is to enhance the migration guide with additional
information about the client hierarchy and discuss the limitations around
processor types consuming legacy checkpoint data.

* [FormRecognizer] Remove Operation type constructors (#12419)

* Release prep (#12422)

* Prepare Storage for release

* pr feedback.

* PR feedback.

* pr feedback.

* Release preparation

* Update GitIgnore (#12368)

* Enable return type and banned assembly analyzers (#12418)

* Increment version for storage releases (#12423)

* Increment package version after release of Azure.Storage.Common

* Increment package version after release of Azure.Storage.Files.Shares

* Increment package version after release of Azure.Storage.Blobs

* Increment package version after release of Azure.Storage.Files.DataLake

* Increment package version after release of Azure.Storage.Queues

* Increment version for storage releases (#12425)

* Increment package version after release of Azure.Storage.Common

* Increment package version after release of Azure.Storage.Files.Shares

* Increment package version after release of Azure.Storage.Blobs

* Increment package version after release of Azure.Storage.Files.DataLake

* Increment package version after release of Azure.Storage.Queues

* feat(Samples): Add Telemetry Sample (#12407)

feat(Samples): Add Telemetry Sample

* add some unit tests for expression parsing (#12421)

* add some unit tests for expression parsing

* refactor for TestCaseSource

* fixup naming

* samples(adt): Update ctor snippets, and update sample options (#12409)

* fix(e2e): Fix replay tests for differnt OS(s) (#12424)

* fix(adt): fix BasicDigitalTwin and use in an example (#12428)

* Update root readme file (#12430)

* samples(adt): add a sample for using a custom twin type for serialization (#12432)

* Update swagger_to_sdk_config.json (#12412)

@microsoft.azure/[email protected] is a preview version. Going back to 82

* Fix Incomplete Doc Upload (#12442)

* ensure that child directory items are copied

* bump template version so it can actually pass through the version checks + integration feed

* Update AutoRest C# version to https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200602.1/autorest-csharp-v3-3.0.0-dev.20200602.1.tgz (#12435)

* Fix json serialization of geometries (#12440)

* samples(adt): add snippets for get and deserialize digital twin (#12441)

* fix(adt): Updated comments to generted more meaningful API documentation (#12443)

* Escaping % (percent sign) segment in Uri.AppendToPath  (#12369)

* Escaping % percent sign in segment in AppendToPath

* webdocs(adt): test seealso, and adding links for more resources (#12471)

* Make collection properties read-only (#12459)

* Make collection properties read-only

Fixes #11712. Removes the setters per .NET guidelines.

* Resolve PR feedback

* feat(adt): Adding see-also section for sync methods (#12470)

* comments(adt): removing inaccurate comment (#12474)

* Remove FieldBuilder (#12464)

* Remove FieldBuilder

Resolves #12460

* Update public APIs

* feat(test): Adding tests to ensure that the test mode values are not changed (#12481)

* Ignore Azure.Management.KeyVault.Tests (#12483)

Works around #12211 by ignoring tests that fail sporadically for both
live and playback tests.

* Default to more Newtonsoft-like response encoding in TestFramework (#12482)

* samples(adt): misc minor clean-up from Azure SDK review (#12488)

* feat(adt): Add exception tag to comments (#12475)

* Add SessionReceiverOptions/SessionProcessorOptions (#12383)

* Changelogs and version updates for June release (#12507)

* test(PublishTelemetry): Add E2E test for Publish Telemetry API (#12479)

* Increment version for core releases (#12516)

* Update versions of Azure.Core and Azure.Core.Experimental (#12520)

* Update AutoRest C# version (#12525)

Co-authored-by: Pavel Krymets <[email protected]>

* Release Prep (#12526)

* Prepare Storage for release

* pr feedback.

* PR feedback.

* pr feedback.

* release prep

* samples(adt): Update component property to be an integer (#12515)

* samples(adt): Update component property to be an integer

* samples(adt): Update dt property to be an integer

Co-authored-by: Abhipsa Misra <[email protected]>

* Increment version for storage releases (#12529)

* Increment package version after release of Azure.Storage.Queues

* Increment package version after release of Azure.Storage.Common

* Increment package version after release of Azure.Storage.Files.Shares

* Increment package version after release of Azure.Storage.Blobs

* Increment package version after release of Azure.Storage.Files.DataLake

* samples(adt): more misc changes per Azure SDK review (#12532)

* feat(samples): Add an introduction section to the samples page (#12524)

* Added xml dataset & fixed version issue (#12458)

Co-authored-by: Shawn Xiao (IM) <[email protected]>

* Batch Management SDK 11.0.0 (#12393)

* 2020-05-01 generated sdk and recordings

* update changelog

* fix description typo

* undo change to changelog

* update AzSdk.RP.props

* update assemblyinfo

* GuestConfiguration SDK update to support ARC senario (#12373)

* GuestConfiguration SDK update to support ARC senario

* add unit tests

* add unit tests2

* [no change] trigger a new build

* [no change] trigger a new build2

* migrate tests to subscription: MGMT GCRP Package Test 001, re-record the tests

Co-authored-by: ge huang <[email protected]>

* Rename AnalyzeRequest to AnalyzeTextOptions (#12489)

* Rename AnalyzeRequest to AnalyzeTextOptions

Fixes #12486
Fixes #12530

* Rename some properties, parameters for consistency

Fixes #12536

* Removed the SynonymMap.Format property

Only "solr" is supported, and this makes .NET consistent with the other languages.

* Resolve PR feedback

* Implement the management client (#12484)

ATOM based management operations

* Making developer credential types public (#12501)

* Making developer credential types public

* update api listing

* docs(adt): add link to samples (#12533)

* Increment version for extensions releases (#12547)

* feat(samples): Use DefaultAzureCredential in samples using app id login (#12535)

* [FormRecognizer] Preview 3: moving to new Receipt design (#12523)

* Identity Adding Authenticate APIs to UsernamePasswordCredential (#12502)

* Adding Authenticate APIs to UsernamePasswordCredential

* updating test recordings

* updating api listing

* update changelog

* [TA] Drop preview and change readme links to absolute (#12541)

* drop preview and links absolute

* updates

* add azure-cognitive-services to our samples

* change package version

* Consistency operation failed status management in LRO  (#12453)

* failures in LROs

* changelog

* PR Feedback

* don't overwrite history....

* improve race condition comment

* [FR] Absolute links and bump version in Readme (#12540)

* absolute links and version

* add azure-cognitive-services to samples readme

* Add changelog format template - bump nuget version for next release - Update nuget tag  (#12552)

* Update release info

* refactor(adt): move QueryChargeHelper to root namespace (#12569)

* Add sdk directory name check (#12556)

* [Synapse] - Build track 2 data plane SDK (#12275)

* [Synapse] - Build track 2 SDK

* Update ci.yml

* Remove unused gitignore

* Resolve compilation error

* Fix build error

* Update README

* Update code snippets and README

* Update README

* Add file header for code snippet

* Remove template api

* Rename Azure.Analytics.Synapse.Development to Azure.Analytics.Synapse.Artifacts

* Re-generate to the latest Swagger spec

* Regenerate with the latest code generator

* Resolve comments

* Make VersionString internal and remove setter

* Sync up with master, consume official Swagger repo and regenerate code

Co-authored-by: Dongwei Wang <[email protected]>

* update change log for KeyVault track 2 mgmt sdk (#12272)

* update change log for KeyVault track 2 mgmt sdk

* update change log

* refine change log

* refine code sample

* update change logs for track 2 mgmt sdks for preview (#12391)

* update change logs for track 2 mgmt sdks

* update code sample

* [App Service] Azure .NET SDK update for Powershell (#12380)

* [Datafactory] Add source/sink linked service/schema linked service support for Data Flow (#12528)

* SDK changes for source/sink linked service/schema LS

* update

* renaming operation-ids for Cluster put and patch as per guidelines (#12554)

* renaming operation-ids for Cluster put and patch as per guidelines

* updated the version

* updated the major version to 3.0.0

* Revert "updated the major version to 3.0.0"

This reverts commit f689e1a.

* [Event Hubs Client] Fix Test Environment Typo (#12596)

The focus of these changes is to fix a typo on the constructor of the
StorageTestEnvironment, which initializes the base class with an incorrect
service directory name.

* Port clientside encryption to mono-dll (#12183)

* Port clientside encryption to mono-dll

Ported blob client-side encryption work from long-diverged branch. Was an
inheritance approach, is now part of the main package internals.
Ported over WindowStream from stg73base, which allows us to prematurely
end streams.
Removed RollingBufferStream, as uploads no longer require seekable
streams as input.

* Removed crypto package from ci.yml

* regenerate/export-api

* Ported clientside encryption for queues

* Queues handles partial decryption errors.

Queues now has a listener for when only some messages cannot be
decrypted. these messages are filtered out of the response and sent to
the listened instead. If no listener is provided, the whole fetch
throws.
Some PR comments addressed.

* Removed nonexistent project from sln

* Change in handling key resolution

Clientside decryption will now either succeed or throw. Queues can
redirect their throw to a listener.

* Many PR comments addressed; key-substitution added

* Refactors; Mocking some tests

* Refactors and bug fixes

* Export-API

* Constant/error/assertion refactors

* Refactors

* Revert deletion of an api.cs file

* Minor Crypto API Adjustments

* Export API

* Queue listener changed to events.

Other minor PR feedback.

* Export api

* Testing for update message encryption

* Minor event API adjustments

* export api

* fix(tests,samples)do not send modelid in component metadata (#12573)

* docs(adt): update RequestOptions documentation (#12571)

* [FormRecognizer] Remove <inheritdoc> from documentation (#12570)

* Fix Tables access policies test and configure related methods (#12567)

* fixed accesspolicies test but still errors with recordedmode

* test to default, api export, and sessions

Co-authored-by: Allison Kim <[email protected]>

* fix(samples):remove unnecessary lines from sample (#12606)

* Update for Preview 3 (#12608)

* [FormRecognizer] Preview 3: updating changelog

* Update DigitalTwin lifecycle to use ETag and re-record (#12603)

* Update changelog (#12612)

* Update changelog

* Updated changelogs for preview release (#12616)

* Increment package version after release of Azure.Messaging.ServiceBus (#12619)

* readme(adt): update readme (#12618)

* Tables: Fixup diagnostic scopes (#12621)

* Fixup diagnostic scopes

* fix lambda scopes

* fix random failure by changing from referencing helper project to contain source code directly (#12498)

* Supporting specifying test run frequency (#12454)

* Add RunFrequencyAttribute to support live test run frequency

* remove workaround file sdk/core/service.projects

* fix(comments): Fix xml comments for API surface (#12635)

* Search cross-language consistency API changes (#12615)

* Search cross-language consistency API changes

Fixes #11162

* Add strongly typed FacetResult helpers for Search (#12620)

* Add strongly typed FacetResult helpers for Search

Fixes #10613.  We kept this open for a long time hoping we'd be able to do
something nifty using type info, but there's just not a great answer so we're
stealing the Track 1 experience.

* [Synapse] - Fix test failure (#12625)

* Fix test failure

* Correct test name

* Remove Ignore annotation and use random guid

* change namespace to Azure.ResourceManager for track 2 mgmt sdk (#12598)

* change namespace to Azure.ResourceManager. for track 2 mgmt sdk

* update readmes

* update Azure.Core.All.sln

* add resource group clean up policy for management test

* Support node reboot features (#12641)

Co-authored-by: Zhenyu Zhou <[email protected]>

* Throw an AggregateException for Search IndexDocuments batch errors (#12630)

* Throw an AggregateException for Search IndexDocuments batch errors

Fixes #10594

* Add SearchModelFactory (#12626)

* Add SearchModelFactory

Fixes #10610

* [FormRecognizer] Remove long-running operation transform (#12652)

* Adding SearchClientBuilderExtensions (#12628)

* Adding SearchClientBuilderExtensions
* Updating Changelog

* Increment package version after release of Azure.DigitalTwins.Core (#12617)

* [Event Hubs Client] Migration Guide Tweaks (#12656)

The focus of these changes is to incorporate some feedback from other languages
around phrasing and content for the messaging around legacy checkpoint support.

* fix setup script (#12661)

* Fix SearchDocument (#12610)

* Fix SearchDocument
* PR Feedback
* PR Feedback - Change from Array to IReadOnlyList

* Update README.mds for extensions (#12658)

* Increment package version after release of Azure.AI.TextAnalytics (#12666)

* updated mappings for new Microsoft.Web event types in the azure-sdk-for-net repo (#12171)

Co-authored-by: Elle Tojaroon <[email protected]>

* Increment package version after release of Azure.Search.Documents (#12671)

* Sync eng/common directory with azure-sdk-tools repository (#12665)

* Event Grid: Regenerate new .NET SDK and record tests for new GA service API version 2020-06-01 (#12576)

* regenerate .NET SDK for Event Grid 2020-06-01 API version

* re-record the tests

* add changelog.md and update note release

* add more history to changelog.md

* fix text

* update version in azSdk.RP.props and assymblyinfo.cs

Co-authored-by: Ashraf Hamad <[email protected]>

* [Azure Cognitive Search] Creating new SDK version to match new management-plane API Version 2020-03-13  (#12607)

* Generated for api 2020-03

* Removing unused dependency.

* Updated session records of data plane tests.

* merge upstream

* Updated SDK version information.

* Generated off of API Specs Master.

* merge upstream

* Remove unused method.

* updated session record.

* Skipping broken test.

Co-authored-by: Jacob Hill <[email protected]>

* [Microsoft.StorageSync] Update SDK to use 2020-03-01 API version (#12560)

* autorest code generation for 2020-03-01 API version

* update changelog, SDK version, update tests

* Updating API tag in AzSdk.props

* Azure Digital Twins 0.1.0 SDK (#12538)

* DigitalTwins SDK and Tests

* New swagger and tests updated

* enable CI

* Update version

Co-authored-by: Yeming Liu <[email protected]>

Co-authored-by: Ryan Kelly <[email protected]>
Co-authored-by: Yeming Liu <[email protected]>
Co-authored-by: Yeming Liu <[email protected]>

* [FormRecognizer] Changing test location to West Central US + Live tests fix (#12677)

* [FormRecognizer] Preview 3: update changelogs (#12687)

* Update CRUD samples (#12693)

* Identity updating changelog for 1.2.0-preview.4 release (#12696)

* Remove unhealthy pump (#12691)

* Up version to 4.2.1 for stress testing pipeline

* Remove pump if not at running or not opening states.

* enable apicompat (#12669)

* Increment package version after release of Azure.Identity (#12697)

* Increment package version after release of Azure.AI.FormRecognizer (#12698)

* [Event Hubs Client] Documentation Updates (#12690)

The focus of these changes is to refine some documentation to correct a missed
update to `Azure.Identity` types and improve context around storage expectations
when creating an `EventProcessorClient`.

* Increase Key Vault test timeout to 120mins (#12700)

* Increase Key Vault test timeout to 90mins

* Further increase timeout

* Update sample readmes to have absolute links to GitHub (#12568)

* Network SDK release for API version 2020-05-01 (#12685)

* Re-generate Network SDK

* fix sdk breaking change with firewall policy rule collection group rename (#12381)

* Update generated code

* SDK

* Update SDK code

* Re-generate Network SDK

* Update ChangeLog

* Update SDK version as 20.0.0-preview already exists

Co-authored-by: gimotwanMSFT <[email protected]>

* DiskRp changes for 2020-05-01 (#12553)

* DiskRP sdk changes for api version 2020-05-01

* changing sdk versions

* taking in latest changes from swagger pr

* fix tests and generate sdk from latest swagger

* taking in latest swagger changes and running the failed test

* regenerate sdk from merged swagger

* fixing autorest, updating azsdk.props, updating validation in des tests

* CRR update (#12650)

* CRR update

* Update

* ADT C# SDK Samples Improvements (#12683)

* fix(samples): improve on the snippet comments

* Create a relationship samples

* Initial AccessControlClient for Azure.Security.KeyVault.Administration (#12480)

* poc of generated client

* cleanup

* implement the rest

* export api

* tests

* recorded tests

* regen client

* fix version

* xml comments

* pr comments

* pr comments

* diagnostic scopes

* model factory

* adjust diagnostic scopes

* change assignment name to Guid

* make RoleAssignmentListResult internal

* rename file

* pr comments

* remove commented shared import

* add xml docs for ArgumentNullExceptions

* refactor(samples): Refactor the delete digital twin sample snippet (#12716)

* Update AutoRest C# version (#12692)

Co-authored-by: Shivangi Reja <[email protected]>

* Generate API (#12720)

* Add initial samples for review (#12664)

* init samples

* learning about clieeents

* CreateTable should work

* Sample template finished with create + delete table working

* first sample files

* added delete nonexistent table

* revised based on feedback + first readme

* revised sample1 readme and file

Co-authored-by: Allison Kim <[email protected]>

* Refresh generated code for KVAdmin library (#12725)

* Simplify delete relationship snippet (#12717)

* simplify delete relationship snippet

* Api compat changes (#12703)

* Update how ApiCompat checks are ran

- Now include the ApiCompatVersion in the project
- Update the ApiCompatVersion everytime we ship a GA
- Remove EnableApiCompat as to disable now remove the ApiCompatVersion

* Remove EnableApiCompat from everywhere.

* Add ApiCompatVersion to all GA packages

* PR feedback

Fix bad appconfig test
Add ApiCompatVersion for textanalytics

* Remove apicompat project from solutions

* Remove more EnableApiCompat properties

* Add reboot parameters for multiple replicas per master. (#12712)

* Add reboot parameters for multiple replicas per master.

* Update the preview version in csproj.

* Reenable registered server tests, update recordings (#12724)

* Update AutoRest C# version (#12739)

Co-authored-by: Pavel Krymets <[email protected]>

* Fix links in extensions README.mds (#12689)

* doc(adt): update prereq readme instructions (#12743)

* Sanitize json body (#12707)

* sanitize body

* PR feedback

* update to master

* no var

* Use US sovereign region

* Use sovereign KV domain suffix

* Update KV tests.yml to use new approach

* Unique naming of jobs

* Unique display names

* Set SubscriptionConfiguraiton back to default

* Name Job directly

* use valid characters for job name

* Parameterize KV SKU and adjust Azure China Cloud deployment

* add AZURE_AUTHORITY_HOST

Co-authored-by: Wei Wei <[email protected]>
Co-authored-by: yuzhangyi <[email protected]>
Co-authored-by: zhanyu2014 <[email protected]>
Co-authored-by: Christopher Scott <[email protected]>
Co-authored-by: Mariana Rios Flores <[email protected]>
Co-authored-by: Azad Abbasi <[email protected]>
Co-authored-by: Jacob Freck <[email protected]>
Co-authored-by: NarayanThiru <[email protected]>
Co-authored-by: nanthi <nanthi@NANTHI01>
Co-authored-by: Yeming Liu <[email protected]>
Co-authored-by: Yang Yuan <[email protected]>
Co-authored-by: Jennifer Marsman <[email protected]>
Co-authored-by: Junbo Wang <[email protected]>
Co-authored-by: Jesse Squire <[email protected]>
Co-authored-by: kinelski <[email protected]>
Co-authored-by: Kamil Sobol <[email protected]>
Co-authored-by: Chidozie Ononiwu <[email protected]>
Co-authored-by: Pavel Krymets <[email protected]>
Co-authored-by: Azure SDK Bot <[email protected]>
Co-authored-by: Basel Rustum <[email protected]>
Co-authored-by: David R. Williamson <[email protected]>
Co-authored-by: vinagesh <[email protected]>
Co-authored-by: Scott Beddall <[email protected]>
Co-authored-by: Amanda Nguyen <[email protected]>
Co-authored-by: Heath Stewart <[email protected]>
Co-authored-by: JoshLove-msft <[email protected]>
Co-authored-by: Abhipsa Misra <[email protected]>
Co-authored-by: Abhipsa Misra <[email protected]>
Co-authored-by: shawnxzq <[email protected]>
Co-authored-by: Shawn Xiao (IM) <[email protected]>
Co-authored-by: Ge Huang <[email protected]>
Co-authored-by: ge huang <[email protected]>
Co-authored-by: ShivangiReja <[email protected]>
Co-authored-by: Scott Schaab <[email protected]>
Co-authored-by: Dongwei Wang <[email protected]>
Co-authored-by: Dongwei Wang <[email protected]>
Co-authored-by: erich-wang <[email protected]>
Co-authored-by: Shubham Dhond <[email protected]>
Co-authored-by: Richard Zhang <[email protected]>
Co-authored-by: Ajit Navasare <[email protected]>
Co-authored-by: James <[email protected]>
Co-authored-by: Allison Kim <[email protected]>
Co-authored-by: Allison Kim <[email protected]>
Co-authored-by: tg-msft <[email protected]>
Co-authored-by: aim-for-better <[email protected]>
Co-authored-by: Zhenyu Zhou <[email protected]>
Co-authored-by: Paviya (Elle) Tojaroon <[email protected]>
Co-authored-by: Elle Tojaroon <[email protected]>
Co-authored-by: Ashraf Hamad <[email protected]>
Co-authored-by: Ashraf Hamad <[email protected]>
Co-authored-by: Jacob Hill <[email protected]>
Co-authored-by: Jacob Hill <[email protected]>
Co-authored-by: Andre Pinto <[email protected]>
Co-authored-by: Ryan K <[email protected]>
Co-authored-by: Ryan Kelly <[email protected]>
Co-authored-by: Yeming Liu <[email protected]>
Co-authored-by: Yeming Liu <[email protected]>
Co-authored-by: Serkant Karaca <[email protected]>
Co-authored-by: Anton Evseev <[email protected]>
Co-authored-by: gimotwanMSFT <[email protected]>
Co-authored-by: chetmaddula <[email protected]>
Co-authored-by: Pratima Upadhyay <[email protected]>
Co-authored-by: Shivangi Reja <[email protected]>
Co-authored-by: Wes Haggard <[email protected]>
Co-authored-by: Lakshmi Priya Sekar <[email protected]>
Co-authored-by: Daniel Jurek <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 7,908 changed files with 861,701 additions and 522,913 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/sdk/search/ @brjohnstmsft @arv100kri @bleroy @tg-msft @heaths
/sdk/search/Microsoft.*/ @brjohnstmsft @arv100kri @bleroy

/sdk/servicebus/ @JoshLove-msft @ShivangiReja @jsquire
/sdk/servicebus/ @JoshLove-msft @ShivangiReja @jsquire @MiYanni
/sdk/servicebus/Microsoft.*/ @nemakam

/sdk/storage/ @amishra-dev @seanmcc-msft @amnguye @kasobol-msft @tg-msft
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ ipch/
*.psess
*.vsp

# VS Code
.vscode/

# Code analysis
*.CodeAnalysisLog.xml

Expand Down
11 changes: 4 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,10 @@ eng\scripts\Export-API.ps1 tables
.NET is using the [ApiCompat tool](https://github.com/dotnet/arcade/tree/master/src/Microsoft.DotNet.ApiCompat) to enforce API compatibility between versions. Builds of GA'ed libraries will fail locally and in CI if there are breaking changes.

### How it works
We use a dummy project called [ApiCompat](https://github.com/Azure/azure-sdk-for-net/tree/master/eng/ApiCompat/ApiCompat.csproj) to enforce API compatibility between the GA'ed libraries and the most recent version available on Nuget. This project includes package references to all GA'ed libraries and to Microsoft.DotNet.ApiCompat.
Each listed library package is restored from Nuget via the package references listed in the `ApiCompat.csproj` file, in combination with the version listed for that package in [eng/Packages.Data.props](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Packages.Data.props).
The `ApiCompatVerification` target defined in `ApiCompat.csproj` is referenced in the [eng/Directory.Build.Data.targets](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Directory.Build.Data.targets) which causes this target to be executed for each csproj that has the `EnableApiCompat` parameter set to true. The `EnableApiCompat` parameter defaults to the value of the `IsShippingClientLibrary` parameter, which is defined in [eng/Directory.Build.Data.props](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Directory.Build.Data.props). For libraries that do not yet have a public package defined in `ApiCompat.csproj` for comparison, set `<EnableApiCompat>false</EnableApiCompat>` in the csproj.

### Adding a new GA'ed library
To include add a new GA'ed library in the `ApiCompatVerification` target, add a package reference for the library to the `ApiCompat.csproj` file. You will also need to include the latest GA version of the library in [eng/Packages.Data.props](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Packages.Data.props).
Finally, include the `ApiCompat.csproj` in your solution so that the project will get automatically restored in Visual Studio.
We use a dummy project called [ApiCompat](https://github.com/Azure/azure-sdk-for-net/tree/master/eng/ApiCompat/ApiCompat.csproj) to enforce API compatibility between the GA'ed libraries and the most recent version available on Nuget. This project includes package references to the GA'ed library and to Microsoft.DotNet.ApiCompat.
Each library needs to provide a `ApiCompatVersion` property which is set to the last GA'ed version of the library which is used to compare APIs with the current to ensure no breaks
have been introduced.
The `ApiCompatVerification` target defined in `ApiCompat.csproj` is referenced in the [eng/Directory.Build.Data.targets](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Directory.Build.Data.targets) which causes this target to be executed for each csproj that has the `ApiCompatVersion` property set. For libraries that wish to disable the APICompat check they can remove the `ApiCompatVersion` property from their project. Our version bump automation will automatically add or increment the `ApiCompatVersion` property to the project when it detects that the version it is changing was a GA version which usually indicates that we just shipped that GA version and so it should be the new baseline for api checks.

### Releasing a new version of a GA'ed libary
Since the [eng/Packages.Data.props](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Packages.Data.props) is currently maintained manually, you will need to update the version number for your library in this file when releasing a new version.
Expand Down
81 changes: 81 additions & 0 deletions common/ManagementTestShared/ManagementRecordedTestBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Linq;
using System.Threading.Tasks;

using Azure.Core;
using Azure.Core.TestFramework;
using Azure.Management.Resources;

namespace Azure.ResourceManager.TestFramework
{
public abstract class ManagementRecordedTestBase<TEnvironment> : RecordedTestBase<TEnvironment> where TEnvironment: TestEnvironment, new()
{
private static TimeSpan ZeroPollingInterval { get; } = TimeSpan.FromSeconds(0);

protected ResourceGroupCleanupPolicy CleanupPolicy { get; set; }

protected ManagementRecordedTestBase(bool isAsync) : base(isAsync)
{
}

protected ManagementRecordedTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode)
{
}

protected ValueTask<Response<T>> WaitForCompletionAsync<T>(Operation<T> operation)
{
if (Mode == RecordedTestMode.Playback)
{
return operation.WaitForCompletionAsync(ZeroPollingInterval, default);
}
else
{
return operation.WaitForCompletionAsync();
}
}

protected ResourcesManagementClient GetResourceManagementClient()
{
var options = Recording.InstrumentClientOptions(new ResourcesManagementClientOptions());
CleanupPolicy = new ResourceGroupCleanupPolicy();
options.AddPolicy(CleanupPolicy, HttpPipelinePosition.PerCall);

return CreateClient<ResourcesManagementClient>(
TestEnvironment.SubscriptionId,
TestEnvironment.Credential,
options);
}

protected async Task CleanupResourceGroupsAsync()
{
if (CleanupPolicy != null && Mode != RecordedTestMode.Playback)
{
var resourceGroupsClient = new ResourcesManagementClient(
TestEnvironment.SubscriptionId,
TestEnvironment.Credential,
new ResourcesManagementClientOptions()).ResourceGroups;
foreach (var resourceGroup in CleanupPolicy.ResourceGroupsCreated)
{
await resourceGroupsClient.StartDeleteAsync(resourceGroup);
}
}
}

protected async Task<string> GetFirstUsableLocationAsync(ProvidersOperations providersClient, string resourceProviderNamespace, string resourceType)
{
var provider = (await providersClient.GetAsync(resourceProviderNamespace)).Value;
return provider.ResourceTypes.Where(
(resType) =>
{
if (resType.ResourceType == resourceType)
return true;
else
return false;
}
).First().Locations.FirstOrDefault();
}
}
}
34 changes: 34 additions & 0 deletions common/ManagementTestShared/ResourceGroupCleanupPolicy.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Collections.Generic;
using System.Text.RegularExpressions;

using Azure.Core;
using Azure.Core.Pipeline;

namespace Azure.ResourceManager.TestFramework
{
public class ResourceGroupCleanupPolicy : HttpPipelineSynchronousPolicy
{
private Regex _resourceGroupPattern = new Regex(@"/subscriptions/[^/]+/resourcegroups/([^?/]+)\?api-version");
private readonly IList<string> _resourceGroupCreated = new List<string>();

public IList<string> ResourceGroupsCreated
{
get { return _resourceGroupCreated; }
}

public override void OnSendingRequest(HttpMessage message)
{
if (message.Request.Method == RequestMethod.Put)
{
var match = _resourceGroupPattern.Match(message.Request.Uri.ToString());
if (match.Success)
{
_resourceGroupCreated.Add(match.Groups[1].Value);
}
}
}
}
}
15 changes: 12 additions & 3 deletions doc/dev/Track2TestFramework.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Acquiring TestFramework

To start using test framework import `sdk\core\Azure.Core\tests\TestFramework.props` into test `.csproj`:
To start using Test Framework add a project reference using the alias `AzureCoreTestFramework` into your test `.csproj`:

``` xml
<Project Sdk="Microsoft.NET.Sdk">

...
<Import Project="..\..\..\core\Azure.Core\tests\TestFramework.props" />
<ProjectReference Include="$(AzureCoreTestFramework)" />
...

</Project>

```
As an example, see the [Template](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/template/Azure.Template/tests/Azure.Template.Tests.csproj#L15) project.

# Sync-async tests

Expand Down Expand Up @@ -182,13 +183,19 @@ __NOTE:__ recordings are copied from `netcoreapp2.1` directory by default, make

## Sanitizing

Secrets that are part of requests, responses, headers or connections strings should be sanitized before saving the record. Common headers like `Authentication` are sanitized automatically but if custom logic is required `RecordedTest.Sanitizer` should be used as extension point.
Secrets that are part of requests, responses, headers, or connections strings should be sanitized before saving the record. Common headers like `Authentication` are sanitized automatically but if custom logic is required and/or if request or response body need to be sanitied, the `RecordedTest.Sanitizer` should be used as extension point.

For example:

``` C#
public class ConfigurationRecordedTestSanitizer : RecordedTestSanitizer
{
public ConfigurationRecordedTestSanitizer()
base()
{
JsonPathSanitizers.Add("$..secret");
}

public override void SanitizeConnectionString(ConnectionString connectionString)
{
const string secretKey = "secret";
Expand All @@ -209,6 +216,8 @@ For example:
}
```

**Note:** `JsonPathSanitizers` takes [Json Path](https://www.newtonsoft.com/json/help/html/QueryJsonSelectToken.htm) format strings that will be validated against the body. If a match exists, the value will be sanitized.

## Matching

When tests are ran in replay mode HTTP method, uri and headers are used to match request to response. Some headers change on every request and are not controlled by the client code and should be ignored during the matching. Common headers like `Date`, `x-ms-date`, `x-ms-client-request-id`, `User-Agent`, `Request-Id` are ignored by default but if more headers need to be ignored use `Recording.Matcher` extensions point.
Expand Down
43 changes: 16 additions & 27 deletions eng/ApiCompat/ApiCompat.csproj
Original file line number Diff line number Diff line change
@@ -1,40 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--This project is used to enforce API compatibility between the GA'ed libraries and the most recent version available on Nuget. The most recent
<!--
This project is used to enforce API compatibility between the GA'ed libraries and the most recent version available on Nuget. The most recent
version is restored from Nuget via the package references below. The ApiCompatVerification target, specified below, is referenced in the
eng/Directory.Build.Data.targets file which causes this target to be executed for each csproj that has the EnableApiCompat parameter set to true.
The EnableApiCompat parameter defaults to the value of the IsShippingClientLibrary parameter, which is defined in the eng/Directory.Build.Data.props file.-->
eng/Directory.Build.Data.targets file which causes this target to be executed for each csproj that has an ApiCompatVersion set.
-->
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RunApiCompatForSrc>true</RunApiCompatForSrc>
<IntermediateOutputPath>$(IntermediateOutputPath)/$(TargetPackageName)</IntermediateOutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.ApiCompat" />
<PackageReference Include="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.19552.1" />
<PackageReference Include="$(TargetPackageName)" Version="$(TargetPackageVersion)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Core" />
<PackageReference Include="Azure.Data.AppConfiguration" />
<PackageReference Include="Azure.Messaging.EventHubs" />
<PackageReference Include="Azure.Messaging.EventHubs.Processor" />
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Azure.Security.KeyVault.Certificates" />
<PackageReference Include="Azure.Security.KeyVault.Keys" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" />
<PackageReference Include="Azure.Storage.Blobs" />
<PackageReference Include="Azure.Storage.Blobs.Batch" />
<PackageReference Include="Azure.Storage.Common" />
<PackageReference Include="Azure.Storage.Files.Shares" />
<PackageReference Include="Azure.Storage.Queues" />
<PackageReference Include="Microsoft.Extensions.Azure" />
</ItemGroup>

<Import Project="..\Packages.Data.props" />

<Target Name="ApiCompatVerification" DependsOnTargets="_ResolveResolvedMatchingContract;$(TargetsTriggeredByCompilation)">
<Target Name="_VerifyTargetPackageInfo">
<Error Condition="'$(TargetPackageName)' == ''" Text="TargetPackageName is not set!" />
<Error Condition="'$(TargetPackageVersion)' == ''" Text="TargetPackageVersion is not set!" />
<Error Condition="'$(TargetOutputPath)' == ''" Text="TargetOutputPath is not set!" />
</Target>

<Target Name="ApiCompatVerification"
DependsOnTargets="_VerifyTargetPackageInfo;
Restore;
_ResolveResolvedMatchingContract;
$(TargetsTriggeredByCompilation)" />

<Target Name="_ResolveResolvedMatchingContract" DependsOnTargets="ResolveReferences">
<PropertyGroup>
<TargetPackageDll Condition="'%(ResolvedCompileFileDefinitions.NuGetPackageId)' == '$(TargetPackageName)'" >%(ResolvedCompileFileDefinitions.Identity)</TargetPackageDll>
Expand All @@ -45,8 +36,6 @@
<_DependencyDirectories Include="$(TargetOutputPath)" />
<ReferencePath Remove="$(TargetPackageDll)" />
</ItemGroup>
<Error Condition="'@(ResolvedMatchingContract)' == ''"
Text="Unable to find dll for $(TargetPackageName). Make sure it is included in list of Package References if the ApiCompatVerification target (defined in eng/ApiCompat/ApiCompat.csproj) is intended to run for this package. If ApiCompatVerification should not be run, set the EnableApiCompat parameter to false in the csproj file." />
<Message Text="Running ApiCompatVerification against $(TargetPackageDll) using assemblies from $(TargetOutputPath)" Importance="High" />
</Target>
</Project>
45 changes: 45 additions & 0 deletions eng/Azure.Management.Test.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ManagementTestSharedSources>$(MSBuildThisFileDirectory)/../common/ManagementTestShared</ManagementTestSharedSources>
<RbacSharedSources>$(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Graph.Rbac/src</RbacSharedSources>
<Resources201705SharedSources>$(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Management.Resources.2017_05/src</Resources201705SharedSources>
<Compute201912SharedSources>$(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Management.Compute.2019_12/src</Compute201912SharedSources>
<Network202004SharedSources>$(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Management.Network.2020_04/src</Network202004SharedSources>
<Storage201906SharedSources>$(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Management.Storage.2019_06/src</Storage201906SharedSources>
</PropertyGroup>

<ItemGroup Condition="'$(TestHelperProjects)' != ''">
<Compile Include="$(ManagementTestSharedSources)/**/*.cs"
Link="TestShared/%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup Condition="$(TestHelperProjects.Contains('Rbac1.6'))">
<Compile Include="$(RbacSharedSources)/**/*.cs"
Link="Rbac/%(RecursiveDir)%(Filename)%(Extension)"
Exclude="$(RbacSharedSources)/Properties/AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup Condition="$(TestHelperProjects.Contains('Resources201705'))">
<Compile Include="$(Resources201705SharedSources)/**/*.cs"
Link="Resources201705/%(RecursiveDir)%(Filename)%(Extension)"
Exclude="$(Resources201705SharedSources)/Properties/AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup Condition="$(TestHelperProjects.Contains('Compute201912'))">
<Compile Include="$(Compute201912SharedSources)/**/*.cs"
Link="Compute201912/%(RecursiveDir)%(Filename)%(Extension)"
Exclude="$(Compute201912SharedSources)/Properties/AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup Condition="$(TestHelperProjects.Contains('Network202004'))">
<Compile Include="$(Network202004SharedSources)/**/*.cs"
Link="Network202004/%(RecursiveDir)%(Filename)%(Extension)"
Exclude="$(Network202004SharedSources)/Properties/AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup Condition="$(TestHelperProjects.Contains('Storage201906'))">
<Compile Include="$(Storage201906SharedSources)/**/*.cs"
Link="Storage201906/%(RecursiveDir)%(Filename)%(Extension)"
Exclude="$(Storage201906SharedSources)/Properties/AssemblyInfo.cs" />
</ItemGroup>
</Project>
10 changes: 7 additions & 3 deletions eng/CodeGeneration.targets
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>

<PropertyGroup>
<_AutoRestVersion>https://github.com/Azure/autorest/releases/download/autorest-3.0.6222/autorest-3.0.6222.tgz</_AutoRestVersion>
<_AutoRestCoreVersion>3.0.6282</_AutoRestCoreVersion>
<_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200527.1/autorest-csharp-v3-3.0.0-dev.20200527.1.tgz</_AutoRestCSharpVersion>
<_AutoRestVersion>https://github.com/Azure/autorest/releases/download/autorest-3.0.6223/autorest-3.0.6223.tgz</_AutoRestVersion>
<_AutoRestCoreVersion>3.0.6283</_AutoRestCoreVersion>
<_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200612.2/autorest-csharp-v3-3.0.0-dev.20200612.2.tgz</_AutoRestCSharpVersion>
<_SupportsCodeGeneration Condition="'$(IsClientLibrary)' == 'true'">true</_SupportsCodeGeneration>
<_DefaultInputName Condition="Exists('$(MSBuildProjectDirectory)/autorest.md')">$(MSBuildProjectDirectory)/autorest.md</_DefaultInputName>
<AutoRestInput Condition="'$(AutoRestInput)' == ''">$(_DefaultInputName)</AutoRestInput>
Expand Down Expand Up @@ -48,3 +48,7 @@







Loading

0 comments on commit 4c84801

Please sign in to comment.