Skip to content

Update documentation of Batch data plane swagger.#2885

Merged
hovsepm merged 1 commit intoAzure:masterfrom
xingwu1:master
Apr 19, 2018
Merged

Update documentation of Batch data plane swagger.#2885
hovsepm merged 1 commit intoAzure:masterfrom
xingwu1:master

Conversation

@xingwu1
Copy link
Member

@xingwu1 xingwu1 commented Apr 16, 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 16, 2018

Automation for azure-libraries-for-java

Nothing to generate for azure-libraries-for-java

@xingwu1
Copy link
Member Author

xingwu1 commented Apr 16, 2018

@matthchr @darylmsft @dlepow Please review the doc change.

@AutorestCI
Copy link

AutorestCI commented Apr 16, 2018

Automation for azure-sdk-for-python

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

@AutorestCI
Copy link

AutorestCI commented Apr 16, 2018

Automation for azure-sdk-for-node

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

@AutorestCI
Copy link

AutorestCI commented Apr 16, 2018

Automation for azure-sdk-for-go

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

Choose a reason for hiding this comment

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

"and be": replace by "and will be" or "and"

Copy link
Member

Choose a reason for hiding this comment

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

We don't use PaaS/IaaS in public documentation.

Can you say this instead?
On CloudServiceConfiguration pools, this user is logged in with the INTERACTIVE flag. On Windows VirtualMachineConfiguration pools, this user is logged in with the BATCH flag.

Copy link
Member Author

Choose a reason for hiding this comment

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

We DO use PaaS/IaaS in the document, which exactly for cloudServiceConfiguration/virtualMachineConfig.

Choose a reason for hiding this comment

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

"All tasks should be idempotent, it means..." replace by "All tasks should be idempotent. This means tasks need to tolerate being... etc".

I don't think the email on this text and/or placement has reached a conclusion yet.

Copy link
Member

Choose a reason for hiding this comment

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

Remove the comma in "... being interrupted and restarted,without causing any corruption" #nitpick

Copy link
Member

Choose a reason for hiding this comment

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

My attempt:
"Note that this value specifically controls the number of retries for the task executable due to nonzero exit code. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task after the first attempt. If the maximum retry count is -1, the Batch service retries the task without limit. Resource files and application packages are only downloaded again if the task is retried on a new compute node. Batch will also retry tasks when a recovery operation is triggered on a compute node. Examples of recovery operations include (but are not limited to) when an unhealthy compute node is rebooted or a compute node disappeared due to host failure. Retries due to recovery operations are independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of this, all tasks should be idempotent. This means tasks need to tolerate being interrupted and restarted without causing any corruption or duplicate data. Best practices recommended for long running tasks is to use checkpointing."

