Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase #5

Merged
merged 54 commits into from
Mar 7, 2022
Merged

rebase #5

merged 54 commits into from
Mar 7, 2022

Conversation

chunyu3
Copy link
Owner

@chunyu3 chunyu3 commented Mar 7, 2022

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

ArcturusZhang and others added 30 commits March 1, 2022 13:39
* remove everything

* regenerate

Co-authored-by: Yao Kou <[email protected]>
* remove for renaming

* regenerate compute

* update api

* fix test cases

* update

* remove everything

* regenerate

* update api

* regenerate

* update api

* fix and regenerate

Co-authored-by: Yao Kou <[email protected]>
The focus of these changes is to add guidance to the event publishing sample,
calling out the impact of code running in the event handlers for the buffered
producer client.
…27259)

* revert transactional checksums

* revert part 2

* exportapi

* fix md5 false condition

* fix mock

* fix datalake mock

* fix accidental file deletion

* changelog

Co-authored-by: jschrepp-MSFT <[email protected]>
Co-authored-by: Sean McCullough <[email protected]>
* 12767912: Add isLocalInference in the public SDK

* Rename the variable

* Thick clent feature (#5)

* 12767907: Add a package dependency on Microsoft.RL

* Add RankProcessor

* Remove unused file

* Remove some key

* Toggle commented codes so that most tests can pass

* Getting the required config details for rankprocessor to enable livemode

* Updating the wrong variable name

* Cleanup

* Revert "12767907: Add a package dependency on Microsoft.RL"

This reverts commit c586920.

* Revert "Add RankProcessor"

This reverts commit 43967d3.

* Revert "Remove unused file"

This reverts commit 1e400a8.

* Revert "Toggle commented codes so that most tests can pass"

This reverts commit 7ec50ec.

* Delete DisposeHelper.cs

* Revert "Revert "12767907: Add a package dependency on Microsoft.RL""

This reverts commit d6df6b5.

* Cleanup after reverting

* generating client configuration using autorest

* Revert "generating client configuration using autorest"

This reverts commit 6b75695.

* Configuration details for livemodel

* cleanup

* cleanup

* Added ToDo comments

* correct the version in endpoints

Co-authored-by: Tejaswi Paruchuri <[email protected]>
Co-authored-by: Tparuchuri <[email protected]>

* 12768045: Add rank processor for single slot (#3)

Add RankProcessor

Remove unused file

Remove some key

Toggle commented codes so that most tests can pass

RankProcessor is working. Still need to clean up the codes

Add test json files

only construct LiveModel when localInference is true

Move rankprocessor to under model

Add latest generated files from autorest

Add autogenerated files from autorest

Fix the setting in DecisionContext

Remove wrong comment

Revert unexpected auto-generated file changes

Addressed a comment

Move suppression to GlobalSuppressions.cs

Remove the decoration in MultiSlotClient.cs

Refactor rankProcessor so that the actions is not modified and restored;
added a converter between sdk and Rl.Net; replace Newtonsoft.json with
System.Text.Json

Address comments

Refactor RlObjuectConverter; remove some unneeded setters, etc.

Added unit tests for RlObjectConverter, DecisionContext,
JsonRawStringListConverter

Remove unused using

* 13009290: Create RankProcessor class to Azure Personalizer client library for .NET for multi slot (#7)

* 13009290: Create RankProcessor class to Azure Personalizer client
              library for .NET for multi slot

* Address comments

* Subsampling

* Cleanup and added tests

* Cleanup and added tests

* cleanup

* cleanup

* Single SubSample rate

* Cleanup

* Cleanup

* Variable name

* 13192221: Point to the Rl.Net nuget package from SDK dev drop (#9)

* Adding test code for Model/Put api and moving to preview.3

* Johnhuang/13216589 reward activate local inference api (#10)

* Update API view file

* 13216589: Add local inference reward api
13216590: Add local inference activate api

* Fix the comments

* Remove IsDisposed method

* Revert "Update API view file"

This reverts commit 0a4dcbf.

* Remove MultiSlotClient class as it is never used

* Add more change after other PRs were merged

* Revert "Add more change after other PRs were merged"

This reverts commit 35a3120.

* 13225147: Update API view file for thick client (#11)

* 13225147: Update API view file for thick client

* Remove some suppressing warning

* Add more changes after 2 PRs were merged

* lazy load rank processor, refresh config  and relaod token on expiry (#12)

* lazy load rank processor, refresh config  and relaod token on expiry

* Comments & Cleanup

* Cleanup

* Addressed comments

* Cleanup

* Fix conflict

Co-authored-by: John Huang <[email protected]>

* 13309375: Improve the tests by mocking LiveModel when test mode is (#14)

* 13309375: Improve the tests by mocking LiveModel when test mode is
	  Playback but using real LiveModel when test mode is Live

* Change some public classes to private

* Address those comments in the main PR

* Update Microsoft.RL version

* Rename some properties

* Update Microsoft.RL version

* Fix spelling check

* Remove the unneeded warning

* Update live model config

* Use similar method names for export and import apis

* Johnhuang/13170630 address thick client sdk review (#18)

* 13170630: Address comments from SDK review

* Update API view file

* Remove unnecessary file under Gerated folder

* Add more test for RLObjectConverter

* Remove unused parameter

* Remove unneeded comment

* Update recording sessions for tests that were changed in earlier commit. (#19)

Co-authored-by: Personalizer Team <[email protected]>

* Update api view file after model api change (#20)

* Rename modelStream to modelBody (#21)

* Update Microsoft.RL version

* 13678440: Some cosmetic change to address comments from DotNet team (#22)

* Update method names for Export/Import models as per suggestions. (#23)

* Update method names for Export/Import models as per suggestions.

* Updates after running codecheck.ps1 script

Co-authored-by: Personalizer Team <[email protected]>

Co-authored-by: Tejaswi Paruchuri <[email protected]>
Co-authored-by: Tparuchuri <[email protected]>
Co-authored-by: Personalizer Team <[email protected]>
Co-authored-by: Sharath Malladi <[email protected]>
* Stop the processor when disposing listener

* PR fb
* Identity Updating Troubleshooting guide

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* fb

* fix links

* ungerunding headers

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* more fb

* more fb

* Update sdk/identity/Azure.Identity/TROUBLESHOOTING.md

Co-authored-by: Christopher Scott <[email protected]>

* add additional help section

* fb

* add permission issues section

* fb

* make image link absolute

Co-authored-by: Christopher Scott <[email protected]>
* SDK generation from 2021-12-01 Compute Swagger

* AssemblyInfo Update

* Generated from main branch in Swagger repo

* added tests for Architecture (#27217)

* added tests for Architecture

* updated tests

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

* adding customizations

* Disk tests recordings

* restore point test

* test recording

* fix customization, and CI

Co-authored-by: Ryan <[email protected]>
Co-authored-by: rytruong <[email protected]>
Co-authored-by: Theodore Chang <[email protected]>
…2-01-preview API (#27178)

* Update SDK with generated contents, SDK version and mgmt metadata

* Recover transfer tests and update session records

* Add scope map, token and connected registry tests. Update Session Records

* PR Feedback: Delete resource dependencies
* Clean up unused codes and dependencies

* fix the only deleted files

Co-authored-by: sima-zhu <[email protected]>
1. change `DefaultScope` to return null when initialized by `default` keyword
2. improve the performance of `DefaultScope` a little bit
3. use common `HashCodebuilder` to generate the hash code

follow up of #26635
* update to use common source for operation includes

* missed a remove from storage
* add missing regions

* update api
* add lro enum

* add comments

* update api
* allow version override. update proxy-docker so that logging will work properly
* update targeted tags to common dev versioning scheme
* change to target_version.txt instead of a variable in docker-start-proxy.ps1

Co-authored-by: scbedd <[email protected]>
Co-authored-by: Ben Broderick Phillips <[email protected]>
* Add logging of cache size

* Remove unused method

* Fix

* Cache total length
…t` (#27197)

* Update REST Api commit to d850f41f
Update generated code and public API
Add `AliasesRestClient`, `SearchAlias` and `ListAliasesResult`

* Expose `AliasesRestClient` operations from `SearchindexClient`

* Change type of `SearchAlias.ETag` to `Azure.ETag`

* Update Changelog

* Rename `ListAliases()` to `GetAliases()`
Add a ctor to simplify creating a `SearchAlias` against a single index

* Create a new model factory method for `SearchServiceCounters`
The new method takes in `aliasCounter` as a parameter.

* Make `GetAliases()` return a `Pageable` type

* Remove setter from `SearchAlias.ETag`
* remove PartA/B/C reference

* remaining changes
* Normalize LinkBase for Azure.Core shared files

* Revert changes for Azure/azure-sdk-tools#2434

* Compare recorded bodies

Seems in the course of creating predictable results, I inadvertently fixed #11634.

* Don't enumerate JsonPathSanitizers twice

Fixes #27310
* Improve Cosmos Emulator logic

* Run cosmos db emulator in two steps

* Using povershell < core for emulator

* add retry logic to cosmosdb-emulator launch

* Add Retry step fir cosmos emulator launch

Co-authored-by: Chidozie Ononiwu <[email protected]>
ArthurMa1978 and others added 24 commits March 3, 2022 10:32
* remove connectedvmware files to solve case-sensitive file name issue

* Init Azure.ResourceManager.DesktopVirtualization

* fix spellcheck

* Bunch of renames

* tab to spaces

* clean up generated code for regen with right file name

* regen
* Allow manual lock renewal from processor and function extension

* Fix

* Remove lockeduntil because it can change

* Fix
# Contributing to the Azure SDK

Please see our [CONTRIBUTING.md](https://github.com/Azure/azure-sdk-for-net/blob/main/CONTRIBUTING.md) if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see [this section](https://github.com/Azure/azure-sdk-for-net/blob/main/CONTRIBUTING.md#pull-request-etiquette-and-best-practices).
Fixed the type  and adding a link to sample Fixes #18347
…7341)

* Update change log for 2.0.0-beta.2 of Personalizer

* Make code types stand out
* Update webpubsub snippets

* change strategies
* Add new Media enum values

* Update version
… take ReadOnlySpan<ushort> (#27334)

* Fix bug blocking DPG and sm API updates

* export API

* update tests
* Remove RequestOptions

* export API
* Fix SB extension tests

* Fix

* Fix flaky tests
* update to translation LRO to not prefecth first page

* revert record mode comment
* feat(core): implement exponential polling strategy

1. add `IOperationPollingStrategy` and 2 implementation
  1.1 `ConstantPollingStrategy` is for constant polling interval
  1.2 `ExponentialPollingStrategy` is for exponential polling interval starting from 1 second up to 32 seconds
2. refactor `OperationInternalBase` and `OperationInternalOfT`:
  2.1 replace `DefaultPollingInterval` with `PollingStrategy`
  2.2 override implementation of `WaitForCompletionResponseAsync` and `WaitForCompletionAsync`, use interval from `PollingStrategy.PollingInterval`
3. add unit test cases, and update project build dependencies

part of #26922

* update according to review comments

1. change interface `IOperationPollingStrategy` to abstract class `OperationPollingStrategy`
  1.1 move common logic of `GetServerDelay` into `OperationPollingStrategy`
  1.2 change `PollingInterval` to `GetNextWait(response)` to be more specific and fit the new logic
2. change polling sequence of `ExponentialPollingStrategy` to `1, 1, 1, 2, 4 ... 32`
3. consolidate polling logic into `OperationInternalBase.PollingResponseAsync`
4. change implementation of `TestLroOperation.cs` to get rid of dependency on `OperationInternals` which is located in `autorest.csharp`
  4.1 I can restore the dependency by doing the similar change like `OperationInternalBase`, but that could be overkill, so I choose a simple change.
5. update test cases and build dependency

* split polling strategy logic according to review comments

1. add two polling strategy implementation: `ZeroPollingStrategy` and `RetryAfterPollingStrategy`
  1.1 `ZeroPollingStrategy` is for testing purpose (e.g play back test recordings)
  1.2 `RetryAfterPollingStrategy` is used when detecting the server side support `retry-after` header, and corresponding logic is removed from `ConstantPollingStrategy` and `ExponentialPollingStrategy`.
2. change constructor of `OperationInternalBase` and its subclasses
  2.1 add a polling strategy parameter
  2.2 change polling strategy initialization logic, now it will"
    2.2.1 first check if there is any `retry-after` header, if so then adopt `RetryAfterPollingStrategy`
    2.2.2 then adopt the passed-in polling strategy
    2.2.3 fall back to `ConstantPollingStrategy` if none is adopted
  2.3 change the interval detemination logic of `WaitForCompletionResponseAsync(TimeSpan, CancellationToken)`. Now we adopt the max value of the passed-in interval and the interval determined by polling strategy.
3. update test cases and build dependencies

* update according to review comments

1. move `OperationInternalBase.ChoosePollingStrategy()` to `OperationPollingStrategy` class
2. make `OperationInternalBase.PollingStrategy` private and update test cases
3. update polling strategy implementation
  3.1. `ConstantPollingStrategy` will return max value of initial constant interval and the passed-in interval
  3.2. `ZeroPollingStrategy` will always return 0
  3.3. `ExponentialPollingStrategy` will always return sequence value
  3.4. `RetryAfterPollingStrategy1 will return max value of retry-after and passed-in interval
  3.5. update test cases
4. add back `OperationInternalBase.DefaultPollInterval`
5. move some common logic into `OperationPollingStrategy`

* implement `OperationPoller`

1. add `OperationPoller` and `OperationPoller<T>` as the common polling logic implementation
2. replace the polling logic in `OperationInternalBase`, `Operation` and `OperationOfT`.
3. update build dependencies

* wip refactor

* remove unused delegate

* temp - add back polling interval

* renames to represent this is a delay strategy and separate from operations which can be used in many places

* renaming polling param

* more minor refactoring

* comment change

* updates for non T in test framework

* update test cases

* fix zero interval for test recording playback

1. fix a type comparison error when using project reference (lro.BaseType.BaseType is from `Operation` in `Azure.ResourceManager`, not `Azure.Core`)
2. unify the zero interval polling logic, since we've dumped the special zero interval handling in `Operation.GetServerDelay`

* add files to make autorest changes

* tweak to code for autorest

* update dataplance csproj files

* missed a couple csproj files

* add new files to common lro includes

* update common lro files

* fix folder for shared files

* remove duplicate compiles

* update 2 more duplicate compiles

* address comments from Azure/autorest.csharp#2000

* update who owns defaulting

* Update AutoRest C# version to 3.0.0-beta.20220302.4

* fix polling strategy tests

* update latest autorest.csharp 3.0.0-beta.20220303.1

* disable some operation internal tests

those tests are not working, because we no longer override `OperationInternalBase.WaitAsync`

* update OperationInterceptor.cs

1. more precise reflection on the generic types
2. update `RecordedTestBaseTest`
  2.1 update `CustomOperation` due to polling architecture change
  2.2 update `WaitForCompletionDoesntWaitDuringPlayback` since in playback mode, `CustomOperation.WaitForCompletionAsync` won't be called. Instead, it's intercepted. So we need to use `DateTimeOffset` to check the interval.

* update to tests

* update so interceptor works with true or false scenarios for no wait in mgmt plane

* fix failure in `TestResourceOperationOrResponseOfT`

Move exception throwing into `UpdateStatus` and `UpdateStatusAsync`, since the `WaitForXXX` operation will be intercepted and delegate to `OperatonPoller`.

* fix test timeout in `Azure.Communication.PhoneNumbers`

1. add `InstrumentOperation` before `operation.WaitForXXX`
2. remove the zero timespan in playback mode, since the operation interceptor will poll by zero timespan

* update api for sync wait methods

* update to translation LRO to not prefecth first page

* regen desktopvirtualization

* add back in cancellation token forwarding

* add pr comments

Co-authored-by: m-nash <[email protected]>
Co-authored-by: m-nash <[email protected]>
* migrate one last duplication into the new poller / delay

* update references that are needed for lro
Fix links and change to latest snippet.
* refactor storagetransmisionevaluator and add tests

* change time calculation

* use stopwatch instance

* rename

* minor

* extra assert

* use stopwatch for calculating export duration

* move sw to exporter

* rename

* typo

* resolve pr comments
@chunyu3 chunyu3 merged commit 42e2cc8 into chunyu3:main Mar 7, 2022
chunyu3 pushed a commit that referenced this pull request Feb 26, 2024
* Update autorest.md file with latest swagger and allow model duplication

* Generate and upgrade sdk code

* Customize redis common configuration code to include aad-enabled

* Regenerate API file

* Customize redis common configuration code to include aad-enabled

* Mitigate breaking change

* Create empty test-resources.json

* Create FlushFunctionalTests.cs

* Update assets.json

* Add functional tests for aad (#2)

Adds functional tests for aad

* Update Channel Tests (#3)

* Oscarba/fix (#4)

* Update Channel Tests

* Update correct data type

* Push regenerated code

* UpdateChannelFix (#5)

* Update Channel Tests

* Update correct data type

* Update test

* Update tag for assets after push for recordings

* Address reviewer comments

* Update generatred code after mergin in main

* Update FTs for updated models

* Update AAD FT

* Update assets.json

* Update changelog

---------

Co-authored-by: Kanchan Joshi <[email protected]>
Co-authored-by: Austin Tolani <[email protected]>
Co-authored-by: Oscar Barbosa Aquino <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.