-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Keyvault] BREAKING CHANGE: az keyvault secret/certificate: Migrate to track2 SDK, breaking changes to service response
#26242
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
️✔️AzureCLI-FullTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
azure keyvault secret/certificate: Migrate to track2 SDK, breaking changes to service responseaz keyvault secret/certificate: Migrate to track2 SDK, breaking changes to service response
# Conflicts: # src/azure-cli-core/azure/cli/core/profiles/_shared.py # src/azure-cli/azure/cli/command_modules/keyvault/_client_factory.py # src/azure-cli/azure/cli/command_modules/keyvault/custom.py # src/azure-cli/requirements.py3.Darwin.txt # src/azure-cli/requirements.py3.Linux.txt # src/azure-cli/requirements.py3.windows.txt # src/azure-cli/setup.py
…onal property, should not manually add it, user can use `az keyvault certificate pending show` to find it.
|
|
||
| @ResourceGroupPreparer(name_prefix='cli_test_vm_secrets') | ||
| @KeyVaultPreparer(name_prefix='vmlinuxkv', name_len=20, additional_params='--enabled-for-deployment --enabled-for-template-deployment', key='vault') | ||
| @KeyVaultPreparer(name_prefix='vmlinuxkv', name_len=20, additional_params='--enabled-for-deployment --enabled-for-template-deployment', key='vault', skip_purge=True) |
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 please help explain why do we need skip_purge=True?
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.
It is because older api versions (2016-10-01) creates the keyvault without soft-delete enabled by default. Purge after delete will raise an error.
… to track2 SDK, breaking changes to service response (Azure#26242) * add track2 sdk for keyvault certificates and secrets * tested `secret list/list-deleted/list-versions`, `secret set` is partially done * `az keyvault secret set` done * `az keyvault secret set-attributes` done * `az keyvault secret show` done, reformat _params.py * `az keyvault secret show-deleted` done * `az keyvault secret delete` done * `az keyvault secret purge` done * `az keyvault secret purge` done * `az keyvault secret recover` done * `az keyvault secret download` done * `az keyvault secret backup` done * `az keyvault secret restore` done , `az keyvault secret` done, still need tests * `az keyvault secret` tests passed * `az keyvault certificate create` done * `az keyvault certificate list` done * `az keyvault certificate list-versions` done * `az keyvault certificate list-deleted` done * `az keyvault certificate show` done * `az keyvault certificate show` done * `az keyvault certificate show-deleted` done * `az keyvault certificate delete` done * `az keyvault certificate purge` done * `az keyvault certificate recover` done * `az keyvault certificate set-attributes` done * `az keyvault certificate set-attributes` done * `az keyvault certificate import` done, need to fix x509properties,basic_constraints * `az keyvault certificate import` no need for custom func * `az keyvault certificate download` done * remove basic_constraints as no longer return by track2 sdk * `az keyvault certificate get-default-policy` done * `az keyvault certificate backup` done * `az keyvault certificate restore` done * `az keyvault certificate pending merge` done, testing not finished because (Conflict) A pending object is already complete. BREAKING CHANGE: --not-before and --expires no longer supported by track2 * `az keyvault certificate pending show` done * `az keyvault certificate pending delete` done * `az keyvault certificate contact list` done * `az keyvault certificate contact add` done * `az keyvault certificate contact delete` done, BREAKING CHANGE, if delete would remove the last contact, return an empty list instead of the deleted contact. This is to be consistent where delete would return the remaining list. * `az keyvault certificate issuer create` done, BREAKING CHANGE, "zip" under "organizationDetails" is no longer returned, use 0 as default * `az keyvault certificate issuer update` done * `az keyvault certificate issuer list` done * `az keyvault certificate issuer show` done * `az keyvault certificate issuer delete` done * `az keyvault certificate issuer admin add` done, BREAKING CHANGE: returns the list after the addition instead of only the admin just added, follows `az keyvault certificate contact add` * `az keyvault certificate issuer admin list` done * `az keyvault certificate issuer admin delete` done, fix case when the admin deleted is the last * fix some tests, test_keyvault_certificate_issuers still not fully working because of sdk breaking change * lint * use sdk functions directly to bypass error where cannot set str back to "", remove breaking change for `az keyvault certificate admin add` * pylint fix * Rerun tests from instance 7. See test_results_None_latest_7.parallel.xml for details * Rerun tests from instance 1. See test_results_None_latest_1.serial.xml for details * Rerun tests from instance 2. See test_results_None_latest_2.parallel.xml for details * Rerun tests from instance 3. See test_results_None_latest_3.parallel.xml for details * pylint fix * fix validator for cert policy * fix recordings * fix recordings * Rerun tests from instance 3. See test_results_None_latest_3.parallel.xml for details * fix recordings * fix recordings * fix recordings * fix recordings * fix recordings * old api version keyvault has no soft delete * old api version keyvault mgmt plane has no soft delete * try to fix recording again * BREAKING CHANGE: pending not return by SDK anymore as it is an additional property, should not manually add it, user can use `az keyvault certificate pending show` to find it. * fix recording --------- Co-authored-by: Azure CLI Team <[email protected]>
Related command
Description
Migrate to azure-keyvault-certificates==4.7.0 and azure-keyvault-secrets==4.7.0
Testing Guide
History Notes
[Keyvault] BREAKING CHANGE:
az keyvault certificate show/set-attributes/import: No longer returnx509CertificateProperties.basicConstraints,pending[Keyvault] BREAKING CHANGE:
az keyvault certificate contact delete: Return an empty list instead of the deleted contact for consistency if the operation would remove the last contact[Keyvault] BREAKING CHANGE:
az keyvault certificate issuer create:organizationDetails.zipis no longer returned by serivce, use 0 as the defaultThis 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.
I adhere to the Error Handling Guidelines.