Conversation
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 01a7f19141d71d72231ca89e2135188ab2934b07
stderr: 'fatal: reference is not a tree: 01a7f19141d71d72231ca89e2135188ab2934b07' |
Automation for azure-sdk-for-nodeA PR has been created for you: |
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 01a7f19141d71d72231ca89e2135188ab2934b07
stderr: 'fatal: reference is not a tree: 01a7f19141d71d72231ca89e2135188ab2934b07' |
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 01a7f19141d71d72231ca89e2135188ab2934b07
stderr: 'fatal: reference is not a tree: 01a7f19141d71d72231ca89e2135188ab2934b07' |
|
Can one of the admins verify this patch? |
|
We have a separate process to onboard new RPs for the Net Sdk, please disregard |
specification/cognitiveservices/data-plane/Speech/stable/v2.0/Speech.json
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/data-plane/Speech/stable/v2.0/Speech.json
Outdated
Show resolved
Hide resolved
|
@shahabhijeet Do you know why the sdk-for-net is failing? |
veronicagg
left a comment
There was a problem hiding this comment.
- Given that this appears to be a completety new spec, has it been reviewed by the Azure API review board?
- Could you include someone else from your team to sing-off on the content of the PR?
- In order to generate SDKs we need readme.md configuration files, please take a look at https://github.com/Azure/azure-rest-api-specs/tree/cc3861000c4cfe6b02c3dcd84ccb875d0968f4b3/specification/cognitiveservices/data-plane/CustomVision/Training and include these in the PR.
- Are these APIs already deployed?
|
@veronicagg - Thanks for the response.
|
|
@veronicagg - Can you please link me to guidelines for creating the readme configuration files? |
|
@erhopf general guidance is at https://github.com/Azure/autorest/blob/87a5600e4af7ea185a887c63ad3153f0936fb0fa/docs/user/configuration.md |
|
#sign-off |
|
@PanosPeriorellis is there a reason for marking the typos as resolved without pushing anything? I know there is a bug with the GitHub preview on large files showing the wrong line on this view, but you can see the issues looking at the file view |
-corrected levvel-> level and occured -> occurred
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 01a7f19141d71d72231ca89e2135188ab2934b07
stderr: 'fatal: reference is not a tree: 01a7f19141d71d72231ca89e2135188ab2934b07' |
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 01a7f19141d71d72231ca89e2135188ab2934b07
stderr: 'fatal: reference is not a tree: 01a7f19141d71d72231ca89e2135188ab2934b07' |
-added all read me files required following the example of FACE (seemed closer than custom vision)
|
I added all the readme files that are required following the example from FACE |
veronicagg
left a comment
There was a problem hiding this comment.
Please review CI errors for linter check https://github.com/Azure/azure-rest-api-specs/pull/5445/checks?check_run_id=82863674
|
@shahabhijeet @dsgouda is the failure for .net generation due to being a new provider? should it be ignored? |
Yes, please ignore, we will on board them in the SDK repo separately |
|
@veronicagg - What are the next steps? Do we owe you anything? |
|
@PanosPeriorellis @erhopf yes, per my request of changes above, please review and correct CI errors for linter check https://github.com/Azure/azure-rest-api-specs/pull/5445/checks?check_run_id=82863674 |
- fixed some errors related to "format": "uri"
fixed anonymous type error
update 1 of 2 blokcs
| } | ||
| } | ||
| } | ||
| "$ref": "#/definitions/IReadOnlyDictionary`2" |
There was a problem hiding this comment.
is the "`" an intentional character in this name? When generating SDK code, this name will turn into a Class name.
| }, | ||
| "definitions": { | ||
| "IReadOnlyDictionary`2": { | ||
| "title": "IReadOnlyDictionary`2", |
There was a problem hiding this comment.
minor: please indent the properties
| }, | ||
| "definitions": { | ||
| "IReadOnlyDictionary`2": { | ||
| "title": "IReadOnlyDictionary`2", |
| "IReadOnlyDictionary`2": { | ||
| "title": "IReadOnlyDictionary`2", | ||
| "type": "object", | ||
| "properties": { |
There was a problem hiding this comment.
could you add descriptions for these properties?
| "type": "object", | ||
| "properties": { | ||
| "None": { | ||
| "none": { |
There was a problem hiding this comment.
does the casing update reflect the service? Overall, we need to make sure the swagger reflects the service, so if updates made to the swagger due to issues reported by tools do not reflect the service, and the service can't be changed for this api version, you can ask for exceptions for the issues.
veronicagg
left a comment
There was a problem hiding this comment.
More comments inline.
| ] | ||
| } | ||
| }, | ||
| "401": { |
There was a problem hiding this comment.
please see https://github.com/Azure/azure-rest-api-specs/blob/da93a8f5a90e63c882d176021d6b935671faf0ba/documentation/creating-swagger.md#responses in particular https://github.com/Azure/azure-rest-api-specs/blob/da93a8f5a90e63c882d176021d6b935671faf0ba/documentation/creating-swagger.md#negative-responses
the recommendation is to have a "default" response for error responses which return an error model. If the spec describes each code, AutoRest for SDK code generation will have an "Object" return type for the operations, as "Error" and your actual return type have no other ancestor in common.
| ], | ||
| "parameters": [ | ||
| { | ||
| "name": "id", |
There was a problem hiding this comment.
suggestion: you could abstract the parameter to the global parameter section, since you're referencing from multiple operations.
| "Custom Speech accuracy tests:" | ||
| ], | ||
| "summary": "Gets the list of accuracy tests for the authenticated subscription.", | ||
| "operationId": "GetAccuracyTests", |
There was a problem hiding this comment.
Operation ID should be of the form NOUN_VERB, the NOUN will become the "operation group" when generating SDK code, basically the name of the class in which all operations which shared it can be under. Ex. AccuracyTest_List
| "Custom Speech accuracy tests:" | ||
| ], | ||
| "summary": "Creates a new accuracy test.", | ||
| "operationId": "CreateAccuracyTest", |
| "Custom Speech accuracy tests:" | ||
| ], | ||
| "summary": "Gets the accuracy test identified by the given ID.", | ||
| "operationId": "GetAccuracyTest", |
| "properties": { | ||
| "AcceptedLines": "11", | ||
| "RejectedLines": "2", | ||
| "ReportUri": "https://www.example.org/AcousticData/ed9b62f0-aa8e-419c-ab55-d7ca83c2f6b3?st=2018-02-09T18%3A07%3A00Z&se=2018-02-10T18%3A07%3A00Z&sp=r |
There was a problem hiding this comment.
should this be tagged as long-running? - see https://github.com/Azure/autorest/tree/master/docs/extensions#x-ms-long-running-operation
| "properties": { | ||
| "AcceptedLines": "11", | ||
| "RejectedLines": "2", | ||
| "ReportUri": "https://www.example.org/AcousticData/ed9b62f0-aa8e-419c-ab55-d7ca83c2f6b3?st=2018-02-09T18%3A07%3A00Z&se=2018-02-10T18%3A07%3A00Z&sp=r |
There was a problem hiding this comment.
long running? see my comment above referring to this
| "properties": { | ||
| "AcceptedLines": "11", | ||
| "RejectedLines": "2", | ||
| "ReportUri": "https://www.example.org/AcousticData/ed9b62f0-aa8e-419c-ab55-d7ca83c2f6b3?st=2018-02-09T18%3A07%3A00Z&se=2018-02-10T18%3A07%3A00Z&sp=r |
There was a problem hiding this comment.
please review https://github.com/Azure/autorest/tree/master/docs/extensions#x-ms-enum Using this extension and choosing modelAsString: true, can avoid breaking changes in the future as more values get added. Please evaluate this for all enums used in the spec.
|
Please review warnings from tools as well https://github.com/Azure/azure-rest-api-specs/pull/5445/checks?check_run_id=85238457#user-content-SDK-Warnings |
|
@PanosPeriorellis regarding your question on examples, examples inline should also work, and in that case you could request an exception for the warning https://github.com/Azure/adx-documentation-pr/wiki/Swagger-Validation-Errors-Suppression (make sure you're logged in to Github and have your account linked to Azure org to see this page). |
|
Additionally, you may want to take a look at the generated code from the SDKs (comments with generated PRs posted in the comments) to see if at least one the languages look like what you would expect. Thanks! |
updated based on veronica's suggestions.
updated the response codes
veronicagg
left a comment
There was a problem hiding this comment.
Thanks for addressing the comments @PanosPeriorellis .
Regarding the suppression, since it needs to be fixed at some point, we won’t be suppressing (sorry about my previous comment). I will approve and merge with the error, once all the other comments are resolved.
Regarding my comment about the error codes for operations, it looks like you’d like to go ahead with what you have, is that correct?
I posted a couple of suggestions incline and here are some questions:
Please make sure to review warning and decide whether you want to fix them or not:
https://dev.azure.com/azure-sdk/public/_build/results?buildId=17447&view=logs&jobId=688669d0-441c-57c3-cf6d-f89a22ccfa5d&taskId=923b5a90-e462-5994-c166-86509c6bf5f2&lineStart=1111&lineEnd=1112&colStart=1&colEnd=1
I see errors reported from CI for:
Model validation for the examples inline the spec: https://dev.azure.com/azure-sdk/public/_build/results?buildId=17447&view=logs&jobId=8d2f9c49-cd83-5a9d-f3fe-2fd651afa742&taskId=43324f1f-6724-5d61-785f-f0ac9fd256a1&lineStart=63&lineEnd=64&colStart=1&colEnd=1
Once you confirm you’re done with changes and happy with the current state, I can approve and merge, please know that without addressing the error code responses comment, your SDKs will not have a good customer experience on return type for operations.
To request SDK releases please use https://portal.azure-devex-tools.com/app/tools/request-api-release. If you change how things look in the future, be aware that it can result in breaking changes.
| ], | ||
| "summary": "Gets the list of models for the authenticated subscription.", | ||
| "operationId": "GetModels", | ||
| "operationId": "Models_Get", |
| ], | ||
| "summary": "Gets a list of transcriptions for the authenticated subscription.", | ||
| "operationId": "GetTranscriptions", | ||
| "operationId": "Transcriptions_Get", |
There was a problem hiding this comment.
suggestion: Transcription_List
| "Custom Speech accuracy tests:" | ||
| ], | ||
| "summary": "Gets the list of accuracy tests for the authenticated subscription.", | ||
| "operationId": "AccuracyTests_List", |
There was a problem hiding this comment.
Please update to AccuracyTest_List to make it inconsistent with the rest of the methods, like AccuracyTest_Create, since it's causing SDK generation issues in Java for example https://dev.azure.com/azure-sdk/public/_build/results?buildId=17447&view=logs&jobId=ef1a6f21-3eb6-5439-fa7a-dcd9cf589dd1&taskId=7d38bc47-3f36-578f-2b95-a19eb7179ec4&lineStart=155&lineEnd=156&colStart=1&colEnd=1
There was a problem hiding this comment.
Btw, I will not expose this to customers just yet, or at least until we fix the error. I just want to complete this so we get on a roll, get to know your process and start making progress.
There was a problem hiding this comment.
@PanosPeriorellis The fact of merging it to master means it's exposed to customers. Why do you want to merge this PR to master in the current state?
If you're intending to auto-generate SDKs we need to make sure that what we merge, meets the quality bar for SDKs. Java SDK generation is currently failing due to the Model name inconsistencies and the way return codes are specified for negative responses are no good for SDK auto generation. I understand the APIs are in GA, but the changes requested affect SDK generation.
|
@PanosPeriorellis I haven't heard back in more than 10 days on this PR, so I'll be closing it on Monday, and can be reopened when you get back to it. Thanks! |
|
@PanosPeriorellis sounds good, thanks for following up. Based on the timeline, I'll close it and you can tag me back when you're back to this. Thanks! |
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.