Merge branch 'master' into optimize-bulkpubres-struct

This commit is contained in:
Mukundan Sundararajan 2022-12-16 08:02:32 +05:30 committed by GitHub
commit 0f63ac30b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -51,6 +51,10 @@ resource cosmosDb 'Microsoft.DocumentDB/databaseAccounts@2021-04-15' = {
'/partitionKey' // Defined by conformance test state.go
]
}
// Based on https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/time-to-live,
// if defaultTtl is not set, the item will never expire and also ttl is not enabled at all so
// ttl set on a per item basis will not be honored.
defaultTtl: -1 // only enable ttl
}
}
}

View File

@ -78,7 +78,7 @@ func CreateContainerStorageClient(log logger.Logger, meta map[string]string) (*c
// Try using shared key credentials first
if m.AccountKey != "" {
credential, newSharedKeyErr := azblob.NewSharedKeyCredential(m.AccountName, m.AccountKey)
if err != nil {
if newSharedKeyErr != nil {
return nil, nil, fmt.Errorf("invalid shared key credentials with error: %w", newSharedKeyErr)
}
client, clientErr = container.NewClientWithSharedKeyCredential(URL.String(), credential, &options)
@ -88,7 +88,7 @@ func CreateContainerStorageClient(log logger.Logger, meta map[string]string) (*c
} else {
// fallback to AAD
credential, tokenErr := settings.GetTokenCredential()
if err != nil {
if tokenErr != nil {
return nil, nil, fmt.Errorf("invalid token credentials with error: %w", tokenErr)
}
client, clientErr = container.NewClient(URL.String(), credential, &options)