-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
github CI: enable use of port tests #20092
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
Conversation
|
I think in general this is a good idea, but it might use much more CPU, so I think other people need to agree, not just me. |
|
The conclusion back in the days was that this would take up too much CI time. As far as I'm concerned that hasn't changed so I don't think we should do this. In the end, people submitting a PR are supposed to have run tests locally as listed in the checklist before submitting a PR. (Admittedly, the same holds true for building the port). |
|
@reneeotten here a two points.
Thus, I really doubt that a lot of people runs test for python port, special if we have 5-7 of different sub ports. Regarding CPU time... well.. it affects only ports which has Plus we're talking of Github CI, and not build bot's time. I don't see why we can't merge it to test and if slow things down to revert it. For example we may plan to make an experiment for September. What do you think about that? |
|
These are not new arguments, and while I do understand them it doesn't change my opinion. People submitting a PR should build the port and run the test if available. Both of them should be done in trace-mode to catch possible issue you are pointing out. The fact that trace-mode is still not working on newer OSes is unfortunate, but not something I am able to fix in macports-base. If you feel strongly about it please start a discussion on the -devel mailinglist. |
|
I think maybe it would be a good idea to get enough hardware that we can afford to run the tests as part of the CI. But yes, it should be a -devel discussion. |
As far as I know CI utilizes Github actions which is provided by Github / Microsoft with some limits like 3 or 4 instances running at the same time per project. => I not sure which hardware you're referer here.
Ok, I'll draft email with my point in days. |
|
My point was we could get our own hardware, and then we might have fewer limitations. |
|
Many ports have test phases that can be completed quickly, but a few ports' test phases can take hours to run. What is your intended outcome if a CI run shows that the test suite fails? Do you expect port maintainers or other contributors to engage with the developers to fix a test suite failure before you would accept a PR? What if the test suite had already been producing that error before that PR? How would you know if that were the case? In my view, it's the developers' responsibility to run their test suites and fix any problems, not ours. |
|
@ryandesign I think that, given enough hardware, we'd want to know what test suites were passing and aren't passing in an update. Without enough hardware, that's of course not possible. However, if the tests pass, it really does make it much easier to know that an update, especially for a critical package (say openssl or something) is not going to cause trouble. |
|
I understand that not all ports currently have tests, but a lot of them does. My goal here is to enhance the quality of tests for the ports, which will allow me to proceed with a bot that runs Why? To automate the process of updating ports. We have a vast number of ports, and many of them can be updated quite easily. Enabling the execution of port tests on GitHub will ensure that such automatically generated PRs are of sufficient quality to be merged. What's the ultimate goal? To keep MacPorts dynamically updated. P.S. Almost the same text was sent to macports-dev@. |
I can kind of imagine with what you are going for here, and the thought had crossed my mind on occasion to create some tools to attempt to simplify my process for updating some MacPorts as well, but to quote Han Solo, "I've got a bad feeling about this." Over-automation is something which concerns me; I have seen such efforts "go wrong" in prod too many times, causing more problems than they professed to fix and really ruining this particular ops' day. I don't want to speak for @neverpanic with regards to @pmetzger's comment about "especially for a critical package (say openssl or something)" but as someone who is active as a co-maintainer for the adjacent libressl and libressl-devel MacPorts, easing the checksums and file size check replacements in the Portfile is about the least of what is required. In particular, LibreSSL also utilizes signify (https://man.openbsd.org/signify.1) for signing releases which I check as part of the due diligence in updating those MacPorts. To say nothing of various MacPorts which still aren't utilizing path:lib/libssl.dylib:openssl efficaciously (as a continued tangent, libssh2 and wget both seem to want to install openssl3 even if libressl or libressl-devel are installed and the upstream projects AFAIK, have been tested against LibreSSL. I have attempted, with limited success to improve some of these Portfiles locally but haven't submitted PRs to reflect such efforts yet as I still run into edge cases on occasion; unlike xar for example, where modifying that Portfile seemed to be a bit more seamless). I realize I am relatively junior as a MacPorts contributor and still scratching my head a lot of the time and running into issues which other contributors have thankfully been immensely helpful with me in their guidance. Nonetheless, I think I echo @ryandesign's concerns here that it should really be up to the maintainers to run the tests. I am still learning the nuances between CI and mpbb/build bots and have no idea how CI resources are allotted, yet @reneeotten citing previous concerns about taking up too much CI time, given that it's not uncommon for me to see CI tests queued after I submit a PR, doesn't seem like an unreasonable one unless something major has changed with GitHub's resource allocation to MacPorts to which I am unaware? I still haven't gotten a local mpbb environment set up yet (it is on my list of things todo and I made a preliminary failed attempt or two) but I imagine that might be a better place for improvements to go rather than GitHub's CI frameworK? Apologies if my "two cents" was a bit TL;DR but especially after I saw this hit the mailing list I felt a need to chime in, thanks! |
This isn't automatical update which simple bumps everything into master. An idea to introduce semi-automatical update of ports which opens PR which is tested on Github CI and can be merged (manually). For example Nix uses that for last couple of years: https://github.com/r-ryantm/nixpkgs-update |
|
Related: Trac ticket 42731: https://trac.macports.org/ticket/42731 |
|
this is clearly not going to be merged in its current state. If there a are changes with the next release of base one can start a start on the -devel list. If there is consensus there it can be progressed into a PR. |
Description
A lot of ports supports self testing. Here I add to GitHub CI a way to run tests by ports when it is supported.
Why? To increase quality of PRs :)
Depends on macports/mpbb#16
Type(s)
Tested on
Verification
Have you