-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[service] Auto publish new packages #3337
Comments
I don't know if updating a version should be automatized. Usually, even for the simplest libraries, I try to check source code diff between previous and new version to see if there was modifications in the build system, dependencies added or removed etc. It could be useful for header-only lib without dependencies. |
One could do the same as the npm dependency bot, it only opens a MR, which can be changed or merged right in |
I agree with both comments, a human supervision is obviously still required to keep a good quality standard concerning recipe and packages. But the CCI maintainers already do this job. A bot could automatically open PRs when a new version is released on github, maybe it needs recipe modification, in which case, the PR must be modified, but maybe it does not and the CCI maintainers can just merge it. I think it's win-win in both cases:
I updated my script. It's a bit less dirty and for each targeted recipe, it creates a branch, adds the latest github version to it, commits the change and pushes it. |
Nice work @qchateau
I created conan-recipe-generator which is able to automatically generate a recipe using heuristics. It's far from perfect because it does not prioritize the build systems correctly or does not allow user intervention (using some cli/gui). |
Hi! We really love to hear about all these initiatives. Thanks! We can consider opening a section in the docs to list all these tools that can help recipe creators/maintainers. 😊 About the script facilitated by @qchateau. From the point of view of CCI, the strategy of polling for new releases can be very time consuming and, IMHO, it wouldn't be as satisfactory as it could be: a bot would open a PR, but no one (except the maintainers) would be able to push to the new branch and, being honest, there are too many things to have a look to and we try to avoid adding more burden. BUT, it would be amazing to have a Github Action that authors can add to their repositories, the action would create a new PR to |
I don't quite agree, let me explain:
It takes 25s of CPU time on my shitty laptop to get the status of all github-based recipes. And that is without even using apis.github.com (I use
This is more a workflow problem than a technical one, anyone can use the new branch in his own fork, fix it and open another PR. I agree it creates a lot of PRs, but the tool can target another workflow. As @madebr said, the tool could be split in 2, one half to get the status of recipes, and another half to update the recipes. It would then be easy to have a dashboard of "updateable" recipes, then anyone could use this tool to do an auto-update a recipe that's updateable (human or bot).
I don't agree with this, I mean it would not be a bad thing, but the strength of conan resides in the fact that the library author does not need to know of care about conan. And this is utterly important as conan is not standard. Then again, a bot cannot auto-update a complex library that release breaking changes. But many releases (patch-level) of many libraries can be auto-updated by a bot, and this is what my tool is about. What I mean is that there are step in the scale of automation, maybe we can help automate some tasks, without pushing it all the way to a fully automated system. If you dislike bots because you don't want to have auto-generated PRs (which I understand), then the tool can at least perform two useful tasks:
|
We can run and keep updated (daily) an issue like this one: #2232 with updatable recipes, but opening PRs can add too much noise to the repository. OTH the GH action would help a lot in turning Conan into the standard package manager |
I've updated my conan-center-bot and added a script called once a day by a github action that updates an issue similarly to #2232 For now it targets qchateau/conan-center-bot#1 |
@qchateau funny thing is that I had the same thought about having an utility like this today and I've just found out that you already created such a tool. For now, I have several questions / suggestions:
|
It's just about updating what needs to be. If CCI can't merge PR as the libraries it hosts are updated, this will become more and more of a problem as the amount of libraries grows. But that's a problem for the JFrog guys
True, it's probably not much work to add, though there always is the issue of finding the right recipe folder if the recipe does not use "all"
Does CCI even allow PRs containing multiple versions ? I think I had a PR rejected by the CI because I was updating multiple versions in a single PR
That's if we want to integrate the bot all the way to opening a PR. @jgsogo argued that it is not the direction they want to go, which I understand. I admit auto-detection "pending updates" in currently opened PR could be useful in the same way detecting upstream releases is, but it's probably much harder: it requires interfacing with Github (as opposed to git), and probably parsing all PR content to find the diffs to Not impossible, but not easy either.
Yes the heuristic is quite basic atm, but it's somewhat of a POC
Good point |
I think there are two different approaches here:
I really like the idea of opening PRs, if the checks are good enough these PRs will be labeled as |
Yes, it does, the most recent example: https://github.com/conan-io/conan-center-index/pull/3352/files |
I've added options to update a recipe with the version of your choice, improved the heuristic to reduce false positive and added links to the project homepage on the issue. I've created issues on https://github.com/qchateau/conan-center-bot for the rest |
Great, now the list is much more readable, thanks! |
I've added pending PR detection to the issue reporting the status of the recipes. I've also opened a mirror issue here #3470 |
The title is somewhat of a clickbait, but a ton a packages are hosted on GitHub, and many new releases don't require a brain to be released to CCI, it's just about modifying the right files and opening a PR.
A wrote this little script to help with some of these operations: https://github.com/qchateau/conan-center-bot
In the current state it's already useful for package developers to make the release process to CCI a little faster, but the idea behind this could go further. It would not be very hard to automatically create a branch, commit and open a PR.
Right now the main limitations to make this script fully automated are:
I wrote the script to work around these limitations (best effort), which means a human needs to read the diff before committing and opening a PR. For a project with a well written recipe and Github tags that make sense, the human has nothing to modify.
Just my 2 cents: with a little more constraints, a lot of recipes could receive automatic updates from GitHub. Not all recipe need to be compatible with automatic updates straight away, but if we could have multiple level of "recipe conformity", the highest one could provide that kind of features to the library devs.
The text was updated successfully, but these errors were encountered: