conan
conan copied to clipboard
[bug] 301 Moved Permanently in response to conan upload's PUT requests results in a 409 Conflict for URL
Update: The below happens when a 301 redirect is returned in response to the PUT requests for the files being uploaded. Changing the conan remote's URL to match the one in the 301 allows the upload to proceed normally.
When uploading a package from Ubuntu a 409 Conflict for URL is received when the conanmanifest.txt file is uploaded. Copying the package to a MacOS environment with the same version of conan and an identical conan.conf allows the package to be uploaded just fine after deleting whatever managed to make it before the previous failure off of artifactory.
Environment Details (include every applicable attribute)
- Operating System+version: Ubuntu 22.04 / MacOS Monterey 12.5.1
- Compiler+version: GCC 11.3.0
- Conan version: 1.51.0 (Ubuntu & Mac). I've also separately checked that the issue happens when 1.53.0 is installed on the Ubuntu machine
- Python version: 3.8.15 & 3.10.6 (Ubuntu) / 3.8.13 (MacOS)
This is a relatively fresh Ubuntu install (installed last night), that I've since installed Qt 6, build-essentials, git, and cmake on. There are already zstd/1.5.0 packages for Windows and MacOS in the artifactory I'm using.
I've attached a copy of my profile. profile_ubuntu22.04.txt
Steps to reproduce (Include if Applicable)
- Run Python Black on zstd/1.5.0's conanfile.py
- Create a package for
zstd/1.5.0
- Run
conan upload zstd/1.5.0@ -r ... --all
- Recieve a 409 error
- Delete whatever half uploaded mess made it to Artifactory
- Copy ~/.conan/data/zstd to a MacOS system
- Run
conan upload zstd/1.5.0@ -r ... --all
- Package is uploaded successfully
Logs (Executed commands with output) (Include/Attach if Applicable)
(References to my employer have been replaced with ...
) Ubuntu:
conan create /home/gregory/.../src_build/zstd/1.5.0/conanfile.py zstd/1.5.0@_/_ --profile /home/gregory/.../_util/conan/profile_ubuntu22.04 --build missing
Exporting package recipe
zstd/1.5.0 exports: File 'conandata.yml' found. Exporting it...
zstd/1.5.0 exports: Copied 1 '.yml' file: conandata.yml
zstd/1.5.0 exports_sources: Copied 1 '.txt' file: CMakeLists.txt
zstd/1.5.0 exports_sources: Copied 1 '.patch' file: 0001-cmake-install-dll.patch
zstd/1.5.0: The stored package has not changed
zstd/1.5.0: Using the exported files summary hash as the recipe revision: 798e1a11cf63a9f4ce1a389b64d72de4
zstd/1.5.0: Exported revision: 798e1a11cf63a9f4ce1a389b64d72de4
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
Installing package: zstd/1.5.0
Requirements
zstd/1.5.0 from '...' - Cache
Packages
zstd/1.5.0:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache
Installing (downloading, building) binaries...
zstd/1.5.0: Already installed!
conan upload zstd/1.5.0@ -r ... --all
Uploading to remote '...':
Uploading zstd/1.5.0 to remote '...'
Compressing conan_export.tgz completed [1 files]
Compressing conan_sources.tgz completed [2 files]
Recipe is up to date, upload skipped
Uploading package 1/1: dfbe50feef7f3c6223a476cd5aeadb687084a646 to '...'
Uploaded conanmanifest.txt -> zstd/1.5.0:dfbe [0.31k]
ERROR: 409 Client Error: Conflict for url: https://....jfrog.io/artifactory/api/conan/.../v2/conans/zstd/1.5.0/_/_/revisions/798e1a11cf63a9f4ce1a389b64d72de4/packages/dfbe50feef7f3c6223a476cd5aeadb687084a646/revisions/71464c91c8fbe9533d27297fc7b82ef1/files/conanmanifest.txt
Waiting 5 seconds to retry...
Uploaded conanmanifest.txt -> zstd/1.5.0:dfbe [0.31k]
ERROR:
Error uploading file: conanmanifest.txt, '409 Client Error: Conflict for url: https://....jfrog.io/artifactory/api/conan/.../v2/conans/zstd/1.5.0/_/_/revisions/798e1a11cf63a9f4ce1a389b64d72de4/packages/dfbe50feef7f3c6223a476cd5aeadb687084a646/revisions/71464c91c8fbe9533d27297fc7b82ef1/files/conanmanifest.txt'
ERROR: zstd/1.5.0:dfbe50feef7f3c6223a476cd5aeadb687084a646: Upload package to '...' failed: Execute upload again to retry upload the failed files: conanmanifest.txt. [Remote: ...]
ERROR: Errors uploading some packages