Conversation
Automation for azure-libraries-for-javaEncountered a Subprocess error: (azure-libraries-for-java)
Command: ['/usr/local/bin/autorest', '/tmp/tmpt0m8v569/rest/specification/applicationinsights/resource-manager/readme.md', '--azure-libraries-for-java-folder=/tmp/tmpt0m8v569/sdk', '--fluent', '--java', '--multiapi', '--verbose'] AutoRest code generation utility [version: 2.0.4262; node: v7.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core '/root/.autorest/@microsoft.azure_autorest-core@2.0.4272/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4272)
Loading AutoRest extension '@microsoft.azure/autorest.java' (~2.1.32->2.1.49)
Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.38->2.3.38)
FATAL: System.Exception: Duplicate File Generation: src/main/java/com/microsoft/azure/management/applicationinsights/implementation/FavoritesInner.java
at AutoRest.Core.CodeGenerator.<Write>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at AutoRest.Core.CodeGenerator.<Write>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at AutoRest.Java.Azure.Fluent.CodeGeneratorJvaf.<Generate>d__6.MoveNext() in C:\Users\autorest-ci\AppData\Local\Temp\2\PUBLISHedxhk\164_20180307T193002\autorest.java\src\azurefluent\CodeGeneratorJvaf.cs:line 57
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at AutoRest.Java.Program.<ProcessInternal>d__3.MoveNext() in C:\Users\autorest-ci\AppData\Local\Temp\2\PUBLISHedxhk\164_20180307T193002\autorest.java\src\Program.cs:line 115
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NewPlugin.<Process>d__15.MoveNext()
FATAL: java/generate - FAILED
FATAL: Error: Plugin java reported failure.
Process() cancelled due to exception : Plugin java reported failure.
Error: Plugin java reported failure. |
Automation for azure-sdk-for-pythonThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-nodeThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-goThe initial PR has been merged into your service PR: |
|
@dsgouda -- you can wait for the API review board to review this. |
ravbhatnagar
left a comment
There was a problem hiding this comment.
APIs for workbook resource looks good. links resource API have some issues.
There was a problem hiding this comment.
This PUT URL should be modeled as /workbooks/{workbookname}/links/{linkName}. Then in the request body you dont need the targetId parameter as it can be inferred from the URL.
There was a problem hiding this comment.
This URL will not work. There is a segment (workbookName) missing between workbooks and links
There was a problem hiding this comment.
The other problem with this URL is that it seems like the customer requested to GET resources of type "foo" (links) but what they got was resources of type "bar" (workbooks). This will result in an alert that ARM will open against your service.
There was a problem hiding this comment.
we'd talked during the last review about removing the links apis entirely because of things like this, and only letting links be modified via PATCH on the workbook itself, making the links there an array instead of just the single initial value.
There was a problem hiding this comment.
Yup, thats what I recall. And that model will work. @ericc1103 - Do you plan to update the spec with the above proposal.
There was a problem hiding this comment.
I am currently updating it now.
|
I have removed a link related endpoint per request. |
|
Looks good! |
dsgouda
left a comment
There was a problem hiding this comment.
Left a few comments, looks great for the most part.
| "location": "westus", | ||
| "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", | ||
| "properties": { | ||
| "name": "Blah Blah Blah", |
There was a problem hiding this comment.
nit: a meaningful name would be nice :)
There was a problem hiding this comment.
We are using a resource name as GUID and display name is under properties.
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", |
There was a problem hiding this comment.
nit: we recommend not using prod-like strings, please replace this by {subId}/{name}, etc
There was a problem hiding this comment.
In previous examples this was "west us", please check for consistency
There was a problem hiding this comment.
Marking this as false can cause breaking changes if new enum values are introduced
There was a problem hiding this comment.
same comment as above for modelAsString
| "description": "Azure Resource id or any target workbook resource id.", | ||
| "x-ms-parameter-location": "method" | ||
| }, | ||
| "CanFetchWorkbookContentParameter": { |
There was a problem hiding this comment.
A better name would be FetchWorkbookContentParameter
| "description": "The user-defined name of the workbook." | ||
| }, | ||
| "serializedData": { | ||
| "type": "string", |
There was a problem hiding this comment.
Please check if this is readOnly
| "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks": { | ||
| "get": { | ||
| "description": "Get all Workbooks defined within a specified subscriptionId. It will get a list of workbooks or linked workbooks based on $filter clause. If sourceId is specified, it will get a list of linked workbboks. If a targetId is specified, it will get a list of workboks. When a targetId is specified, a resourceName is not required. Even if it is provided, it will be ignored.", | ||
| "operationId": "Workbooks_ListByResourceGroup", |
There was a problem hiding this comment.
Consider making this a pageable operation
|
@fearthecowboy We decided to remove a link type to make it simpler. |
|
@dsgouda I have applied all your suggestions. Please let me know if there are more things I would need to address. |
This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information
api-versionin the path should match theapi-versionin the spec).Quality of Swagger