Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Conan remove fails with -p filter on ProGet remote (works with dry-run)
-
There seems to be an issue with ProGet's Conan V2, where the
conan remove
command fails when using the-p
profile filter.example:
conan remove freetype/2.13.2:* -p os=Linux -r=ccdc-3rdparty-conan-2 --dry-run -c
gives:
Remove summary: ccdc-3rdparty-conan-2 freetype/2.13.2#012f2e384087877914dbac626c3978e2: Removed binaries: ['43faaf581cf6a121854a451651cf2ff235f19f7c', 'd87280ec3b4af24f27d50d5e0df28450bce31aea', 'e0458180222f4e39fcff2bfa680bfa6468ca7198']
Whereas the non dry-run:
conan remove freetype/2.13.2:* -p os=Linux -r=ccdc-3rdparty-conan-2 -c
gives us:
ERROR: expected revision after package id. [Remote: ccdc-3rdparty-conan-2]
We reached out to the Conan team, where they tested and confirmed it should be working fine from their end, see thread: https://github.com/conan-io/conan/issues/18553
Could you investigate and confirm if this is a known limitation or bug?
Thanks!
-
Hi @mmaharjan_0067,
I think we can call this a "known limitation" now that you've discovered it ;)
It's a bit tricky to set up a conan debug/testing environment, so to advance this further instead of putting off another few days.... do you mind trying to run the command with
--verbose
and share the output? How about without the-p
command?I'm just trying to see what URLs the
conan
client is trying to call, and make a guess for how we can address it.Thanks,
Steve
-
Hi @stevedennis,
Running
conan remove freetype/2.13.2:* -r=ccdc-3rdparty-conan-2 -c -vvv
we get:HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v1/ping HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/search HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/0b9eabda69d299e0c26d9c8317ddd1621897aa07/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/2bc290d37f8ba2643b676474fd64176f8b8de109/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/2c78a73f698fca3c09a1748a63533228464ad95e/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/330feb85e7c7f73d79b8dcd7d66b0dfcb300d055/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/43faaf581cf6a121854a451651cf2ff235f19f7c/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/56ab506ea707052770ee3fe2c74d207e03eb913b/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/5a368093f9a03ee939b6113024e4e050e0b8ab85/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/824d26f8edc07cf9d12c6e3a7bcc11c9ce0005e9/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/8465556e8df301d7ad4d45939533bd110dc4fc9f/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/871fc4926cbe6ce3b4b4042931c0b98e1ed1553c/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/8fab62d98251e0c58e525e58a5ddbc9d03762335/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/bab1ebe447bc8c2837e705948cb15e08d1d7c49f/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/c47e9d1a66bc77b47abc78dfebcae9d0b554d34b/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/d87280ec3b4af24f27d50d5e0df28450bce31aea/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/e0458180222f4e39fcff2bfa680bfa6468ca7198/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/users/check_credentials HttpRequest: delete: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/0b9eabda69d299e0c26d9c8317ddd1621897aa07/revisions/5af71bb11e7691ed2a1d95bf2156b5f8
With the
-p
ie.conan remove freetype/2.13.2:* -p os=Linux -r=ccdc-3rdparty-conan-2 -c -vvv
we get:HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v1/ping HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/search HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/43faaf581cf6a121854a451651cf2ff235f19f7c/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/d87280ec3b4af24f27d50d5e0df28450bce31aea/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/e0458180222f4e39fcff2bfa680bfa6468ca7198/revisions HttpRequest: get: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/users/check_credentials HttpRequest: delete: https://proget.ccdc.cam.ac.uk/conan/ccdc-3rdparty-conan/v2/conans/freetype/2.13.2/_/_/revisions/012f2e384087877914dbac626c3978e2/packages/43faaf581cf6a121854a451651cf2ff235f19f7c/revisions/b698aa74ca56cfc1edeca40d1939a310
In both cases we get the same error:
Traceback (most recent call last): File "/mnt/f/conan2/venv/lib/python3.10/site-packages/conan/cli/cli.py", line 193, in run command.run(self._conan_api, args[0][1:]) File "/mnt/f/conan2/venv/lib/python3.10/site-packages/conan/cli/command.py", line 179, in run info = self._method(conan_api, parser, *args) File "/mnt/f/conan2/venv/lib/python3.10/site-packages/conan/cli/commands/remove.py", line 119, in remove conan_api.remove.package(pref, remote=remote) File "/mnt/f/conan2/venv/lib/python3.10/site-packages/conan/api/subapi/remove.py", line 50, in package app.remote_manager.remove_packages([pref], remote) File "/mnt/f/conan2/venv/lib/python3.10/site-packages/conan/internal/rest/remote_manager.py", line 210, in remove_packages return self._call_remote(remote, "remove_packages", prefs) File "/mnt/f/conan2/venv/lib/python3.10/site-packages/conan/internal/rest/remote_manager.py", line 269, in _call_remote return self._auth_manager.call_rest_api_method(remote, method, *args, **kwargs) File "/mnt/f/conan2/venv/lib/python3.10/site-packages/conan/internal/rest/auth_manager.py", line 60, in call_rest_api_method ret = getattr(rest_client, method_name)(*args, **kwargs) File "/mnt/f/conan2/venv/lib/python3.10/site-packages/conan/internal/rest/rest_client.py", line 81, in remove_packages return self._get_api().remove_packages(prefs) File "/mnt/f/conan2/venv/lib/python3.10/site-packages/conan/internal/rest/rest_client_v2.py", line 385, in remove_packages raise get_exception_from_error(response.status_code)(response.text) conan.internal.errors.RequestErrorException: expected revision after package id. [Remote: ccdc-3rdparty-conan-2]
-
@mmaharjan_0067 thanks for sharing that
I misunderstood the
remove
command -- I didn't realize that was deleting from the feed, and just assumed it was removing from the local project or something.I don't see any code for
DELETE
in the feed, so we would have to add that. No idea how easy that is going to be, but we'll try doing it at same time with the UI improvements. You can track via PG-3035.Thanks,
steve
-
By default the command operate in the local cache, but with the -r=remote argument it removes artifacts from the server.
Ref: https://docs.conan.io/2/reference/commands/remove.html