-
Notifications
You must be signed in to change notification settings - Fork 907
Add support for BypassIntegratedCache option #24772
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
Conversation
Thank you for your contribution @AndrewRPorter! We will review the pull request and get back to you soon. |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds the ability to bypass the integrated cache on dedicated gateway requests by introducing a new BypassIntegratedCache
flag and wiring it through headers.
- Introduced
BypassIntegratedCache
inDedicatedGatewayRequestOptions
and corresponding HTTP constant - Updated
toHeaders
in bothQueryOptions
andItemOptions
to emit the bypass header when enabled - Extended tests and updated
CHANGELOG.md
to cover the new option
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
sdk/data/azcosmos/cosmos_dedicated_gateway_request_options.go | Add BypassIntegratedCache field to the options struct |
sdk/data/azcosmos/cosmos_http_constants.go | Define headerDedicatedGatewayBypassCache constant |
sdk/data/azcosmos/cosmos_query_request_options.go | Emit bypass header in QueryOptions.toHeaders |
sdk/data/azcosmos/cosmos_item_request_options.go | Emit bypass header in ItemOptions.toHeaders |
sdk/data/azcosmos/cosmos_query_request_options_test.go | Add tests for bypass behavior in query options |
sdk/data/azcosmos/cosmos_item_request_options_test.go | Add tests for bypass behavior in item options |
sdk/data/azcosmos/CHANGELOG.md | Document new bypass cache support |
Comments suppressed due to low confidence (2)
sdk/data/azcosmos/cosmos_query_request_options_test.go:66
- Consider adding a test case where DedicatedGatewayRequestOptions is non-nil but BypassIntegratedCache is false to ensure the bypass header isn't set when explicitly disabled.
func TestQueryRequestOptionsToHeaders_bypassIntegratedCacheNotSet(t *testing.T) {
sdk/data/azcosmos/CHANGELOG.md:7
- [nitpick] Add a period after the sentence and consider splitting into two for clarity, e.g.: '* Added support for BypassIntegratedCache option. See [PR 24772]...' to match the project's changelog style.
* Added support for BypassIntegratedCache option See [PR 24772](https://github.com/Azure/azure-sdk-for-go/pull/24772)
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - @analogrelay or @simorenoh can one of you take a look as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well
Add support for the
BypassIntegratedCache
param as Azure docs point to this being a way to have requests to the dedicated gateway bypass the integrated cache: https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-configure-integrated-cache?tabs=dotnet#bypass-the-integrated-cache.This is a follow up to #23406 which added the dedicate gateway request headers and the ability to set the
MaxIntegratedCacheStaleness
option.