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

Support for Conan package revisions #16467

Closed
segretil opened this issue Jul 7, 2022 · 6 comments · Fixed by #16871
Closed

Support for Conan package revisions #16467

segretil opened this issue Jul 7, 2022 · 6 comments · Fixed by #16871
Labels
datasource:conan Related to Conan datasource manager:conan Related to Conan package manager priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)

Comments

@segretil
Copy link
Contributor

segretil commented Jul 7, 2022

What would you like Renovate to be able to do?

I would like renovate to support Conan package revisions. Those are really useful in order to have robust reproducible builds. Indeed, if you do not specify the revision for a specific package, one version may address multiple binaries for a given profile.

For example, here is a conanfile.txt:

opus/1.3.1

this may refer to mutiple packages for the same profile as you can see here : https://conan.io/center/opus?version=1.3.1&revision=6d2446ed5a38e86a3bb304db3ffb3e01

That is why people start using more and more revisions, that way the conanfile.txt becomes:

opus/1.3.1@_/_#6d2446ed5a38e86a3bb304db3ffb3e01

and here only one package is referenced for one profile.

What I would like renovate to do, is to update the revision when a newer one is available.

For example when I am writing this, the revision 5132ab8db7b69dd8e26466e0b3b017dd is newer so I would expect renovate to submit this patch:

- opus/1.3.1@_/_#6d2446ed5a38e86a3bb304db3ffb3e01
+ opus/1.3.1@_/_#5132ab8db7b69dd8e26466e0b3b017dd

If you have any ideas on how this should be implemented, please tell us here.

The revisions can be obtained with the conan search command.

For example, if I want to know all the revisions for opus/1.3.1@_/_ on conancenter, I can do conan search --revision opus/1.3.1@_/_ -r=conancenter which gives me this:

5132ab8db7b69dd8e26466e0b3b017dd (2022-02-21 18:54:44 UTC)
6d2446ed5a38e86a3bb304db3ffb3e01 (2022-01-21 23:52:01 UTC)
b9d6ff0c341915b1f9c837a67f5a012c (2021-07-23 13:20:46 UTC)
bb9e103e40877d9a8123672d4fd7ae8d (2020-08-21 09:50:08 UTC)
921d3218d0eaa17590f4d5b3ebf8d1fd (2020-02-05 13:19:37 UTC)
ee0c56e9cf39afbff1fc1412eabf46cb (2020-01-14 17:11:04 UTC)

Here are the logs (https://docs.conan.io/en/1.46/mastering/logging.html) of this call:

{"_action": "COMMAND", "name": "get_recipe_revisions", "parameters": {"remote_name": "conancenter"}, "time": 1657188854.9036446}
{"_action": "COMMAND", "name": "get_remote_by_name", "parameters": {}, "time": 1657188854.9106457}
{"_action": "REST_API_CALL", "duration": 0.4250774383544922, "headers": {"User-Agent": "Conan/1.43.4 (Windows 10; Python 3.6.8; AMD64)", "X-Client-Anonymous-Id": "**********", "X-Client-Id": ""}, "method": "GET", "time": 1657188855.3433216, "url": "https://center.conan.io/v1/ping"}
{"_action": "REST_API_CALL", "duration": 0.11092805862426758, "headers": {"User-Agent": "Conan/1.43.4 (Windows 10; Python 3.6.8; AMD64)", "X-Client-Anonymous-Id": "**********", "X-Client-Id": ""}, "method": "GET", "time": 1657188855.4582539, "url": "https://center.conan.io/v2/conans/opus/1.3.1/_/_/revisions"}

So maybe the route <url>/v2/conans/<package_name>/<version>/<user>/<channel>/revisions can be used to achieve that if I am not mistaken.

Thank you for your time :)

Is this a feature you are interested in implementing yourself?

Maybe

EDIT: Minimal reproduction: https://github.com/segretil/renovate-conan-revisions

@segretil segretil added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality) labels Jul 7, 2022
@HonkingGoose HonkingGoose added new versioning New versioning support manager:conan Related to Conan package manager labels Jul 7, 2022
@viceice
Copy link
Member

viceice commented Jul 7, 2022

i think this can be handled as digest update, like we do for docker images digests

@viceice viceice added datasource:conan Related to Conan datasource and removed new versioning New versioning support labels Jul 7, 2022
@rarkins rarkins added the auto:reproduction A minimal reproduction is necessary to proceed label Jul 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2022

Hi there,

Get your issue fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible.

Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this.

To get started, please read our guide on creating a minimal reproduction.

We may close the issue if you, or someone else, haven't created a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment.

Good luck,

The Renovate team

@segretil
Copy link
Contributor Author

segretil commented Jul 8, 2022

Hey ,

Here is the minimal reproduction repo: https://github.com/segretil/renovate-conan-revisions

Tell me if you need anything else, I can add a CI to it if you want.

Thank you

@rarkins
Copy link
Collaborator

rarkins commented Jul 9, 2022

Reproduction forked to https://github.com/renovate-reproductions/16467

@rarkins rarkins added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others reproduction:provided and removed priority-5-triage auto:reproduction A minimal reproduction is necessary to proceed labels Jul 9, 2022
@rarkins
Copy link
Collaborator

rarkins commented Jul 9, 2022

Next step is to confirm if we can get the revision from the existing API calls we make

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 32.155.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 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 manager:conan Related to Conan package manager priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants