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

2163 Коммитов

Автор SHA1 Сообщение Дата
Matias Quaranta 5a096d1136
Change Feed Processor: Fixes disposal of unused CancellationTokenSource (#4220)
* Calling dispose

* Tests

* refactoring
2023-12-22 01:28:38 +01:00
vipulvishal-ms 1e49b16a93
Client Encryption: Adds Microsoft.Azure.Cosmos compatibility to version 3.35.4 (#4214)
* changing version

* changing version

* changing version

* new versioning

---------

Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>
2023-12-21 17:34:11 +00:00
Sourabh Jain 3cb1c55678
Distributed Tracing: Refactors Samples to use latest cosmosdb SDK (#4218)
* Updated Cosmosd SDK version in Open telemetry and AppInsight Samples

* clean up code

* fixd samples

* remove underscore from variable name
2023-12-20 07:48:09 -08:00
Matias Quaranta 7a32b96c62
[Internal] CTL: Fixes docker image version dependency (#4216)
* update csproj

* image

* Right image

* Sigh

---------

Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>
2023-12-19 22:04:44 +00:00
Aditya Kotalwar ea269c99b5
[Internal] Query: Adds ClientQL Compatibility Level support on client (#4177)
* Added ability to accept the AllowOptimisticDirectExecution flag from the backend and use that flag to decide if the Ode pipeline should be used or not.

* Added comment and removed extra spacing

* Added test coverage

* Added exception handling logic

* Resolved comments

* Added null check for key parameter

* Removed changes to common test infra

* Removed all changes from QueryPartitionProviderTestInstance

* Remove changes pt2

* Removed the dictionary in QueryPartitionProvider and added a bool instead

* Updated GetClientDisableOptimisticDirectExecution()

* Fixed comments

* Revert QueryIterator.cs

* Undoing changes to settings.json

* Undoing changes to QueryIterator.cs

* Updated error message

* Made functions static

* Cast to bool instead of recasting in GetClientDisableOptimisticDirectExecution()

* Added clientQLCompatibilityLevel support on client

* Updated assert

* Updated client tests to use Data Contract serializer and deserializer

* Added support to obtain the distribution plan payload on the client

* Added binary support

* Removed CheckCompatibilityLevelFlagInQuerySpec()

* Renamed ParseElementsFromRestStream()

* Updated test response

* Switched to using binary json navigator

* Using local variable before type check

* Updated name to DistributionPlanSpec

* Added support to test multiple distribution plan samples

* Removed binary sample

* Updated binary test

* Added ignore flag

* Fixed merge conflicts 2.0

* Resolved comments

* Updated function name

* Removed an unnecessary assert

* Fixed comment

* Improved debug assert message

* Added checks to confirm that resourceType is document before getting distributionPlan

* Removed changes to resourceManagement.yml
2023-12-14 10:41:39 -08:00
Aditya Kotalwar 6258e24651
Query: Add Optimistic Direct Execution configuration override support on the Client (#4122)
* Added ability to accept the AllowOptimisticDirectExecution flag from the backend and use that flag to decide if the Ode pipeline should be used or not.

* Added comment and removed extra spacing

* Added test coverage

* Added exception handling logic

* Resolved comments

* Added null check for key parameter

* Removed changes to common test infra

* Removed all changes from QueryPartitionProviderTestInstance

* Remove changes pt2

* Removed the dictionary in QueryPartitionProvider and added a bool instead

* Updated GetClientDisableOptimisticDirectExecution()

* Fixed comments

* Revert QueryIterator.cs

* Undoing changes to settings.json

* Undoing changes to QueryIterator.cs

* Updated error message

* Made functions static

* Cast to bool instead of recasting in GetClientDisableOptimisticDirectExecution()

* Added ignore flag

* Fixed merge conflicts

* Updated GetPartitionedQueryExecutionInfoAndPartitionProvider()

* Updated return type in OffsetLimitPageSize()
2023-12-13 02:00:04 +00:00
Matias Quaranta 07aa28eee6
[Internal] Automation: Fixes check for issue assignment (#4213)
* Removing

* fix
2023-12-12 23:40:53 +01:00
leminh98 d07f9cabad
[Internal] Query: Adds Baseline test for exceeding header length for index advisor (#4176)
* add baseline tests

* added back missing bracket

* update csporj file

---------

Co-authored-by: Minh Le <leminh@microsoft.com>
2023-12-01 17:21:15 +00:00
Matias Quaranta a0f1c30521
[Internal] Versioning: Adds guidance for versioning SDK releases (#4192)
* Create versioning.md

* Update versioning.md

* Update versioning.md

* Update versioning.md

* Update README.md

* Update versioning.md

* Update versioning.md

* Apply suggestions from code review

Co-authored-by: Kevin Pilch <kevinpi@microsoft.com>

* Update versioning.md

* Update versioning.md

---------

Co-authored-by: Kevin Pilch <kevinpi@microsoft.com>
2023-11-21 22:00:40 +00:00
Debdatta Kunda c6918b4720
3.37.0: Adds new SDK versions and contract files (#4191)
* Updated change log and bumped up the patch version.

* Updated change log and bumped up the minor version.

* Updated change log to reflect correct version.
2023-11-17 23:00:25 +00:00
Kiran Kumar Kolli 98048d2bb5
[Internal] Code Analysis: Fixes all warning in source/test/usage projects (#4188)
* [Internal] CodeAnalsis: Fixing CA2200 for test projects

* Making code warning clean

* fixing the usages projects

* Removing the insource overrides

* One mroe small fix

---------

Co-authored-by: Sourabh Jain <sourabhjain@microsoft.com>
2023-11-16 16:21:57 +00:00
Kiran Kumar Kolli e205d411db
Documentation: Adds Upsert documentation to include status codes for Created vs Replaced (#4186)
* Upset status codes clarification

* Upgrade Resiliency: Adds Code to Enable Advanced Replica Selection Feature for Preview (#4180)

* Code changes to enable replica validation for preview.

* Code changes to enable replica validation for preview and GA.

---------

Co-authored-by: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com>
2023-11-16 07:30:13 +00:00
Kiran Kumar Kolli f471418c23
VS 17.8 auto runs NuGetAudit and flagging 10.0.2, CosmosDB SDK already mitigated it by changing the MAXDEPATH (#4185) 2023-11-15 20:59:52 +00:00
Debdatta Kunda 4fee54695b
Upgrade Resiliency: Adds Code to Enable Advanced Replica Selection Feature for Preview (#4180)
* Code changes to enable replica validation for preview.

* Code changes to enable replica validation for preview and GA.
2023-11-15 10:15:42 -08:00
Nalu Tripician 966b481464
Routing: Adds ExcludeRegions Feature to RequestOptions (#4128)
* adds excludeRegions

* suggested changes

* removed unused usings

* fixed blank line error

* removed using

* update contracts

* fixed test

* reverted automatic changes to BaselineTests

* requested changes

* bug fix

* PPOF test fix
2023-11-09 12:52:11 -08:00
Maya Painter d287f085e3
[Internal] Query: Adds interface for linq serialization functions (#4163)
* intial commit

* add interface

* PR comments and TranslationContext cleanup

* update params

* fix parameters

* PR comments

* PR comments

* PR comments

* simplifying serializer class

* interface updates

* Update docs

* PR comments

* PR comments

* PR comments - rename and fix assert
2023-11-08 18:57:25 +00:00
Maya Painter 4db6078dc5
Query: Fixes documentation to reflect state of System.Text.Json serializer (#4170)
* Update Program.cs

* Update Program.cs

* Update Program.cs

* Update Program.cs

---------

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
2023-11-07 01:17:26 +00:00
Matias Quaranta b1918341a6
[Internal] DocumentClient: Adds TryGetAccountProperties (#4167)
* add api

* tests

* Update test

* Rename
2023-11-06 13:20:37 -08:00
Debdatta Kunda f7a4c56f26
[Internal] Upgrade Resiliency: Fixes Duplicate Channel and Task Creation. (#4123)
* Code changes to fix duplicate channel and thread pool on refresh flow.

* Code changes to fix failed tests.

* Code changes to add global semaphore for concurrency control in address cache.

* Code changes to refactor the refresh async method.

* Code changes to address review comments.

* Code changes to update summary.
2023-11-06 06:27:16 +00:00
Aditya Kotalwar f379919702
[Internal] Query: Removes ForcePassThrough support (#4160)
* Remove passThrough from the codebase

* Updated TestOptimisticDirectExecutionQueryAsync() to remove all aspects of passThrough from it

* Undoing previous change

* Removed forcePassThrough from FullPipelineTests.cs

* Undoing changes to remove PassThrough

* Undoing passThrough removal pt2

* Undoing changes to SanityQueryTests.cs

* Updated TestTryExecuteQueryHelper()

* Updated comment

* Changed boolean location

* Removed TryExecuteQueryAsync()

* Fixed indentation
2023-11-03 09:33:39 -07:00
dependabot[bot] 1f81b54a7a
Client Encryption: Adds Azure.Identity from 1.1.1 to 1.10.2 (#4134)
* Bump Azure.Identity in /Microsoft.Azure.Cosmos.Encryption.Custom/src

Bumps [Azure.Identity](https://github.com/Azure/azure-sdk-for-net) from 1.1.1 to 1.10.2.
- [Release notes](https://github.com/Azure/azure-sdk-for-net/releases)
- [Commits](https://github.com/Azure/azure-sdk-for-net/compare/Azure.Identity_1.1.1...Azure.Identity_1.10.2)

---
updated-dependencies:
- dependency-name: Azure.Identity
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update Microsoft.Azure.Cosmos.Encryption.Custom.csproj

Updated the Azure.Core version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
2023-11-02 06:53:33 +05:30
Sourabh Jain 9175f51fa5
[Internal] Client Telemetry: Adds telemetry contract (#4161)
* add tests

* fix tests

* remove unreated files
2023-10-31 09:37:48 -07:00
sc978345 646d006109
[Internal] Query: Fixes optimalPageSize logic for OFFSET LIMIT in ORDER BY queries (#4158)
* Fix logic in CosmosQueryExecutionContextFactory where we determine optimal page size for ORDER BY queries that have an OFFSET/LIMIT clause.  Previously, the logic was only being applied to TOP and not OFFSET/LIMIT.

* Changes based on PR feedback

* Change based on PR feedback
2023-10-30 10:20:04 -07:00
Debdatta Kunda a4836ff452
Per Partition Automatic Failover: Fixes Gateway 503 Cold Start Issue (#4073)
* Code changes to add retry logic for GW returned 503.9002.

* Revert "Code changes to add retry logic for GW returned 503.9002."

This reverts commit 53ef5f3c1b.

* Code changes to clean up the PPAF retry logic fix.

* Code changes to add retry logic for GW returned 503.9002.

* Revert "Code changes to add retry logic for GW returned 503.9002."

This reverts commit 53ef5f3c1b.

* Code changes to clean up the PPAF retry logic fix.

* Code changes to revert location cache changes.

* Code changes ro revert location cache changes.

* Code changes to fix some of the failing tests.

* Code changes to fix unit tests.

* Code changes to add unit tests for client options.

* Code changes to draft docs for PPAF design approach.

* Code changes to add SDK side design docs for PPAF.

* Code changes to modify the PPAF design.

* Code changes to fix unit test.

* Code changes to rename test name.

* Code changes to add some cosmetic changes.

* Code changes to enable retry on write for all regions in single master accounts.

* Code changes to add code comments.

* Code changes to clean up and handle endpoints in location cache.

* Code changes to fix unit tests. Added detailed code comments.

* Code changes to clean up the account read endpoints generation logic.

* Code changes to fix unit tests.

* Code changes to disable retry when ppaf is not enabled. Also validated application preferred region.

* Code changes to fix unit tests.

* Code changes to update md file.

* Code changes to remove chache expiry check for account read endpoints.

* Code changes to fix unit test.

* Code changes to fix more tests.

* Code changes to address review comments.

* Code changes to fix verbaige in design document.
2023-10-27 11:31:24 -07:00
dependabot[bot] 083df87e6e
Bump Azure.Identity (#4135)
Bumps [Azure.Identity](https://github.com/Azure/azure-sdk-for-net) from 1.5.0 to 1.10.2.
- [Release notes](https://github.com/Azure/azure-sdk-for-net/releases)
- [Commits](https://github.com/Azure/azure-sdk-for-net/compare/Azure.Identity_1.5.0...Azure.Identity_1.10.2)

---
updated-dependencies:
- dependency-name: Azure.Identity
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 22:10:10 +00:00
dependabot[bot] 42cc681248
Bump Azure.Identity in /Microsoft.Azure.Cosmos.Samples/Usage/Encryption (#4136)
Bumps [Azure.Identity](https://github.com/Azure/azure-sdk-for-net) from 1.5.0 to 1.10.2.
- [Release notes](https://github.com/Azure/azure-sdk-for-net/releases)
- [Commits](https://github.com/Azure/azure-sdk-for-net/compare/Azure.Identity_1.5.0...Azure.Identity_1.10.2)

---
updated-dependencies:
- dependency-name: Azure.Identity
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
2023-10-24 19:05:30 +00:00
Sourabh Jain 8253befe99
Fixes changelog typo and date (#4155) 2023-10-24 11:10:21 -07:00
Aditya 6de10ddc98
Query : Fixes querying conflicts (#4100)
* Initial commit

* Update

* Updated the test

* Updated the test

* Sample fix; to validate Suite0.

* Skipped the ConflictsTest (which depends on azure cosmosdb account)

* Addressed comments

* Added Unit Test.

* Reverted unnecessary change.
2023-10-24 17:07:57 +00:00
Sourabh Jain b8d9225b98
Release 3.36.0: Fixes client config test and preview pipeline (#4149) (#4150)
* Fixed client cpnfig test and preview pipeline

* fix telemertry service step
2023-10-23 18:51:57 +00:00
Maya Painter e2ce570b38
Update CosmosItemTests.cs (#4141) 2023-10-19 20:49:50 +00:00
Sourabh Jain a0fb14f1a6
Release 3.36.0 : Fixes Client Telemetry Release Test (#4132)
* Client Telemetry Release test fix

* get endpoint from env variable

* read client telemetry endpoint service from env

* updated yaml
2023-10-19 11:35:15 +00:00
Maya Painter 1afcacd316
[Internal] Query : Adds test coverage for custom serializers (#4114)
* initial cleanup

* test updates - working

* cleanup

* more cleanup

* more

* whoops

* Add results to basline

* adding payload to xml

* some generics

* cleanup

* Add datamember serializer

* reorder functions and test fix

* tostring() update and add case

* fix payload

* fix datamembertest

* cleanup

* cleanup

* PR comment

---------

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
2023-10-18 14:56:37 -07:00
Philip Thomas 28204bb5a2
Item Operations: Fixes JsonSerialization exception when MissingMemberHandling = Error on Json default settings when NotFound on Item operations. (#4125)
* issue 4115 initial checkin. need insight from issuer on reproducing this issue

* test refactoring and adding more coverage for other NotFound scenarios

* commit on some actionables

* setting JsonConvert.DefaultSettings to null so that other tests will not fail

* as requested, removed catches from test methods
2023-10-18 20:16:43 +00:00
Sourabh Jain f3a9cae960
Release 3.36.0: Fixes pipeline by removing ReleasePackage variable (#4130)
* remove release variable

* revert build config variable change also
2023-10-18 18:03:21 +00:00
Sourabh Jain 5777a3af0d
SDK 3.36.0 : Adds version bump and changelog (#4118)
* first draft

* updated changelog

* remove already released PRs

* updated pr links

* changelog and contract changes

* updated changelog

* updated changelog

* updated changelog

* remove 4071 from changelog as it should be internal PR

* removed an query internal log

* updated contracts
2023-10-18 11:51:56 -04:00
Sourabh Jain 51a8c6c2fe
TriggerOperation: Adds Upsert Operation Support (#4119)
* Added Upsert Trigger Operation Support

* updated contract

* fix test
2023-10-18 09:18:33 +00:00
Maya Painter 8f65cd2442
Query : Adds Missing QueryMetrics Documentation (#4127)
* Update ServerSidePartitionedMetrics.cs

* Update ServerSidePartitionedMetrics.cs
2023-10-17 07:39:29 -07:00
Nalu Tripician 20547bce55
[Internal] Direct Package: Adds version bump (#4120)
* direct version bump

* Code changes to fix emulator tests to comply with direct release 3.31.5.

---------

Co-authored-by: Debdatta Kunda <dkunda@microsoft.com>
2023-10-12 19:43:07 -07:00
Sourabh Jain 7db0aa08a7
Telemetry Options: Adds telemetry options in GA package (#4117)
* GA telemetry options and updated contract

* enabe requuest level option

* added request option in public contract
2023-10-12 11:45:42 -04:00
Arooshi Avasthy 4e2beda5ef
Distributed Tracing: Fixes traceid null exception issue (#4111)
* Fix traceid null exception issue

* Fixing merge conflicts

* Fixing merge conflicts

* Update script

* Code cleanup

* Updated change description

* updated comment description

* updated comment description

---------

Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
2023-10-10 22:19:07 +00:00
iain e2fb347a4a
CosmosClientOptions: Adds support for multiple formats of Azure region names (#4016)
* Allow ComosClientOptions to take ApplicationRegion and ApplicationPreferredRegions in multiple region name formats.

This is a proposed fix for - https://github.com/Azure/azure-cosmos-dotnet-v3/issues/2330

* Address PR comment to avoid duplicating list of names.

* Remove the map table cache

The map table is only used on initialization, so there's no need to keep a cache of it for the lifetime of the application

* Only convert the region names when the client is initializing

The cache is created before converting all the names, so it only needs created once, but doesn't remain for the entire lifetime of the application

* Update tests

* Make RegionNameMapper an instantiable class

Instead of having a prepare/clear cache system on a static class, make RegionNameMapper a class that gets instantiated for use and let the ctor handle it.

* Remove debugging

* Update tests to actually test things

---------

Co-authored-by: Pradeep Chellappan <Pradeep.Chellappan@docusign.com>
Co-authored-by: Pradeep Chellappan <94089783+pradeep-chellappan@users.noreply.github.com>
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>
2023-10-10 15:59:39 +00:00
Maya-Painter 88fd4cdb9b
Revert "Query: Adds new system strings in JsonBinaryEncoding, replacing 1-byte user strings (#3400)" (#4108)
This reverts commit 9140890d78.
2023-10-09 22:48:52 +00:00
Sourabh Jain a5dec66060
Distributed Tracing: Fixes SDK responses compatibility with opentelemetry response (#4097)
* adding tets

* wip

* wip2

* fix code

* add tests

* fix test

* fix test

* remove consoles

* fix indent and remove unused imports

* internal to private rollback

* added docs

* removed unused imports

* added exception in message

* fix exception catching
2023-10-09 18:38:05 +00:00
Sourabh Jain 75eec5c33a
Benchmark: Fixes to show estimated cost of a container only when new container is getting created (#4109)
* Showing Estimated Cost only when new container is getting created

* read container to get container response

* disable client telemetry by default

* removed unused imports

* resolve merge conflict

* fixed name

* fix container not found

* removed the message

* Update Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/Program.cs

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

* removed line space

---------

Co-authored-by: Kiran Kumar Kolli <kirankk@microsoft.com>
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
2023-10-09 20:29:11 +05:30
Kevin Pilch 7ed22ac55b
[Internal] Build: Adds CodeQL support in nightly builds (#4113)
* Update azure-pipelines-nightly.yml

* Newlines in variables sections
2023-10-06 16:36:44 -07:00
Sourabh Jain 72e96faca5
Client Telemetry: Adds new public APIs (#4056)
* Revert "[Internal] Client Telemetry: Refactors code for collectors (#4037)"

This reverts commit e2311a9fdc.

* Revert "Revert "[Internal] Client Telemetry: Refactors code for collectors (#4037)""

This reverts commit f04234b761.

* firdst draft

* initialize object

* null handle

* update contracts

* compilation charges

* fix tests

* public API changes

* add docs

* contract updated

* fixed tests

* by default switch of te;emetry in sdk

* fix tests

* fix assertion

* incorporate review comments

* fetaure flag fix in script

* switch case

* add test

* fix tests

* fix test

* fixed run.sh

* minor changes

* code refactor

* changed default values and fix tests
2023-10-05 01:35:46 +05:30
Kiran Kumar Kolli b03df6bb12
Chaning Bounded to Strong (#4103) 2023-10-04 14:29:36 +00:00
leminh98 11fa17b6e9
Query: Adds LINQ RegexMatch Extension method (#4078)
* Add support for translation to REgexmatch

* Add test and fix some indexing issues

* remove visit explicit, add some comment. Update public contract and added the baseline for the test

* add the missing baseline

* added test

* address code review

* update csproj

---------

Co-authored-by: Minh Le <leminh@microsoft.com>
2023-10-03 22:37:11 +00:00
Aditya Kotalwar 101b9b1ad5
[Internal] Query: Fixes minor issues with TestQueryValidityCheckWithODEAsync (#4105)
* Fixed typos and made test more readable

* Another typo
2023-09-28 22:35:21 +00:00
Aditya Kotalwar f312f6a4c3
[Internal] Query: Adds check to detect unsupported queries for Optimistic Direct Execution code path (#4090)
* Added query validity function on Ode code path

* Fixed syntax

* Updated to use string search instead of query parsing

* Updated string search to now be regex

* Changed location of caller for QueryValidityCheck()

* Updated regex string

* Added extra test coverage

* Added const string to error messages

* Added compile flag to Regex

* Fixed comments

* Added missing null reference coverage

* Removed extra foreach loop in test

* Removed useQueryPlan bool in test code
2023-09-28 19:03:44 +00:00