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

Conan datasource fails to look up deps from conan-center-index #15641

Closed
rbrich opened this issue May 18, 2022 · 1 comment · Fixed by #15644
Closed

Conan datasource fails to look up deps from conan-center-index #15641

rbrich opened this issue May 18, 2022 · 1 comment · Fixed by #15644
Assignees
Labels
datasource:conan Related to Conan datasource priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:bug Bug fix of existing functionality

Comments

@rbrich
Copy link

rbrich commented May 18, 2022

How are you running Renovate?

Self-hosted

If you're self-hosting Renovate, tell us what version of Renovate you run.

32.63.1

Please select which platform you are using if self-hosting.

github.com

If you're self-hosting Renovate, tell us what version of the platform you run.

No response

Was this something which used to work for you, and then stopped?

I never saw this working

Describe the bug

The queries to Conan Center via Github API fail to obtain any versions (Failed to look up dependency fmt etc.)

In the attached trace fragment, you can see there are two conflicting Accept headers. Depending on which one is sent first, either raw or json content is returned. If it's json, then parsing fails (without any error message) and no versions are found.

This patch fixes it:

--- modules/datasource/conan/index.js.orig	2022-05-18 22:14:24.000000000 +0200
+++ modules/datasource/conan/index.js	2022-05-18 22:24:03.000000000 +0200
@@ -25,7 +25,7 @@
         }
         const url = `https://api.github.com/repos/conan-io/conan-center-index/contents/recipes/${depName}/config.yml`;
         const res = await this.githubHttp.get(url, {
-            headers: { Accept: 'application/vnd.github.v3.raw' },
+            headers: { accept: 'application/vnd.github.v3.raw' },
         });
         const doc = (0, js_yaml_1.load)(res.body, {
             json: true,

Also reproduced with WhiteSource hosted app here: rbrich/xcikit#66

Relevant debug logs

Logs
TRACE: got request (repository=rbrich/xcikit)
       "url": "https://api.github.com/repos/conan-io/conan-center-index/contents/recipes/fmt/config.yml",
       "options": {
         "method": "get",
         "context": {"hostType": "conan"},
         "hostType": "conan",
         "baseUrl": "https://api.github.com/",
         "headers": {
           "Accept": "application/vnd.github.v3.raw",
           "accept": "application/vnd.github.v3+json",
           "user-agent": "RenovateBot/32.63.1 (https://github.com/renovatebot/renovate)"
         },
         "throwHttpErrors": true,
         "hooks": {"beforeRedirect": ["[function]"]},
         "timeout": 60000
       }

Have you created a minimal reproduction repository?

No reproduction, but I have linked to a public repo where it occurs

@rbrich rbrich added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality labels May 18, 2022
rarkins added a commit that referenced this issue May 19, 2022
@rarkins rarkins self-assigned this May 19, 2022
@rarkins rarkins added datasource:conan Related to Conan datasource priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation and removed priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started labels May 19, 2022
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 32.64.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
datasource:conan Related to Conan datasource priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants