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

CosmosClientOptions and CosmosClientBuilder: Adds client level support for EnableContentResponseOnWrite #2145

Merged

Conversation

asketagarwal
Copy link
Contributor

@asketagarwal asketagarwal commented Jan 22, 2021

Pull Request Template

Description

This PR adds a new field to the CosmosClient settings to enable/disable Content Response on write operations for Documents. Currently, this needs to be configured for every item request. We can now set this when creating CosmosClient. We can also override this in ItemRequestOptions while calling any Item operation.
The issue this will close : #1917

Copy link
Member

@kirankumarkolli kirankumarkolli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for UT coverage

@j82w
Copy link
Contributor

j82w commented Jan 25, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@asketagarwal
Copy link
Contributor Author

/azp run

@asketagarwal
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

ealsur
ealsur previously approved these changes Jan 29, 2021
Copy link
Member

@ealsur ealsur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @kirankumarkolli could you verify the public API change and see if it's fine?

@asketagarwal
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

j82w
j82w previously approved these changes Feb 1, 2021
}
}

if (requestOptions is TransactionalBatchItemRequestOptions batchRequestOptions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the new configuration all based on ItemRequestOptions only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ContentResponse flag is also available for TransactionalBatchRequestOptions

@Azure Azure deleted a comment from asketagarwal Feb 1, 2021
@kirankumarkolli
Copy link
Member

FYI Arun also signed off to include Patch.

@j82w j82w changed the title Adding EnableContentResponseOnWrite to Client level settings EnableContentResponseOnWrite: Adds client level setting to CosmosClientOptions and CosmosClientBuilder Feb 2, 2021
@j82w j82w changed the title EnableContentResponseOnWrite: Adds client level setting to CosmosClientOptions and CosmosClientBuilder CosmosClientOptions and CosmosClientBuilder: Adds client level support for EnableContentResponseOnWrite Feb 2, 2021
@j82w j82w merged commit 024c128 into Azure:master Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support ContentResponseOnWrite option in CosmosClientBuilder
5 participants