Skip to content

Commit

Permalink
Auto merge of #11926 - ehuss:publish-api-index-docs, r=weihanglo
Browse files Browse the repository at this point in the history
Publish docs: Clarify requirements about the state of the index after publish.

The current Publish API docs don't mention anything about the requirements of updating the index asynchronously, so this adds some information about how cargo handles that.
  • Loading branch information
bors committed Apr 3, 2023
2 parents 7618951 + f8ebfc1 commit 0240187
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/doc/src/reference/registry-web-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ The publish endpoint is used to publish a new version of a crate. The server
should validate the crate, make it available for download, and add it to the
index.

It is not required for the index to be updated before the successful response is sent.
After a successful response, Cargo will poll the index for a short period of time to identify that the new crate has been added.
If the crate does not appear in the index after a short period of time, then Cargo will display a warning letting the user know that the new crate is not yet available.

The body of the data sent by Cargo is:

- 32-bit unsigned little-endian integer of the length of JSON data.
Expand Down

0 comments on commit 0240187

Please sign in to comment.