I have some troubles with CI in the past and today, see:
- Jan.2022 Python package: Upgrade/Restore failes on CI
- Nov.2021 My “integration Level” falls from 7 to 0 ?!?
But here in this Thread i what to discuss on a higher level independent of my specific package problems.
Why? Because the quality of YunoHost packages is very important for the users and so for the complete project. I often hear from people who try YunoHost that they are disappointed because the installed packages do not work.
I as an package maintainer see several problems with the current CI infrastructure for YunoHost packages:
- In transparent: The maintainer don’t see much of the CI activity in the GitHub projects. So the maintainer doesn’t get information about CI status on a direct way.
- No special security when the status changes drastically: e.g.: level falls from 7 to 0 → After some time, the new level is transferred to the apps catalog → User gets a broken app.
- Currently, everything about CI is just too slow: It takes too long until a CI run is triggered and executed. This is not really continuous integration.
- The tests do not go deep enough: Check if root page returns status 200 doesn’t mean that everything works.
- Setup/usage of official CI Servers
Problem 1: Missing CI activity on GitHub
The official YunoHost CI server should add information about every run in every Pull Requests. Currently only merges to “master” are triggered. But then a Bug in “testing” or a PR can’t be captured.
It should be as simply as GitHub Action or like @tituspijean inofficial CI server is does. (But without the need to add a “!testme” comment in a PR)
Why?
Because the maintainer should faster and direct see if a PR is ok or not. Fast cycles speed up the work.
If everything takes too long, people may tend to commit untested code changes.
One solution for this: Run the package check as github actions (But it seems not easy)
Problem 2: What happens if package level falls?
This has already happened twice with my package. I think that it should be prevented to transfer a new level simply into the catalog after some time. Because the new Level may not reflect the quality of the package in every case. What happens if there is a Bug in CI setup? And a Bug in the YunoHost scripts should also not be simply accepted.
Yes we have the git branches “main” and “testing”… But because CI is so slow, it may happen that master gets a broken changes.
What can we do here? The app catalog can just use the older version with the higher level. So the end user can use the package on a normal way and get no update to a broken version.
Problem 3: CI is just too slow
I think the problem here is clear to everyone, right?
It just takes way too long for testing code changes and getting the new result from CI server.
Problem 4: The tests do not go deep enough
This probably requires a lot of work. But I think that would give the project much more stability.
It is simply not enough to test if an app is installable. We need to test if it really works. That is not easy, i known.
I think only with this kind of tests the project will achieve more stability.
Problem 5: Setup/usage of official CI Servers
I have had problems in the past to activate the CI checks and the documentation at Continuous integration | Yunohost Documentation is outdated and incomplete.
I sill didn’t understand the complete YunoHost CI setup When is a CI run actually triggered? This is also related to the lack of intransparency, see “problem 1” above.