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

azure-mgmt-costmanagement CostManagementClient does not handle api_version #18957

Closed
jazelenk opened this issue May 26, 2021 · 15 comments
Closed
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Cost Management - Query All issues in cost management associated with tags, dimensions and forecasts. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@jazelenk
Copy link

  • Package Name: azure-mgmt-costmanagement
  • Package Version: 1.0.0
  • Operating System: Linux
  • Python Version: 3.7.3

Describe the bug
The default api_version used by CostManagementClient is incorrect (#16102, #17351). When I specify the correct API version explicitly while constructing CostManagementClient , it is ignored.

To Reproduce
Steps to reproduce the behavior:

  1. CostManagementClient(api_version='2019-11-01')
  2. attempt to use this client
  3. observe it failing because it uses the wrong API version anyway

Expected behavior
I expect that when I specify an api_version string when constructing CostManagementClient , that API version is used.

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 26, 2021
@swathipil swathipil added bug This issue requires a change to an existing behavior in the product in order to be resolved. Cost Management Mgmt This issue is related to a management-plane library. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels May 26, 2021
@swathipil
Copy link
Member

@jazelenk Thanks for your question! Directing it to the people who can answer it.

@msyyc msyyc added the Service Attention Workflow: This issue is responsible by Azure service team. label May 27, 2021
@ghost
Copy link

ghost commented May 27, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ms-premp, @ramaganesan-rg.

Issue Details
  • Package Name: azure-mgmt-costmanagement
  • Package Version: 1.0.0
  • Operating System: Linux
  • Python Version: 3.7.3

Describe the bug
The default api_version used by CostManagementClient is incorrect (#16102, #17351). When I specify the correct API version explicitly while constructing CostManagementClient , it is ignored.

To Reproduce
Steps to reproduce the behavior:

  1. CostManagementClient(api_version='2019-11-01')
  2. attempt to use this client
  3. observe it failing because it uses the wrong API version anyway

Expected behavior
I expect that when I specify an api_version string when constructing CostManagementClient , that API version is used.

Author: jazelenk
Assignees: msyyc
Labels:

Cost Management, Mgmt, Service Attention, bug

Milestone: -

@msyyc
Copy link
Member

msyyc commented May 27, 2021

Hi @service team, 'azure-mgmt-costmanagement'==1.0.0 according to tag (https://github.com/Azure/azure-rest-api-specs/tree/master/specification/cost-management/resource-manager#tag-package-2020-06). However, in issue '#16102', customer gets the following error which indicates that '2020-06-01' is not supported. Could you help to check it?

azure.core.exceptions.ResourceNotFoundError: (InvalidResourceType) The resource type 'Query' could not be found in the namespace 'Microsoft.CostManagement' for api version '2020-06-01'. The supported api-versions are '2018-05-31,2018-08-31,2018-08-01-preview,2018-10-01-preview,2018-12-01-preview,2019-01-01,2019-03-01-preview,2019-04-01-preview,2019-05-01-preview,2019-10-01,2019-11-01'.

@jazelenk
Copy link
Author

This is not the same issue as #16102. That issue is about the default api_version being incorrect. This issue is about CostManagementClient ignoring the api_version kwarg.

@msyyc
Copy link
Member

msyyc commented May 28, 2021

(1) 'azure-mgmt-costmanagement' is single-api package. Its api version is hardcoded and can't be changed anyway.
(2) The problem is a service problem. They merge swagger of '2020-06-01'(https://github.com/Azure/azure-rest-api-specs/tree/master/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2020-06-01) into main repo. However, it seems that '2020-06-01' is not supported until now.

@msyyc
Copy link
Member

msyyc commented May 28, 2021

@jazelenk It may take long time to wait for service deployment. How about that : we publish a new package with older api-version '2019-11-01'.
Please check whether the private package works well:https://portal.azure-devex-tools.com/api/sdk-dl-pub?p=Azure/14584/azure-sdk-for-python-track2/track2_azure-mgmt-costmanagement/azure_mgmt_costmanagement-1.0.0b1-py2.py3-none-any.whl. If it works well, we will publish it next week. (please ignore the strange package version)

@jazelenk
Copy link
Author

This issue is not about the problem API version; the issue for that is #16102. This issue is about the fact that CostMangaementClient silently ignores the api_version kwarg. Neither updating the CostManagement RP nor updating the swagger fixes this issue.

@msyyc
Copy link
Member

msyyc commented May 31, 2021

please pay attention to my comment before:
image

Anyway, we have merged the PR (Azure/azure-rest-api-specs#14584) to revert to older API. If https://portal.azure-devex-tools.com/api/sdk-dl-pub?p=Azure/14584/azure-sdk-for-python-track2/track2_azure-mgmt-costmanagement/azure_mgmt_costmanagement-1.0.0b1-py2.py3-none-any.whl works well, we could publish new package for you.

@msyyc
Copy link
Member

msyyc commented Jun 10, 2021

new package for '2019-11' : https://pypi.org/project/azure-mgmt-costmanagement/2.0.0/

@ShilpiGautam ShilpiGautam added Cost Management-Query Service Attention Workflow: This issue is responsible by Azure service team. and removed Service Attention Workflow: This issue is responsible by Azure service team. labels Jul 8, 2021
@ghost
Copy link

ghost commented Jul 8, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ms-premp, @ramaganesan-rg.

Issue Details
  • Package Name: azure-mgmt-costmanagement
  • Package Version: 1.0.0
  • Operating System: Linux
  • Python Version: 3.7.3

Describe the bug
The default api_version used by CostManagementClient is incorrect (#16102, #17351). When I specify the correct API version explicitly while constructing CostManagementClient , it is ignored.

To Reproduce
Steps to reproduce the behavior:

  1. CostManagementClient(api_version='2019-11-01')
  2. attempt to use this client
  3. observe it failing because it uses the wrong API version anyway

Expected behavior
I expect that when I specify an api_version string when constructing CostManagementClient , that API version is used.

Author: jazelenk
Assignees: msyyc
Labels:

Cost Management, Cost Management-Query, Mgmt, Service Attention, bug

Milestone: -

@meeraharidasa meeraharidasa added Cost Management-Query Service Attention Workflow: This issue is responsible by Azure service team. and removed Cost Management Service Attention Workflow: This issue is responsible by Azure service team. labels Jul 8, 2021
@ghost
Copy link

ghost commented Jul 8, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mrlepat.

Issue Details
  • Package Name: azure-mgmt-costmanagement
  • Package Version: 1.0.0
  • Operating System: Linux
  • Python Version: 3.7.3

Describe the bug
The default api_version used by CostManagementClient is incorrect (#16102, #17351). When I specify the correct API version explicitly while constructing CostManagementClient , it is ignored.

To Reproduce
Steps to reproduce the behavior:

  1. CostManagementClient(api_version='2019-11-01')
  2. attempt to use this client
  3. observe it failing because it uses the wrong API version anyway

Expected behavior
I expect that when I specify an api_version string when constructing CostManagementClient , that API version is used.

Author: jazelenk
Assignees: msyyc
Labels:

Cost Management-Query, Mgmt, Service Attention, bug

Milestone: -

@jsquire jsquire added the Cost Management - Query All issues in cost management associated with tags, dimensions and forecasts. label Oct 18, 2021
@xiangyan99 xiangyan99 added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Dec 2, 2021
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Dec 9, 2021
@ghost
Copy link

ghost commented Dec 9, 2021

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@ghost ghost added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. labels Dec 9, 2021
@jazelenk
Copy link
Author

jazelenk commented Dec 9, 2021

Sorry! I missed the previous messages back in May. :-( I tested with that package, and unfortunately the api_version argument is still silently ignored.

@RAY-316 RAY-316 added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Dec 15, 2021
@ghost
Copy link

ghost commented Dec 15, 2021

Hi @jazelenk. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

@ghost ghost removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Dec 15, 2021
@ghost
Copy link

ghost commented Dec 22, 2021

Hi @jazelenk, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

@ghost ghost closed this as completed Dec 22, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Cost Management - Query All issues in cost management associated with tags, dimensions and forecasts. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

8 participants