[CostManagement]: Introduce new APIs of View and CheckNameAvailability#5895
[CostManagement]: Introduce new APIs of View and CheckNameAvailability#5895bgsky wants to merge 16 commits intoAzure:masterfrom
Conversation
…2019-03-01-preview to version 2019-04-01-preview
Automation for azure-sdk-for-rubyEncountered an unknown error: (azure-sdk-for-ruby)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout 07e565f60a95d4ba88bf1ad534f9b4c15e5c4be7
stderr: 'fatal: reference is not a tree: 07e565f60a95d4ba88bf1ad534f9b4c15e5c4be7' |
Automation for azure-sdk-for-jsEncountered an unknown error: (azure-sdk-for-js)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout 07e565f60a95d4ba88bf1ad534f9b4c15e5c4be7
stderr: 'fatal: reference is not a tree: 07e565f60a95d4ba88bf1ad534f9b4c15e5c4be7' |
Automation for azure-sdk-for-pythonEncountered an unknown error: (azure-sdk-for-python)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout 07e565f60a95d4ba88bf1ad534f9b4c15e5c4be7
stderr: 'fatal: reference is not a tree: 07e565f60a95d4ba88bf1ad534f9b4c15e5c4be7' |
Automation for azure-sdk-for-goEncountered an unknown error: (azure-sdk-for-go)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout 07e565f60a95d4ba88bf1ad534f9b4c15e5c4be7
stderr: 'fatal: reference is not a tree: 07e565f60a95d4ba88bf1ad534f9b4c15e5c4be7' |
|
Can one of the admins verify this patch? |
Automation for azure-sdk-for-javaEncountered an unknown error: (azure-sdk-for-java)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout 07e565f60a95d4ba88bf1ad534f9b4c15e5c4be7
stderr: 'fatal: reference is not a tree: 07e565f60a95d4ba88bf1ad534f9b4c15e5c4be7' |
NelsonDaniel
left a comment
There was a problem hiding this comment.
@bgsky The PR is faling on semantic, ModelValidation, lintdiff and a couple of Sdks. You can check the failures here https://dev.azure.com/azure-sdk/public/_build/results?buildId=28664
Please make sure to go through the contribution list as well.
Also, if you haven't taken a look at our new onboarding experience at OpenAPIHub, it's a convenient way to create your PR when you're copying from an existing API version or when you're editing your existing specs. Thanks!
DELETE requires the following responses:
Refers to: specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json:2122 in edea17d. [](commit_id = edea17d, deletion_comment = False) |
Are you ever going to add paging? If yes, then you should add it to the swagger even if service doesn't support it yet. Makes it easier to add paging later. Refers to: specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json:3854 in 6f28a1a. [](commit_id = 6f28a1a, deletion_comment = False) |
majastrz
left a comment
There was a problem hiding this comment.
I added comments. Can you take a look?
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Show resolved
Hide resolved
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "The scope associated with view operations. This includes '/subscriptions/{subscriptionId}' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope.", |
There was a problem hiding this comment.
"The scope associated with view operations. Cost Management supports any scope above a subscription, from billing accounts and management groups down to subscriptions and resource groups. Learn more about scopes and how to obtain the resource ID for your scope at Understanding and working with scopes"
I realize Query, Dimensions, and possibly Exports don't use this today. I want to fix those, too. Bonus points if you can specify this once and have all of those other APIs use the same description. It's always the same across all APIs.
|
@azuresdkci retest this please |
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Outdated
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Show resolved
Hide resolved
...ent/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json
Show resolved
Hide resolved
|
@majastrz In case of deleting a resource type of view, we throw no content exception, as part of error response, instead of 204. @NelsonDaniel Please review validation. Some model failures are from other resource types in previous version. I would like to keep PR focus on new APIs, and not break old ones. Please also refer to validation from OpenAPI Hub |
The required response code is 204 on DELETE where the resource doesn't exist. Otherwise, it should return 200 with the body of the resource that was successfully deleted. HTTP 204 is sometimes described as "No Content", so it's likely you're talking about the same thing. Please confirm. |
|
@majastrz We are talking about the same thing. We do not list response of 204 separately, as it is wrapped in defaulted error response. |
|
@bgsky @gahorowi - Cost management has a couple of PRs open to add new APIs/make changes to this RP. Budget APis are not present in this one and Views APIs are not present in the other PR. Can you please work with the owner of the APis in other PR and have a joint API review? It may be helpful to schedule an API review meeting to close on it quicker. |
|
Closing this PR. As per my conversation with @bgsky, a separate PR will be open with merged APIs as suggested by @ravbhatnagar |
Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Contribution checklist:
ARM API Review Checklist
Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.
Please follow the link to find more details on API review process.