-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
DO NOT MERGE. BatchAI. Specification for new 2018-05-01 API version #2896
Conversation
Automation for azure-libraries-for-javaThe initial PR has been merged into your service PR: |
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-goA PR has been created for you based on this PR content. Once this PR will be merged, content will be added to your service PR: |
Hi There, I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result: File: AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
@AlexanderYukhanov Let me know when this is ready for review |
Changes: - Added first class support for Horovod framework - Added first class support for custom mpi commands - Introduced workspaces - Introduces experiments as a grouping mechanism for related jobs - Moved jobs from the top level into workpace/experiment - Moved clusters and file servers from the top level into workspaces - Removing filter and select parameters as they are not suppported yet - Removing FileServer type as only NFS is supporter - Removed type of output directories - server doesn't support it - Removed 'createNew' attribute of output directory because there is no use-case scenario for having it equal to false.
Hi There, I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result: 💡 Please review potentially introduced Error(s)/Warning(s): Analysis Report 💡 File: AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
Ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments
], | ||
"x-ms-enum": { | ||
"name": "UsageUnit", | ||
"modelAsString": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting this as false can cause breaking changes if the enum values change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed here and in other appropriate places
"nextLink": { | ||
"type": "string", | ||
"description": "The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page of compute resource usage information." | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mark this as readonly
}, | ||
"Usage": { | ||
"properties": { | ||
"unit": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check which of these values are readonly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usages do not have a PUT. This is a GET only API. Do we still need to mark every property explicitly as readonly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we set readonly to true, the setter becomes private in generated model (which means no one can externally set this value, only deserialization process will do that).
tl;dr for better quality generated code, it would good, but won't block on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, in this case we will update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on the other hand. what if a user wants to write unit tests for his code? he needs to be able to set values.
I remember how hard I hated google for similar limitations in android. let's do not do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If testing alone is the concern why not simply deserialize a production-like json representation.
Again, this is a decision left to you. Let me know what direction you'd like to take and I shall approve the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pradeepgunda please vote
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decided to go with readonly
"nextLink": { | ||
"type": "string", | ||
"description": "The continuation token." | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mark all nextLink
as readonly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
], | ||
"x-ms-enum": { | ||
"name": "CachingType", | ||
"modelAsString": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as before for modelAsString
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in other places, but not here. it's storage premium disk caching type and it seems to be a pretty stable enum
"$ref": "#/definitions/ImageReference" | ||
} | ||
}, | ||
"description": "Setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default,. C# has the exact same structure for CloudError
which is set as the Body
property in CloudException
. If this was the intention here, it would be easier to simply not specify the error model for the operations .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason we did not use CloudError is because we will be adding more properties to Job and Cluster errors. for e.g. category -- userError, serverError. Also we will be returning collection of errors.
"$ref": "#/definitions/ImageReference" | ||
} | ||
}, | ||
"description": "Setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add CreationTime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
"$ref": "#/definitions/ImageReference" | ||
} | ||
}, | ||
"description": "Setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add creationtime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
"$ref": "#/definitions/ImageReference" | ||
} | ||
}, | ||
"description": "Setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we call this priorityLevel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after discussion, decided to have schedulingPriority
Also, |
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/batchai/resource-manager/readme.md
|
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/batchai/resource-manager/readme.md
|
Code | Id | Source | Message |
---|---|---|---|
PutRequestResponseScheme | R2017 | Link | A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Workspaces_Create' Request Model: 'WorkspaceCreateParameters' Response Model: 'Workspace' |
PutRequestResponseScheme | R2017 | Link | A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Experiments_Create' Request Model: 'ExperimentCreateParameters' Response Model: 'Experiment' |
PutRequestResponseScheme | R2017 | Link | A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Jobs_Create' Request Model: 'JobCreateParameters' Response Model: 'Job' |
PutRequestResponseScheme | R2017 | Link | A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'FileServers_Create' Request Model: 'FileServerCreateParameters' Response Model: 'FileServer' |
PutRequestResponseScheme | R2017 | Link | A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Clusters_Create' Request Model: 'ClusterCreateParameters' Response Model: 'Cluster' |
❌0 new Errors.(0 total)
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM will merge when ready and CI pass
Should we request the ARM approval? Can you please add the corresponding label? |
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-version
in the path should match theapi-version
in the spec).Quality of Swagger