[SQL] az sql midb log-replay: Support for log replay service on managed database#15168
[SQL] az sql midb log-replay: Support for log replay service on managed database#15168
Conversation
|
SQL |
|
Hi @Juliehzl, I fixed all issues in this PR. Can you please take a look? |
| FailoverPolicyType, | ||
| SqlServerMinimalTlsVersionType, | ||
| SqlManagedInstanceMinimalTlsVersionType, | ||
| AuthenticationType |
There was a problem hiding this comment.
AuthenticationType is removed from SDK. This shouldn't be part of my change but I was getting build errors. I think I didn't broke anything 🤞
| Applies requested parameters to a db resource instance for a DB update. | ||
| ''' | ||
| # Verify edition | ||
| if instance.sku.tier.lower() == DatabaseEdition.data_warehouse.value.lower(): # pylint: disable=no-member |
There was a problem hiding this comment.
DatabaseEdition was removed from SDK also. Same thing as above
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
| client_factory=get_sql_managed_databases_operations) as g: | ||
| g.custom_command('start', 'managed_db_log_replay_start', supports_no_wait=True) | ||
| g.command('stop', 'delete', confirmation=True, supports_no_wait=True) | ||
| g.command('complete', 'complete_restore') |
There was a problem hiding this comment.
please add wait command here
There was a problem hiding this comment.
I added, but can you tell what is the use case for wait command? Why am I adding it (there must be some rule that I am not aware of ) ?
There was a problem hiding this comment.
because you support no wait for some commands, e.g. start, stop, if users use --no-wait in your command, the command will not wait any more. But if i want to query command status, i have to use wait command
There was a problem hiding this comment.
Oh okay I get it now. Thanks
|
/azp run |
|
Commenter does not have sufficient privileges for PR 15168 in repo Azure/azure-cli |
|
@MilanBrkicFON please also take a look for CI failures |
|
@Juliehzl They are not mine test.. mostly key vault |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
please revert this change a78f79a. or you can rebase dev branch and makesure keyvault package version == 7.0.0.b3 |
| sleep(60) | ||
|
|
||
| # Cancel log replay service | ||
| self.cmd('sql midb log-replay stop -g {resource_group} --mi {managed_instance_name} -n {managed_database_name1} --yes', |
There was a problem hiding this comment.
could you also add test for wait command?
There was a problem hiding this comment.
I didn't add wait command in test because the provisioning of MI takes too much time.. I did test it manual and it works as expected.
Hope this is ok
…ed database (Azure#15168) * {Docs} Remove stale reference in README to closed issue about extensions (Azure#12771) * midb log-replay commands * fixed tests and styles * Fixing alias for some params * making things right * Typos and wait command * add wait command in help file * reverting changes that are not part of my change * setup file changed by mistake * removed group create * fix key vault issues * Added examples for log-replay wait command and fixed typos Co-authored-by: Daniel Miller <daniel.keegan.miller@gmail.com> Co-authored-by: Azure CLI Team <AzPyCLI@microsoft.com> Co-authored-by: Milan Brkic <mibrkic@microsoft.com>
Description
This PR introduces 4 new command that are going to be used for starting, stopping, completing and getting status of Log Replay service on managed database.
Testing Guide
az sql midb log-replay startaz sql midb log-replay showaz sql midb log-replay stopaz sql midb log-replay completeHistory Notes
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.