-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[SQL] az sql midb log-replay: Support for log replay service on managed database #15168
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
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add wait command here
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you also add test for wait command?
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.
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 <[email protected]> Co-authored-by: Azure CLI Team <[email protected]> Co-authored-by: Milan Brkic <[email protected]>
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.