-
Notifications
You must be signed in to change notification settings - Fork 980
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
[question] Conan 2.7.0 is trying to ping /v1/ping endpoint that doesn't exist in Artifactory #17001
Comments
Thanks for your report. Artifactory didn't remove the I think the issue is that you added the remote URL instead of the repo URL
But the |
@memsharded , thanks for your reply! Sorry for the misunderstanding. I hadn't understood that the version was for the API, not the Conan version. I followed the "set me up" as you suggested (although the suggested login command does not seem to be correct for Conan 2 in the version of Artifactory we have (7.55.18), as the remote name is specified with a Following this, there is a different issue when installing whereby it doesn't seem to be able to find the packages it's looking for. Running def get_json(self, url, data=None, headers=None):
req_headers = self.custom_headers.copy()
req_headers.update(headers or {})
if data: # POST request
req_headers.update({'Content-type': 'application/json',
'Accept': 'application/json'})
# logger.debug("REST: post: %s" % url)
response = self.requester.post(url, auth=self.auth, headers=req_headers,
verify=self.verify_ssl,
stream=True,
data=json.dumps(data))
else:
# logger.debug("REST: get: %s" % url)
response = self.requester.get(url, auth=self.auth, headers=req_headers,
verify=self.verify_ssl,
stream=True)
print(f"{url} returns {response}") ### Added this debug output
if response.status_code != 200: # Error message is text
response.charset = "utf-8" # To be able to access ret.text (ret.content are bytes)
raise get_exception_from_error(response.status_code)(response_to_str(response)) ######## Raised here From the added debug output, I can see that it does:
Looking at the repo in Artifactory, I can see that {
"reference" : "spdlog/1.14.1@_/_",
"revisions" : [ {
"revision" : "972bbf70be1da4bc57ea589af0efde03",
"time" : "2024-05-02T00:42:23.140+0000"
} ]
} Since this is a virtual repo, I also checked its default deploy repo and can see the package at but I don't know if this is correct/significant :( |
Also, I think this is turning into more of an Artifactory user error issue than a Conan 2 issue... :| |
Yes, probably. What happens if you add directly with |
Any update here? Does it work using the local repo directly? It is possible that the above is also normal behavior, the recipe exists, but it doesn't contain a valid pre-compiled binary for the current configuration (404), in general it is better to refer to the Conan command and the Conan output than to the http protocol to report issues. |
Did you manage to make it work? Any further question? Thanks for your feedback. |
Sorry for the slow reply! I'm afraid I was not able to get it to work. Strangely, I was able to push to the local repo (via the virtual repo, actually). However, I was never able to successfully pull from either the virtual repo, or the local one directly. Due to the requirement to actually do the thing I was trying to do in a timely manner I had to work around the issue, so I haven't been able to investigate further. |
Ok, it would be nice to have more information to try to help better. What I would do if I had to investigate this:
|
I'm sorry I can't put more time into investigating. Unfortunately, I do not own the infrastructure, so investigation time is dependent on not just me but a bunch of other people too. Such is life. A piece of information that I didn't add in the original report was that I hacked the code in the client to insert "v2" where I noted that there was a "v1" that I was suspicious of. When I did this, it did actually work (i.e. I was able to pull the packages as expected). I don't know why, given the information you previously provided, but there it is. If you want to close the issue, then go for it. If I'm able to investigate further at some later date, I'll update then. Thanks for your time! |
No problem, I know how this things are. This is why I usually triage these things running things locally if I have the time, because that really helps to know where the issue lies and can save lots of time in the process.
I don't know exactly what you changed, but if the
It doesn't work. If you changed the client code to I think this is what we can do so far, so I am closing the issue, you can always re-open or create a new one when you have more information (we are trying to change a bit the policy for open tickets to try to reduce the large number of obsolete or outdated tickets there are). Thanks very much for your feedback! |
What is your question?
Using:
OS: Centos Stream 8/9
Python: 3.8
Conan: 2.7.0
Artifactory: 7.55.18
I have created a Conan repository in Artifactory, using a "virtual" repo strategy. So, there is a "conan-local" repo that actually has packages in it and a "conan-remote" that is basically a mirror of conanceter and in front of these is another "virtual" repo that has the conan-local as the default deployment repo.
I can push packages to the repo and they duly appear in a structure like:
All the packages are in /v2/conans.
However, when I try to install from this repo using
conan install . --of some-build-dir
, then I get a message that says:Running with
-vvv
gives a call-stack and I can see that the error originates in:client/rest/rest_client_common.py
, when it's trying to get the server capabilities.The offending code looks like this:
That
self.router.ping()
function is returning/v1/ping
as the endpoint to hit, which doesn't seem to be an endpoint, hence the message. If I alter this code to just do aurl = url.replace("v1", "v2")
, then the whole thing hangs together.Looking at the code for that ping function, then I see this thing:
here: https://github.com/conan-io/conan/blob/release/2.7/conans/client/rest/client_routes.py#L29
which looks a bit sus to me.
What am I doing wrong??
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: