Граф коммитов

1597 Коммитов

Автор SHA1 Сообщение Дата
Kiran Kumar Kolli 56811c9902
INTERNAL Range: Fixes Range type serialization to not allow NOT supported combinations (#4680)
* Range type serialization assumption to not allow NOT suported combinations

* Fixing incorrect conflict resolution

* Addressing the PR comments
2024-09-18 20:47:21 +00:00
Nalu Tripician 5948484baa
SDK 3.43.1 : Adds version bump and changelog (#4698)
* Changelog + version bump

* refactoed update message

* fixed version
2024-09-18 18:38:44 +00:00
Sourabh Jain 6623de9434
Open Telemetry: Fixes Operation name to follow Otel convention (#4643)
* Changed Operation name according to open telemetry convention

* fix tests

* updated baseline

* fix tests

* renamed ops name

* fixed operatio name

* reverted few files

* append prefix

* fix tests

* remove commented code

* fix activity name

* code refatot for different operation name for diagnostics

* baseline files

* fix tests

* refcator code

* fix test

* remove stream

* feediterator changes

* fix bugs

* further fixes

* typo fix

* fix test
2024-09-17 18:31:37 -07:00
Debdatta Kunda 7839885dde
ClientRetryPolicy: Adds Cross Regional Retry Logic on 429/3092 (#4691)
* Initial code changes to throw 503 on 429/3092.

* Updated client retry policy. Added more tests to cover 429/3092.

* Code changes to update direct package version. Updating the tests.

* Code changes to refactor client retry policy.

* Minor code cleanup.

* Reverting the direct version bump up change.

* Code changes to address some of the review comments.

* Code changes to move failover logic in client retry policy.

* Minor code clean up.

* Code changes to clean up some cosmetic items.

* Further clean up.

* Code changes to address review comments.

* Minor refactor to address cosmetic update.

* Code changes to address cosmetic review comment.
2024-09-17 18:17:30 +00:00
Nalu Tripician b757f8c38a
Hedging: Fixes Typo (WithAvailibilityStrategy -> WithAvailabilityStrategy) in CosmosClientBuilder (#4684)
* Update CosmosClientBuilder.cs

fixed typo

* Update DotNetPreviewSDKAPI.json
2024-09-13 18:40:17 +00:00
Kiran Kumar Kolli d4c9438178
Dependencies: Fixes Pinning System.Net.Http and System.Text.RegularExpressions to latest patched versions (#4676)
* Pinning System.Net.Http and System.Text.RegularExpressions to latest patched versions

* Fixing the unit test
2024-09-12 12:49:49 +02:00
Nalu Tripician 0fdb5e4222
SDK 3.43.0: Adds version bump and changelog (#4666)
* added project refrence

* update changelog and version bump

* contracts

* removed unreleated change

* Update changelog.md

Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>

* Update changelog.md

Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>

* update heding description

---------

Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>
2024-09-04 20:08:59 +00:00
Nalu Tripician cbf69c6308
added project refrence (#4661) 2024-09-04 14:36:57 -04:00
Nalu Tripician d242b8582e
Hedging: Adds Read hedging PREVIEW contracts (#4598)
* Update contracts

* removed unneeded changes

* made other contracts public

* update enable method

* comments

* contract update

* changed eneabled to internal

* fixed internal method

* Revert "fixed internal method"

This reverts commit f7da9f06c4.

* revert + change methods to internal

* fixed internal

* changed to factory creation

* disabledstrat fix

* fixed test + contracts

* xml changes

* updated comments

* Fixed Tests

* requested changes

* added client options check and one region check

* fix get

* fixed test

* fixed set

* fix client options

* updatecontracts

* requested changes

* fixed validate method

* Delete MultiRegionSetupHelpers.cs

removed file

* update contracts

* fixed merge

* fixed check
2024-08-29 09:59:44 -04:00
Nalu Tripician 6d603f54bd
[Internal] Hedging: Refactors Tests (#4641)
* test improvements

* fixed other multiregion test

* requested changes

* test fix

* adds util function for multiregion setup

* fixed util method/class

* parallelize tasks
2024-08-23 08:19:02 -07:00
Philip Thomas a1144f4f08
CF/P AVAD: Fixes Deserialization of ChangeFeedItem and ChangeFeedMetadata to support System.Text.Json and Newtonsoft.Json (#4618)
* checkin in

* support for both STJ and NSJ

* update contracts.

* name change PreviousLsn

* STJ TypeConverter support for ChangeFeedMetadata

* adding bacl StringEnumConverter

* test for Writes ChangeFeedMetadata

* removing DateTimeOffset as results are inconsistent.

* trying to get GMT, not local

* static UnixEpoch

* static qualifier in tests

* PropertyNameCaseInsensitive = false tests. copy of True tests.

* setting PropertyNameCaseInsensitive correctly for tests

* removed duplication for propertyNameCaseInsensitive tests

* remove JsonStringEnumConverter(), from tests

---------

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
2024-08-21 21:42:46 +00:00
Philip Thomas ee33928d18
CFP AVAD: Adds new FeedRange to ChangeFeedProcessorContext (#4621)
* checkin with test

* fix tests and run UpdateContracts

* Update Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/FeedProcessing/ProcessorOptions.cs

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>

* add validation of feed range to exising tests. reemove other test.

* Update Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedProcessorContext.cs

Co-authored-by: Ruben Bartelink <ruben@bartelink.com>

* update summary for FeedRange.

* make validatecontext async

* adding back these tests

* remove return and asserts.

---------

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
Co-authored-by: Ruben Bartelink <ruben@bartelink.com>
Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>
2024-08-14 15:10:23 +00:00
Matias Quaranta 7bc8e3ce88
FeedRanges: Fixes GetFeedRangesAsync throwing DocumentClientException (#4640)
* Fix

* tests

* Remove unused
2024-08-13 13:03:42 -04:00
Matias Quaranta 47596bd007
Documentation: Fixes AnalyticalStoreTimeToLiveInSeconds API documentation to list correct values (#4638)
* Updating API doc

* Wording
2024-08-12 21:30:03 +00:00
Nalu Tripician c2043ae85c
[Internal] Request Hedging: Refactors HedgeRegion diagnostics field to only show successful region (#4625)
* changed hedge region to only show sucessfull region

* added and updated tests

* discussion changes

* suggestions and test improvements

* test fix

* updated hedge context

* fix test

* no string conversion

* requested changes

* suggested changes

* remove and sort usings
2024-08-09 18:45:54 +00:00
Nalu Tripician c98e632170
[Internal] Request Hedging: Refactors Diagnostics Nesting so Hedge request show from RequestInvokerHandler Level (#4624)
* updated nesting

* made trace more resillient

* trace as input

* added beginning of test

* update test

* added wait for global replication

* using for FI client
2024-08-09 17:29:07 +00:00
Nalu Tripician 87b40da18c
[Internal] FaultInjection: Adds Fault Injection to main project (#4633)
* move files

* rename
2024-08-07 15:03:50 -07:00
Nalu Tripician 8c69757d36
[Internal] Request Hedging: Removes ExcludeRegions from Request Hedging Diagnostics (#4623)
* removed exclude region from hedging diagnostics

* ER will now show for hedging requests

* added test + nits

* moved test
2024-08-07 13:55:18 -04:00
Sourabh Jain 9deb6e5510
Open Telemetry: Adds Batchsize and Rename Batch Operation name in Operation Trace (#4622)
* Added batchsize and batchioperation name info
t p

* updated contracts

* checks

* changed logic

* cosmetic changes

* updated bacthc logic
2024-08-06 10:12:48 +00:00
Philip Thomas bdc4082c4f
CFP AVAD: Fixes issue where customers are allowed to use WithStartTime and WithStartFromBeginning with CFP AVAD. (#4619)
* checkin with tests

* Update Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedProcessorBuilder.cs

Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>

* Update Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedProcessorBuilder.cs

Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>

---------

Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>
2024-08-02 11:30:21 -07:00
neildsh aba2b2ce4c
Add new query feature for hybrid search (#4617) 2024-07-31 14:15:11 -07:00
Debdatta Kunda 908f037c8a
SystemTextJsonSerializer: Refactors Code to Introduce `SystemTextJsonSerializerOptions` to Set the Default STJ Serializer (#4589)
* Code changes to make STJ serializer public for preview.

* Code changes to make STJ serializer public for GA.

* Code changes to hide STJ serializer implementation behind a boolean flag.

* Code changes to fix tests.

* Revert "Code changes to fix tests."

This reverts commit c1ee171c22.

* Code changes to fix baseline test.

* Code changes to fix root cause.

* Code changes to update tests.

* Code changes to address review comments.

* Code changes to add serializer options as contract.

* Code changes to add serializer options as public contract in builder.

* Code changes to update contract to remove the STJ serializer boolean flag.

* Code changes to update summary.

* Code changes for minor cosmetic update.

* Code changes to fix xml comment.

* Code changes to move remarks to summary. Updated test.

* Code changes to move the validation logic in cosmos client options.

* Code changes to update contract.

* Code changes to remove client context core logic in cosmos client options.

* Code changes to update some tests.

* Code changes to update contract. Made cosmetic changes.
2024-07-30 08:51:51 -07:00
neildsh 7d7269bff0
[Internal] Query: Removes unused code and simplifies query pipeline classes (#4601)
* remove dead code

* Consolidate the pipeline stage classes

* Continue consolidating pipeline classes

* rename classes appropriately

* Fix build break
2024-07-26 13:06:52 -07:00
Nalu Tripician 38c89fd951
SDK 3.42.0: Adds version bump and changelog (#4603)
* update changelog and direcotry.build.props

* changelog

* changelog change

* api contracts

* changelog
2024-07-25 08:02:46 -07:00
Sourabh Jain 0f3e6ca366
[Internal] Client Telemetry: Fixes loggers (#4594)
* fix logger

* skipping latency record if it is in negative otherwise histogram will throw an exception, while recording it

* fix loggers
2024-07-24 06:28:26 -07:00
Aditya f277ce3428
[Internal] Query: Fixes ORDER BY issue when partial partition key is specified in RequestOptions in a query to sub-partitioned container (#4587)
* Initial commit.

* Addressed comments.

* Addressed remaining comments.

---------

Co-authored-by: neildsh <35383880+neildsh@users.noreply.github.com>
2024-07-18 08:34:48 -07:00
Debdatta Kunda 016e19f6de
[Internal] ClientRetryPolicy: Fixes Partition Failover on Next region when RG Fails with `HttpRequestException` (#4565)
* Code changes to fix some of the flakey tests.

* Code changes to fix client retry policy.

* Code changes to add tests to validate the scenario.
2024-07-16 09:45:39 -07:00
Nalu Tripician 6e1d40d339
ChangeFeed: Adds MalformedContinuationToken SubstatusCode to exception (#4583) 2024-07-15 13:40:20 -07:00
Nalu Tripician 3fd2ce6fe8
Routing: Adds Parallel Request Hedging (#4198)
* initial commit

* fix

* document client restore

* document client changes

* clientContextCore fix

* global endpoint manager fix

* pre test changes

* start of tests

* added dispose for cancellation token source

* test changes

* working test

* more testing

* removed unneeded changes

* revert changes to global endpoint manager (unneeded)

* requested changes

* requested changes

* moves logic into availability strategy

* adds disableStrategy type

* fixed test

* refactor should hedge

* refactor should hedge/adds can use availability strat

* fixed mocking test

* Update Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>

* requested changes

* fix enabled

* added preview flag

* fixed XML

* fixed preview flags

* fixed bugs

* nit

* changed preview flags + update contracts

* revert file for whitespace

* changed file back after update contract

* removed using

* requested changes

* fixed small bug

* fixed bug

* removed options from client builder

* removed usings

* constructor check

* fixed test

* added exclude region to logs

* lazy task create

* rename + lazy

* improvements and fixes

* Added XML commentes

* fixed xml comments

* small tweeks

* added fixes + tests

* added item check to tests

* changed test regions to match with CI accounts

* query test

* update test for multiregion CI pipelines

* enviroment var null check

* null checks

* perf tests

* revert benchmark project

* possible memory saving

* Tests/improvements

* extensive testing improvements + bug fixes

* removed unneeded changes

* nits

* fix hedge regions

* update contracts

* fix updatecontract

* test fix

* fixed areequal asserts

* ALTERNATE METHOD

* added readfeed FI operation type to tests

* requested changes and improvemtns

* list optimization

* fixed edge case diagnostics

* small fix

* small fixes

* refactor code

* fixed null issues

* null refrence

* bug fixes

* changed header clone to internal

* fixed API doc + test change

* removed unused method

* changed to internal

* fixed internal

* removed contract changes

* updated abstract class

* suggested changes

* small bug fixes/improvements

* nits and fixes

* removed unused method

* test fix + applicable region fix + error handeling

* fixed test

* fixed test

* location cache change

* requested changes

* fixed test

* nits

* headers change

* Update Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>

* simplifed method

* nit

* fixed change

* remove linq

* fixed faulty change

* reverted accidental test change

* removed tooManyRequests test - unlrelated bug

* removed tooManyRequests test - unlrelated bug

---------

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
2024-07-12 13:25:22 -07:00
Kiran Kumar Kolli b478595f17
[Internal] Tests: Adds Coverage to validate Cosmos .NET SDK versioning strategy (#4567)
* Unit test coverage to validate Cosmos .NET SDK versioning strategy

* Updating logic to fix the build version comparision

* Renamed a method

* Great catch on exception catching, fixing it

* Using Tests Logger
2024-07-11 15:11:01 -07:00
leminh98 5bba9a05b0
Query: Adds support for multi-value Group By query for LINQ (#4481)
* init

* Added tests

* Preliminary code

* baseline

* add ordering ignore to test cases

* upate baseline

* address code review 1

* Changed the way comparison between Anonymoustype object worked. Also added handling of multivalue case to call directly to leaf layer visitors, instead of going through the top level scalar expression visitor to avoid changing binding and context scope

* addressed code review

* address code review

* addressed missing field

---------

Co-authored-by: Minh Le (from Dev Box) <leminh@microsoft.com>
2024-07-09 04:07:50 +00:00
Joris Eijmberts 7867f549e8
Change Feed: Fixes incorrect exception messages in VersionedAndRidCheckedCompositeToken (#4580)
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
2024-07-08 13:20:56 -07:00
Sourabh Jain 6d36c36bc8
VM Metadata API: Adds an option to disable VM metadata API call (#4568)
* add env variable

* fixed tests

* removed try-catch

* add doc

* remove else

* put try-catch around test

* remove debugger

* update env variable name and updated known issue section

* updstade doc
2024-07-08 09:34:36 -07:00
neildsh 5287ffb4ba
Query: Adds distributed query gateway client pipeline stage (#4556)
* Add a DistributedQuery gateway mode to the v3 sdk

Fix up bug in the continuation token and plumb the page size. Add an integration test

Make distributed query pipeline kick in only for document queries. Make it backwards compatible with older continuation tokens. Add integration tests.

Revert change in TransactionBatchOperationResult

Fix up missing include in OptimisticDirectExecutionQueryBaselineTests

* Incorporate code review feedback

Hack together a parity test for queries that require distribution

Add more partitioned parity tests

A tiny bit of code clean up

rename PaginationOptions to ExecutionOptions

Rename PaginationOptions to ExecutionOptions

rename pagination options to execution options

remove warning disable pragmas

Commit missed changes

* Fix up build issues due to bad merge

* Add another overload for NetworkAttachedDocumentContainer that does not take a distributed query client

* Incorporate code review feedback

* Fix up baseline to account for the class rename
2024-07-02 11:51:22 -07:00
neildsh 0ae182303d
Query: Adds a new QueryFeature flag for MakeList and MakeSet (#4559) 2024-07-01 14:59:04 +00:00
neildsh 68f9725e43
Query: Removes compute specific logic from query pipelines that is no longer required (#4558)
* remove ExecutionEnvironment and the Compute flavor of the query pipeline stages

* Add changes that were missed in the last commit

* Remove GetCosmosElementContinuationToken from FeedIterator
2024-06-26 18:27:37 -07:00
Debdatta Kunda 65ce9a942b
Code changes to fix some of the flakey tests. (#4554) 2024-06-21 09:37:53 -07:00
Ezra Haleva 179d9a4930
Query: Adds Distribution for MakeList and MakeSet (#4490)
* added MakeList and MakeSet aggregators

* Added MakeList and MakeSet to AggregateQueryTests.cs

* Adjust Aggregators

* Add Array Aggregate Continuation Token Test

* Added group by coverage for MakeList and MakeSet

* address comments

* cleaning

* Refactored test to better detect when to ignore result order

* cleaning

* cleaning, update baseline

* cleaning

* removed old comment

* cleaning/refactoring

* cleaning

* Add explicit cases to hit continuation token limit.

* Added additional case to GroupBy tests

* cleaning

* cleaning

* cleaning, updated baseline test

* cleaning, updated baseline test

* Added coverage to QueryPlanBaselineTests.cs

* refactored
2024-06-20 23:09:56 +00:00
Philip Thomas aab02e502e
Change Feed / Processor AVAD: Fixes timeToLiveExpired missing from metadata (#4523)
* longrunning cfp avad test for ttl

* add more to comment

* internal set

* other tests fail with higher ms

* run updatecontracts

* Update Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/GetChangeFeedProcessorBuilderWithAllVersionsAndDeletesTests.cs

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>

* Update Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/GetChangeFeedProcessorBuilderWithAllVersionsAndDeletesTests.cs

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>

* Update Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/GetChangeFeedProcessorBuilderWithAllVersionsAndDeletesTests.cs

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>

* Update Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/GetChangeFeedProcessorBuilderWithAllVersionsAndDeletesTests.cs

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>

* using Logger.LogLine

* change back over to ManualResetEvent. fixed assert to look at Previous. keeping stopwatch just for logging. timeout at 5 minutes.

* Update GetChangeFeedProcessorBuilderWithAllVersionsAndDeletesTests.cs

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>

* try/finally

* removing ctor. making all set internal to address serialization issue. later PRs to test STJ de/serialization.

* fixing de/serialziation issue

* Update GetChangeFeedProcessorBuilderWithAllVersionsAndDeletesTests.cs

change timeout

* Update ReEncryption.csproj

1.11.4

* internal set change to CanWrite:True;

---------

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
2024-06-19 09:02:47 -07:00
Maya Painter c5ac103a63
[Internal] Query: Refactors ParallelCrossPartitionQueryPipelineStage to improve perf (#4548)
* init

* revert test

* remove sw

* nit

* cleanup
2024-06-18 19:25:44 +00:00
Debdatta Kunda 035d2297bf
[Internal] SystemTextJsonSerializer: Adds Default STJ Serializer (#4332)
* Code changes to add default STJ serializer.

* Code changes to add tests for STJ serializer.

* Code changes to rename files.

* Code changes to clean up files.

* Code changes to add more tests.

* Code changes to update respective contracts.

* Code changes to add more documentation.

* Code changes to add LINQ tests. Addressing few review comments.

* Code changes to fix build failures.

* Code changes to update contract files.

* Code changes to add more LINQ specific test cases.

* Code changes to address review comments.

* Code changes to port some of the optimizations from Maya.

* Code changes to update the remarks since the changes from maya will cover the property naming policy.

* Code changes to address review comments.

* Code changes to update preview and GA contracts.
2024-06-17 19:17:08 -07:00
neildsh 2b01585990
Change the serviceInterop call that was missed in the previous PR (#4550) 2024-06-14 22:04:05 +00:00
Kiran Kumar Kolli 397ffab6fd
Quarantine ClientTelemetryReleaseTests (#4539) 2024-06-12 07:17:27 -07:00
neildsh 8c8d3e955c
Query: Fixes plumbing VectorEmbeddingPolicy to ServiceInterop to choose correct default distance function (#4538)
* Plumb the collection VectorEmbeddingPolicy to ServiceInterop

* Add query plan baseline tests for vector search

* Correct typo in the query for baseline test

* Fix build errors

* fix runtime issue in mock setup due to the extra argument for vector embedding policy
2024-06-11 06:46:12 -07:00
hdornadula 5994b1608b
Adding new SDK changes for NzN (#4537)
* Adding new SDK changes for NzN

* Bumping up SDK version for a full release

* Fixing changelog.md
2024-06-07 23:35:54 +00:00
Aditya f1590f84a8
3.40.1: Adds new SDK versions and contract files (#4532)
* Initial commit

* Fixed version. Generated contract files off of 3.40.0 for which hotfix is being released.
2024-06-07 10:39:57 -07:00
Asier Isayas 087ed73fa9
[Internal] Visibility: Adds new Portal Backend to Microsoft.Azure.Cosmos InternalsVisibleTo (#4529)
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
2024-06-05 12:50:01 -07:00
leminh98 18a677ace9
Query: Adds DOCUMENTID extension method for LINQ (#4489)
* Add extension method for doucmentid

* test coverage

* additional test

* update contract

* update dotnet api

* address code review

* update csproj file

* update missing baseline

---------

Co-authored-by: Minh Le (from Dev Box) <leminh@microsoft.com>
2024-06-04 13:06:16 -07:00
hdornadula fa354adc2f
Region Availability: Adds New Zealand North region for Public Usage. (#4520)
* Testing

* Revert "Testing"

This reverts commit 5e173a627e.

* Adding SDK changes for New Zealand North

* Corrected formatting to use LF line ending.
2024-05-31 22:31:24 -07:00
Aditya 673bf58573
[Internal] Query : Fixes response parsing error for ReadFeed by limiting binary format to query operations (#4515)
* Limit binary format to query operations

* Addressed comments, updated test.

* Updated coverage to include query stream API.

* Test Change.

* Test change 2

* ReadFeed Encryption tests only with project reference

* Revert

* Removed comment

---------

Co-authored-by: Matias Quaranta <ealsur@hotmail.com>
2024-05-29 03:16:05 +00:00