Skip to content
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

{Azurestack} ACR & AKS: Adding Tests and Fixing Authorization api-version for hybrid profile #18443

Merged
merged 12 commits into from
Aug 6, 2021

Conversation

Bhuvaneswari-Santharam
Copy link
Member

@Bhuvaneswari-Santharam Bhuvaneswari-Santharam commented Jun 10, 2021

Description

Testing Guide


This checklist is used to make sure that common guidelines for a pull request are followed.

@bganapa bganapa changed the title [Azurestack][ACR][AKS]Change Authorization api-version for hybrid profile [Azurestack][ACR][AKS] Adding Tests and Fixing Authorization api-version for hybrid profile Jun 10, 2021
@yonzhan yonzhan added this to the S189 milestone Jun 11, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Jun 11, 2021

Azurestack

@Juliehzl
Copy link
Contributor

please make CI pass first

@Bhuvaneswari-Santharam
Copy link
Member Author

@Juliehzl - All CI checks passed. Please review

@@ -241,7 +241,7 @@ def default_api_version(self):
ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS: '2016-06-01',
ResourceType.MGMT_RESOURCE_TEMPLATESPECS: '2015-01-01',
ResourceType.MGMT_NETWORK_DNS: '2016-04-01',
ResourceType.MGMT_AUTHORIZATION: SDKProfile('2016-09-01', {
ResourceType.MGMT_AUTHORIZATION: SDKProfile('2015-07-01', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a downgrade for authorization?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a downgrade, This is a bug fix. In our earlier PR we have mistakenly updated the api version @Juliehzl

from ._errors import CMK_MANAGED_IDENTITY_ERROR
_handle_error(CMK_MANAGED_IDENTITY_ERROR.format_error_message(registry_name), ignore_errors)
if cmd.supported_api_version(min_api='2020-11-01-preview', resource_type=ResourceType.MGMT_CONTAINERREGISTRY): # pylint: disable=too-many-nested-blocks
# CMK settings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also add acr code owner to review your change

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bhuvaneswari-Santharam I tested this locally and it looks good. @northtyphoon we should consider adding some unit tests for acr check-health

Copy link
Contributor

@adewaleo adewaleo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for ACR.
@Bhuvaneswari-Santharam I tested this locally and it looks good.
@northtyphoon we should consider adding some unit tests for acr check-health

@yonzhan
Copy link
Collaborator

yonzhan commented Jun 30, 2021

@northtyphoon please add more unit tests as @adewaleo mentioned.

@adewaleo
Copy link
Contributor

@northtyphoon please add more unit tests as @adewaleo mentioned.

@yonzhan, I was making this suggestion as a follow up item. Given acr check-health (convenience command for diagnosis) doesn't currently have unit tests. I did manually test to see that this change doesn't break acr check-health. I won't want this request to block @Bhuvaneswari-Santharam

Copy link
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update some recording files, since some of the tests failed.


# pylint: skip-file
import unittest
import mock
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mock module is deprecated in azure cli. see #19024

Copy link
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AKS test recordings looks good to me.

Copy link
Contributor

@Juliehzl Juliehzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mock module is deprecated in azure cli. see #19024

from urllib import urlencode
import json
import unittest
import mock
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still have mock here.

@Juliehzl Juliehzl merged commit 2693f38 into Azure:dev Aug 6, 2021
@evelyn-ys evelyn-ys changed the title [Azurestack][ACR][AKS] Adding Tests and Fixing Authorization api-version for hybrid profile {Azurestack} ACR & AKS: Adding Tests and Fixing Authorization api-version for hybrid profile Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants