Skip to content

Commit a5a8053

Browse files
authored
Prepare 1.15 release (#16)
1 parent a079871 commit a5a8053

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Release Notes
22
All notable changes and release history of the "cosmos-db" module will be documented in this file.
33

4+
## 1.15
5+
* Adds support for optimistic concurrency (enabled by default) to `Update-CosmosDbRecord`
6+
47
## 1.14
58
* Fixes a bug where record ids were not encoded in the API calls which broke Get-, Remove-, and Update- for records with ids that contained characters such as `'/'`
69

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ $records | Update-CosmosDbRecord ...
202202
| SubscriptionId | The Azure Subscription Id | No - defaults to whatever `az` defaults to |
203203
| PartitionKey | The partition key of the resource | No - defaults to `Id`<br/>Must be set if the collection uses a different parition scheme |
204204
| GetPartitionKeyBlock | Callback to get the `PartitionKey` from `Object` - useful in pipelines | No - used only if `PartitionKey` is not set |
205+
| EnforceOptimisticConcurrency | Enables or disables optimistic concurrency checks | No - default is enabled |
205206

206207
### Remove-CosmosDbRecord
207208

cosmos-db/cosmos-db.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# RootModule = ''
1212

1313
# Version number of this module.
14-
ModuleVersion = '1.14'
14+
ModuleVersion = '1.15'
1515

1616
# Supported PSEditions
1717
# CompatiblePSEditions = @()

tests/Update-CosmosDbRecord.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ InModuleScope cosmos-db {
4242
$expectedPartitionKey = if ($expectedPartitionKey) { $expectedPartitionKey } else { $expectedId }
4343

4444
if ($EnforceOptimisticConcurrency) {
45-
$expectedHeaders = $expectedHeaders = Get-CommonHeaders -now $global:capturedNow -encodedAuthString $MOCK_AUTH_HEADER -PartitionKey $expectedPartitionKey -Etag $MOCK_ETAG
45+
$expectedHeaders = Get-CommonHeaders -now $global:capturedNow -encodedAuthString $MOCK_AUTH_HEADER -PartitionKey $expectedPartitionKey -Etag $MOCK_ETAG
4646
} else {
4747
$expectedHeaders = Get-CommonHeaders -now $global:capturedNow -encodedAuthString $MOCK_AUTH_HEADER -PartitionKey $expectedPartitionKey
4848
}

0 commit comments

Comments
 (0)