Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(How to) Solve asymmetry in conan upload/search using pattern without user/channel #13170

Closed
fg68 opened this issue Feb 20, 2023 · 1 comment · Fixed by #13173
Closed

(How to) Solve asymmetry in conan upload/search using pattern without user/channel #13170

fg68 opened this issue Feb 20, 2023 · 1 comment · Fixed by #13173
Assignees
Milestone

Comments

@fg68
Copy link

fg68 commented Feb 20, 2023

Using conan 1.53 on various OS:

We are utilizing a CI script to upload multiple packages belonging to a pattern which works fine for a given non-empty user/channel:

conanPattern="$packageName/*@$conanUser/$conanChannel"
conan upload -r "$remoteName" "$conanPattern" --all -c

This works fine for a user/channel like ci/testing or demo/testing.

But when trying to use this pattern for an empty user and channel (which usually defaults to _/_) this does not work. It gives a python error:

  File "....\lib\site-packages\conans\model\ref.py", line 82, in check_valid_ref
    if "*" in ref.name or "*" in ref.user or "*" in ref.channel:
TypeError: argument of type 'NoneType' is not iterable

The same is valid for conan search command:
conan search "pkgname/*@demo/testing" works without errors even if there is no package found.
conan search "pkgname/*@_/_" as well as conan search "pkgname/*@" will always issue the error given above.

How can I workaround this?

Other options I already tested:

I can try to upload pkgname/* but I do not want to include packages built with a given non-empty user/channel in that case.
It seems that I must provide the FULL pkgversion (developer version+number of commits+git hash in our case) for which I would have to check directories in the conan cache.

It does not help to specify the pkgversion only partly as * seems to work 'greedy':

conan search "pkgname/2.1.0-*"
Existing package recipes:

pkgname/2.1.0-62-g5ee391369e
pkgname/2.1.0-64-g1a8f86a3ef@user/channel

yields both versions but

conan search "pkgname/2.1.0-*@"
Existing package recipes:

pkgname/2.1.0-64-g1a8f86a3ef@user/channel

yields only packages with non-empty user/channel.

This behaviour is somehow apart from expectations with working command like

conan search "pkgname/2.1.0-62-g5ee391369e@"
Existing packages for recipe pkgname/2.1.0-62-g5ee391369e:

    Package_ID: 96e58ae8bd03427b10ed3e062442d97ec8e208d4
        [options]
        ...

The -q command requires the full pkg reference as well.

@memsharded
Copy link
Member

Fixed in #13173, for next Conan 1.60, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants