mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-02 18:12:17 +00:00
Skip existing, second iteration: Check the index before uploading (#8531)
Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
parent
b52f229862
commit
082259493e
14 changed files with 487 additions and 223 deletions
|
@ -4819,6 +4819,22 @@ pub struct PublishArgs {
|
|||
value_parser = parse_insecure_host,
|
||||
)]
|
||||
pub allow_insecure_host: Option<Vec<Maybe<TrustedHost>>>,
|
||||
|
||||
/// Check an index URL for existing files to skip duplicate uploads.
|
||||
///
|
||||
/// This option allows retrying publishing that failed after only some, but not all files have
|
||||
/// been uploaded, and handles error due to parallel uploads of the same file.
|
||||
///
|
||||
/// Before uploading, the index is checked. If the exact same file already exists in the index,
|
||||
/// the file will not be uploaded. If an error occurred during the upload, the index is checked
|
||||
/// again, to handle cases where the identical file was uploaded twice in parallel.
|
||||
///
|
||||
/// The exact behavior will vary based on the index. When uploading to PyPI, uploading the same
|
||||
/// file succeeds even without `--check-url`, while most other indexes error.
|
||||
///
|
||||
/// The index must provide one of the supported hashes (SHA-256, SHA-384, or SHA-512).
|
||||
#[arg(long,env = EnvVars::UV_PUBLISH_CHECK_URL)]
|
||||
pub check_url: Option<IndexUrl>,
|
||||
}
|
||||
|
||||
/// See [PEP 517](https://peps.python.org/pep-0517/) and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue