Skip to content

Interrupting gh release upload with --clobber leads to data loss #8822

@n-thumann

Description

@n-thumann

CLI Feedback

What was confusing or gave you pause?

When uploading an asset to a release using --clobber, the existing artifact will be deleted before uploading the new one:

if a.ExistingURL != "" {
if err := deleteAsset(ctx, httpClient, a.ExistingURL); err != nil {
return err
}
}

This means that in case the upload of the new asset is interrupted, the existing asset is already gone (I experienced this first-hand, sadly). I would have expected that the new assets replaces the existing one only after the upload of the new one has succeeded, but it looks like there's no API endpoint for that anyways.

Therefore, I think the documentation could be more expressive to mention this behavior. Maybe something like Delete existing assets before uploading assets of the same name instead of Overwrite existing assets [...]?

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsenhancementa request to improve CLIgh-releaserelating to the gh release command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions