CXXCBC-431: Fix history retention bucket capability check #505
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The
http_context
appears to be at the cluster level, so it wasn't clear which bucket's capabilities were being checked. This resulted in unpredictability, as seen in FIT and in the Python SDK's test suite.Changes
Add a new
execute_with_bucket_capability
method that after ensuring that the bucket is open, it checks for the presence of the capability usingwith_bucket_configuration
and then proceeds to do the operation if successful. This is now used forcreate_collection
andupdate_collection
.Results
Tests pass (including FIT)