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

[Cosmos] Implements Client Retry policy #22394

Merged
merged 31 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9799481
implementation of client retry policy
simorenoh Feb 15, 2024
4a16dc1
ignore N-2 on ci
simorenoh Feb 15, 2024
fcee910
Update ci.yml
simorenoh Feb 15, 2024
8c515d4
changes to pass ci
simorenoh Feb 15, 2024
40c4ca2
Merge branch 'main' into cosmos_client_retry_policy
simorenoh Feb 15, 2024
fd5fe0d
Update go.mod
simorenoh Feb 15, 2024
b7d3930
Update go.sum
simorenoh Feb 15, 2024
309f1a8
make method private, add test
simorenoh Feb 15, 2024
ca73451
enableEndpointDiscovery->enableCrossRegionRetries, remove public area…
simorenoh Feb 21, 2024
2c23366
saved constants, moved logic around in policy for non-duplicity
simorenoh Feb 22, 2024
24ead83
added partial tests, missing 503s/ connectivity issues handling
simorenoh Feb 27, 2024
d62816c
finalizing behavior and tests
simorenoh Feb 29, 2024
b0613c0
revert pipeline useragent, return non-retryable errors to skip Core r…
simorenoh Mar 1, 2024
0e3f3ff
Merge branch 'main' into cosmos_client_retry_policy
simorenoh Mar 4, 2024
187fb8e
mark create/delete management plane operations as writes
simorenoh Mar 8, 2024
5fea609
force refresh ability added, delete/replace operations marked as write
simorenoh Mar 9, 2024
d7e41a9
remove print statements
simorenoh Mar 11, 2024
5c5ba4d
refactor
ealsur Mar 12, 2024
19d465d
missing comma
ealsur Mar 12, 2024
d3dedd8
detecting dns failures
ealsur Mar 12, 2024
704dcc6
missing update
ealsur Mar 12, 2024
0394d4b
deal with errors fetching initial account information
simorenoh Mar 12, 2024
8a042c6
linter
ealsur Mar 12, 2024
3de7be6
more linter
ealsur Mar 13, 2024
5f3fa59
Update cosmos_client_retry_policy_test.go
simorenoh Mar 13, 2024
b96c47a
add DNS test
simorenoh Mar 13, 2024
76c101a
fix error handling logic for dns
simorenoh Mar 13, 2024
adfe2b5
small fix to ensure no wrong index is called
simorenoh Mar 13, 2024
c4cc073
Merge branch 'main' into cosmos_client_retry_policy
simorenoh Mar 13, 2024
d1f2e16
fix new locking logic
simorenoh Mar 14, 2024
130e998
override header for response on write metadata operations
simorenoh Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sdk/data/azcosmos/cosmos_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ func (c *Client) CreateDatabase(
}

operationContext := pipelineRequestOptions{
resourceType: resourceTypeDatabase,
resourceAddress: ""}
resourceType: resourceTypeDatabase,
resourceAddress: "",
isWriteOperation: true,
}

path, err := generatePathForNameBased(resourceTypeDatabase, "", true)
if err != nil {
Expand Down
5 changes: 3 additions & 2 deletions sdk/data/azcosmos/cosmos_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ func (c *ContainerClient) Delete(
}

operationContext := pipelineRequestOptions{
resourceType: resourceTypeCollection,
resourceAddress: c.link,
resourceType: resourceTypeCollection,
resourceAddress: c.link,
isWriteOperation: true,
}

path, err := generatePathForNameBased(resourceTypeCollection, c.link, false)
Expand Down
10 changes: 6 additions & 4 deletions sdk/data/azcosmos/cosmos_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ func (db *DatabaseClient) CreateContainer(
}

operationContext := pipelineRequestOptions{
resourceType: resourceTypeCollection,
resourceAddress: db.link,
resourceType: resourceTypeCollection,
resourceAddress: db.link,
isWriteOperation: true,
}

path, err := generatePathForNameBased(resourceTypeCollection, db.link, true)
Expand Down Expand Up @@ -209,8 +210,9 @@ func (db *DatabaseClient) Delete(
}

operationContext := pipelineRequestOptions{
resourceType: resourceTypeDatabase,
resourceAddress: db.link,
resourceType: resourceTypeDatabase,
resourceAddress: db.link,
isWriteOperation: true,
}

path, err := generatePathForNameBased(resourceTypeDatabase, db.link, false)
Expand Down
Loading