I think some/all of this text (specifically this bit: Batch will also retry tasks when a recovery operation is triggered on a compute node. Examples of recovery operations include (but are not limited to) when an unhealthy compute node is rebooted or a compute node disappeared due to host failure. Retries due to recovery operations are independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of this, all tasks should be idempotent. This means tasks need to tolerate being interrupted and restarted without causing any corruption or duplicate data. Best practices recommended for long running tasks is to use checkpointing. which is about internal retries should be moved to the root of the task object rather than buried down here on maxtaskRetryCount which is actually about user retries not system/internal ones.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we able to include new lines in the description documentation? The internal retries topic is really a separate concept than the user retries and it would be helpful to make a clear distinction when we branch off into it to prevent confusion.

I agree with Matt's point that idempotent tasks should be addressed closer to the root as well because not everyone will care enough to read into retry policy. Generally when reading documentation people will start at the base and then delve deeper into the options as needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Did you already ship client SDK with the current api version? Will they still work without this parameter being sent to server?

Copy link
Member Author

Choose a reason for hiding this comment

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

@hovsepm This is server response. Not request.

Copy link
Contributor

@hovsepm hovsepm Apr 17, 2018

Choose a reason for hiding this comment

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

@xingwu1 why do you mark server response fields as required then? IMHO they should be marked as "readOnly": true to prevent client from modifying them. Required field means that those parameters should be present in the request and not response - https://swagger.io/docs/specification/describing-parameters/#required-and-optional-parameters-7

Copy link
Member Author

Choose a reason for hiding this comment

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

readOnly and required field can't co-exist. However, without required field, all the int properties will convert to Nullable which make user difficult to use. So right now, we will keep the required field right now. We will re-consider readonly field.

Copy link
Member

Choose a reason for hiding this comment

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

Remove the comma in "... being interrupted and restarted,without causing any corruption" #nitpick

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure that "Tasks should be idempotent" is the most important information in this description; perhaps move it to the end? (Same comment also applies elsewhere.)

Copy link
Member

Choose a reason for hiding this comment

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

Agree with Bevan.

Copy link
Member

Choose a reason for hiding this comment

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

We don't use PaaS/IaaS in public documentation.

Can you say this instead?
On CloudServiceConfiguration pools, this user is logged in with the INTERACTIVE flag. On Windows VirtualMachineConfiguration pools, this user is logged in with the BATCH flag.

Copy link
Member

Choose a reason for hiding this comment

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

My attempt:
"Note that this value specifically controls the number of retries for the task executable due to nonzero exit code. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task after the first attempt. If the maximum retry count is -1, the Batch service retries the task without limit. Resource files and application packages are only downloaded again if the task is retried on a new compute node. Batch will also retry tasks when a recovery operation is triggered on a compute node. Examples of recovery operations include (but are not limited to) when an unhealthy compute node is rebooted or a compute node disappeared due to host failure. Retries due to recovery operations are independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of this, all tasks should be idempotent. This means tasks need to tolerate being interrupted and restarted without causing any corruption or duplicate data. Best practices recommended for long running tasks is to use checkpointing."

I think some/all of this text (specifically this bit: Batch will also retry tasks when a recovery operation is triggered on a compute node. Examples of recovery operations include (but are not limited to) when an unhealthy compute node is rebooted or a compute node disappeared due to host failure. Retries due to recovery operations are independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of this, all tasks should be idempotent. This means tasks need to tolerate being interrupted and restarted without causing any corruption or duplicate data. Best practices recommended for long running tasks is to use checkpointing. which is about internal retries should be moved to the root of the task object rather than buried down here on maxtaskRetryCount which is actually about user retries not system/internal ones.

Copy link
Member

Choose a reason for hiding this comment

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

Avoid this style of "reference" since it doesn't look nice in any generated language. I think we need to think of a better way to do this.

This comment applies down the line.

Copy link
Member

Choose a reason for hiding this comment

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

Agree with Bevan.

@hovsepm
Copy link
Contributor

hovsepm commented Apr 17, 2018

To all reviewers: please explicitly approve the PR then I'll be able to merge it.

@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/batch/data-plane/readme.md
Before the PR: Warning(s): 1 Error(s): 0
After the PR: Warning(s): 1 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@hovsepm
Copy link
Contributor

hovsepm commented Apr 18, 2018

Waiting for all reviewers to sign-off.

@xingwu1
Copy link
Member Author

xingwu1 commented Apr 19, 2018

@matthchr @dlepow Please review the PR and sign it off.

Copy link
Member

Choose a reason for hiding this comment

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

Due to a nonzero exit code (missing the "a")

Copy link
Member

Choose a reason for hiding this comment

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

If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variables (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables)

Copy link
Member

Choose a reason for hiding this comment

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

This applies to all copies of this description, since there are a few

Copy link
Member

Choose a reason for hiding this comment

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

At the end:
"The best practice for long running tasks is to use some form of checkpointing."

Copy link
Member

Choose a reason for hiding this comment

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

Applies to all copies

@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/batch/data-plane/readme.md
Before the PR: Warning(s): 1 Error(s): 0
After the PR: Warning(s): 1 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@xingwu1
Copy link
Member Author

xingwu1 commented Apr 19, 2018

@hovsepm you can merge it

@hovsepm hovsepm merged commit 9d16433 into Azure:master Apr 19, 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.

8 participants

Comments