Skip to content

art:promote fails for Zstd-compressed Conan packages #243

Description

@aka271

Issue: art:promote fails for Zstd-compressed Conan packages

Description

The art:promote command currently fails when attempting to promote Conan packages that use the Zstd compression standard. This is due to the file extensions being hardcoded to .tgz within the promotion logic, causing the command to look for files that do not exist when .tzst (or similarly named Zstd archives) are used.

Steps to Reproduce

  1. Configure a Conan profile/client to use zstd compression.
  2. Upload a package to Artifactory.
  3. Attempt to promote the package using the art:promote command.
  4. The process fails with an error stating the item does not exist.

Error Logs

-------- Promoting .../conan_package.tgz --------
ERROR: Failed to promote .../conan_package.tgz: {
  "messages" : [ {
    "level" : "ERROR",
    "message" : "Could not calculate repo path from src=.../conan_package.tgz, target=.../conan_package.tgz: Item .../conan_package.tgz does not exist"
  } ]
}

Root Cause

In cmd_promote.py (specifically lines 71-80), the list of files to promote is hardcoded to look specifically for conan_package.tgz:

    for file, continue_on_error in (("conan_package.tgz", True),
                                    ("conaninfo.txt", False),
                                    ("conanmanifest.txt", False)):

Notes

I have already made some changes and tested them locally. I tried to submit a pull request, but I can't push my branch. Please let me know if you would like the changes and how to provide them to you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions