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

Add documentation for API Status Kind #5350

Merged
merged 1 commit into from
Mar 12, 2015

Conversation

saad-ali
Copy link
Member

@nikhiljindal
Copy link
Contributor

Thanks!
We also want to include the Statuses in swagger output.
Not sure if there is a separate bug for that

@saad-ali
Copy link
Member Author

Let's just leave #2974 open to handle that.

* `409 StatusConflict`
* Indicates that an item with the given identifier already exists and can't be created or can't be updated.
* Suggested client recovery behavior
* Do not retry. Fix the request: if creating a new item, change the identifier. If updating an item, ensure the `ResourceVersion` is up to date.
Copy link
Member

Choose a reason for hiding this comment

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

This case may require more explanation. You may also want to add a forward reference to the more detailed status response, below.

Unlike the cases above, an automatic response to 409 should typically be feasible.

For example, when updating, usually the client would GET the object, check the client's preconditions, re-merge changes if still valid according to preconditions, and retry with the updated request (including resourceVersion).

When creating, the client would GET and compare that the fields they tried to set matched the created object. Name uniqueness ensures idempotence in the presence of failure to receive a response, including due to failure of the client. A pre-existing object should be considered ok, provided it matched what the client wanted.

@bgrant0607
Copy link
Member

This is awesome! Just a couple comments.

@saad-ali
Copy link
Member Author

Thanks Brian! Addressed comments.
PTAL (updated "409 StatusConflict" and "429 StatusTooManyRequests" sections)

* Suggested client recovery behavior
* Do not retry. Fix the request.
* `429 StatusTooManyRequests`
* Indicates that the either the client rate limit has been exceeded or the server has recieved more requests then it can process.
Copy link
Member

Choose a reason for hiding this comment

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

typo: received

@bgrant0607
Copy link
Member

LGTM, other than the typo, which can be fixed in another PR. Thanks!

bgrant0607 added a commit that referenced this pull request Mar 12, 2015
Add documentation for API Status Kind
@bgrant0607 bgrant0607 merged commit f8ef90e into kubernetes:master Mar 12, 2015
@saad-ali saad-ali deleted the fixstatusdoc branch March 12, 2015 22:51
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.

4 participants