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

DO NOT MERGE. BatchAI. Specification for new 2018-05-01 API version #2896

Merged
merged 3 commits into from
Apr 27, 2018
Merged

DO NOT MERGE. BatchAI. Specification for new 2018-05-01 API version #2896

merged 3 commits into from
Apr 27, 2018

Conversation

AlexanderYukhanov
Copy link
Contributor

@AlexanderYukhanov AlexanderYukhanov commented Apr 18, 2018

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

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@AutorestCI
Copy link

AutorestCI commented Apr 18, 2018

Automation for azure-libraries-for-java

The initial PR has been merged into your service PR:
AutorestCI/azure-libraries-for-java#89

@AutorestCI
Copy link

AutorestCI commented Apr 18, 2018

Automation for azure-sdk-for-python

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-python#2484

@AutorestCI
Copy link

AutorestCI commented Apr 18, 2018

Automation for azure-sdk-for-node

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-node#2809

@AutorestCI
Copy link

AutorestCI commented Apr 18, 2018

Automation for azure-sdk-for-go

A 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:
Azure/azure-sdk-for-go#1718

@AlexanderYukhanov AlexanderYukhanov changed the title BatchAI. Specification for new 2018-05-01 API version DO NOT MERGE. BatchAI. Specification for new 2018-05-01 API version Apr 18, 2018
@azuresdkciprbot
Copy link

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: specification/batchai/resource-manager/readme.md
Before the PR: Warning(s): 7 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@dsgouda dsgouda added the DoNotMerge <valid label in PR review process> use to hold merge after approval label Apr 18, 2018
@dsgouda
Copy link
Contributor

dsgouda commented Apr 18, 2018

@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.
@azuresdkciprbot
Copy link

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: specification/batchai/resource-manager/readme.md
Before the PR: Warning(s): 7 Error(s): 0
After the PR: Warning(s): 8 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@AlexanderYukhanov
Copy link
Contributor Author

Ready for review

Copy link
Contributor

@dsgouda dsgouda left a 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
Copy link
Contributor

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

Copy link
Contributor Author

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."
}
Copy link
Contributor

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": {
Copy link
Contributor

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

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?

Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pradeepgunda please vote

Copy link
Contributor Author

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."
}
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

@AlexanderYukhanov AlexanderYukhanov Apr 20, 2018

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
Copy link
Contributor

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 .

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add CreationTime

Copy link
Contributor Author

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add creationtime

Copy link
Contributor Author

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

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?

Copy link
Contributor Author

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

@dsgouda
Copy link
Contributor

dsgouda commented Apr 20, 2018

Also,
Please address the validation errors/warnings here

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These 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

⚠️0 new Warnings.(0 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These 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

⚠️5 new Warnings.(5 total)
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.

Copy link
Contributor

@dsgouda dsgouda left a 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

@AlexanderYukhanov
Copy link
Contributor Author

Should we request the ARM approval? Can you please add the corresponding label?

@ravbhatnagar ravbhatnagar added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Apr 26, 2018
@dsgouda dsgouda removed ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review DoNotMerge <valid label in PR review process> use to hold merge after approval labels Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants