-
Notifications
You must be signed in to change notification settings - Fork 1
CBG-5213 support dropping rosmar buckets #386
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -129,14 +129,9 @@ async def configure_dataset( | |
|
|
||
| current_span.add_event("Handle HTTP 412") | ||
| await self.__sync_gateway.delete_database(dataset_name) | ||
| if self.sync_gateway.using_rosmar: | ||
| raise CblTestError( | ||
| f"Database {dataset_name} already exists on Sync Gateway and cannot be deleted when " | ||
| "using rosmar until CBG-5213 is implemented. To work around, restart a Sync Gateway to " | ||
| "delete the rosmar buckets." | ||
| ) | ||
| else: | ||
| self.__couchbase_server.drop_bucket(db_payload.bucket) | ||
| await self.drop_bucket(db_payload.bucket) | ||
| await self.__sync_gateway.wait_for_no_databases(db_payload.bucket) | ||
| if not self.sync_gateway.using_rosmar: | ||
| self.__couchbase_server.create_bucket(db_payload.bucket) | ||
| self._create_collections(db_payload) | ||
|
|
||
|
|
@@ -163,3 +158,11 @@ async def configure_dataset( | |
| ) | ||
|
|
||
| await self.__sync_gateway.load_dataset(dataset_name, data_filepath) | ||
|
|
||
| async def drop_bucket(self, bucket_name: str, *, wait_for_deleted=False): | ||
| """Drop the bucket from the backing cluster. This is an asynchronous operation unless wait_for_deleted is set to True.""" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it? I don't see anywhere that it is consulted....
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is part of a subsequent PR, and the code was buggy so I removed it. |
||
| if self.sync_gateway.using_rosmar: | ||
| await self.sync_gateway._send_request("delete", f"/_rosmar/{bucket_name}") | ||
| else: | ||
| self.couchbase_server.drop_bucket(bucket_name) | ||
| await self.couchbase_server.wait_for_bucket_deleted(bucket_name) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,5 +12,8 @@ | |
| "log_level": "debug", | ||
| "log_keys": ["*"] | ||
| } | ||
| }, | ||
| "unsupported": { | ||
| "rosmar_bucket_management": true | ||
| } | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.