294 Commits

Author SHA1 Message Date
Christoph Reiter
b40229daa6 Drop BUILD_TYPES_WIP
This wasn't complete as it would only ignore broken builds
for direct deps and not indirect ones, but kinda worked in ignoring
some arm64 errors.

But it also causes problems if an error is ignored and the other arches
get uploaded. Then it's hard to roll back the update because lots of
packages with the new version are already in the repo.

With the new autobuild controller we can also restart flaky builds instead
of ignoring them and waiting for jeremy to fix them later.

Let's try removing that special case.
2022-09-20 08:02:56 +02:00
Christoph Reiter
f581199930 try running the real pacman with exec
it seems like the pacman wrapper doesn't survive a runtime update.
try exec to avoid returning control to bash
2022-09-06 21:11:16 +02:00
Christoph Reiter
e23492ee15 also retry on 502
We just got "502 {"message": "Server Error"}" on a DELETE
2022-09-02 21:53:46 +02:00
Christoph Reiter
9f4f288d00 retry HTTP requests which return 500
We are getting "500 null" randomly recently, mabye this helps.
2022-08-27 13:51:32 +02:00
Christoph Reiter
b36a4da1da Use a temporary pacman.conf during building
Up until now we created a backup of pacman.conf and restored it after
the build was done. This can leave the environment in an undefined state
if something crashes inbetween.

Instead create a temporary pacman.conf and use that during building.
In theory pacman allows setting a custom config via "--config", but
makepkg doesn't expose this, so that's not working. Luckily makepkg
allows overriding the pacman path via the PACMAN env var, so we create
a temporary script which just forwards everything to pacman and always
sets the temporary config.
2022-08-26 15:09:05 +02:00
Christoph Reiter
45c6b89ec7 Update the build status before stopping due to timeout
In case the job stops because it has reached the time limit it would
not update the build status and just quit. Move the timeout check
a bit later to acoid that.
2022-08-08 18:50:27 +02:00
Christoph Reiter
a43bdf9479 Add a comment as to why we split up repo-add calls
This was pointed out here: 7d84a7e086 (r75916830)
2022-06-30 21:07:00 +02:00
Christoph Reiter
7d84a7e086 Limit the amount of packages added with repo-add in one go
It errors out if there are too many (maybe memory?)
2022-06-12 18:28:48 +02:00
Christoph Reiter
ea46306e71 Add config key for limiting the max job count
We are hitting the API limit again, so reduce from 15 to 12.
This also allows self hosted runners to limit to 1 if needed.
2022-06-11 18:32:11 +02:00
Christoph Reiter
97faefb5b3 Update deps
requests-cache now provides an option to always revalidated, so use that.
Before it mostly worked by accident.
2022-05-29 10:29:38 +02:00
Christoph Reiter
745e5e2c40 Fetch pgp keys before upgrading packages
To avoid any ABI bump breaking pgp
2022-05-08 20:08:43 +02:00
Christoph Reiter
4a5355f5dc Another try at fixing the cache race
Turns out disabling the cache just disables the monkey patching,
so we have to disable when creating the session object and not when
we are using the cache.

Create a session object without cache in the main thread at first,
so that the download code can re-use it as is later on.
2022-04-30 22:19:15 +02:00
Christoph Reiter
88b49f2c6a Avoid disabling the cache in a thread pool
It isn't thread safe, so wrap the outer code instead and just
assert in download_asset() that the caching is disabled so it's
not called with caching by accident.
2022-04-30 22:07:40 +02:00
Christoph Reiter
8870b3a342 Use requests-cache for adding etag/last-modified based caching
This doesn't speed things up usually, since we still make the same amount
of requests, but it doesn't count against the rate-limit in case there
is a cache hit. Also there is a smaller chance of things going wrong,
since we don't transfer any payload.

The cache is store in a .autobuild_cache directory using a sqlite DB.
2022-04-30 17:15:18 +02:00
Christoph Reiter
258256e739 use lru_cache for Python 3.8 compat 2022-04-30 16:23:49 +02:00
Christoph Reiter
133ce88284 Cache the main github api instances
this leads to a shared session, and a bit fewer requests
2022-04-30 16:16:54 +02:00
Christoph Reiter
099438dc3f queue_website_update: just log errors instead of failing
this is optional really
2022-04-30 12:32:10 +02:00
Christoph Reiter
94d87dac25 Retry non-pygithub HTTP requests as well
There isn't an easier way to enabled retries with requests sadly.
This also shares the session between all non-pygithub requests, so
could make things a bit faster.
2022-04-30 12:27:43 +02:00
Jeremy Drake
4384e62d01 Use labels to restrict self-hosted runner selection. 2022-04-19 07:46:26 +02:00
jeremyd2019
892e1a3206 break clang/libc++ cycle
before libc++ was split off from clang package, it was built after clang within the same PKGBUILD, so this order seems reasonably safe.

Also remove a couple of prior cycle breaks from before it was possible to break them manually in a run.  These packages are not related by the same source repo and release, like mingw-w64 and llvm-project are, so are less likely to consistently require a cycle break on every upstream update.
2022-04-05 09:39:39 +02:00
Christoph Reiter
cfe519fbb0 clear-failed: Allow clearing the failed state for packages via a workflow input 2022-04-01 20:05:38 +02:00
Christoph Reiter
1b14e2ed4d cycles: skip cycles where one of the packages is already built 2022-04-01 18:36:32 +02:00
Christoph Reiter
8c060f3142 cycles: show the version change of all packages 2022-04-01 15:44:45 +02:00
jeremyd2019
c2f77181d7 work around powershell arg parsing fail
It appears that powershell doesn't properly handle an empty argument, resulting in all the subsequent arguments being shifted left by one.

So, don't specify --optional-deps argument if it is empty.
2022-03-30 23:56:20 +02:00
Christoph Reiter
cd67c3a66a show: also set optional deps 2022-03-30 17:29:59 +02:00
Christoph Reiter
5e037680d6 also add optional deps when checking if we should run 2022-03-30 17:17:04 +02:00
Christoph Reiter
777bbb73af Try to make it possible to pass optional dependencies to the workflow
The idea is that in case of a cycle we explicitely break it on a case
by case basis.
2022-03-30 17:00:20 +02:00
Christoph Reiter
c1807c19a7 show the cycles also when writing the build plan
Otherwise we don't see it in CI, since the rest is skipped if there
is nothing to build.
2022-03-30 10:08:04 +02:00
Christoph Reiter
20ba53752d show: default to not fetch the build log URLs
Instead add a --details option.

It's quite slow and rarely needed, so default to off.
2022-03-30 10:00:18 +02:00
Christoph Reiter
81dd6cabad show: include a list of dependency cycles
This gives all cycles in the queue right now, ignoring the build
status of the packages.

If one part of the cycle is already built then it will not matter.
2022-03-30 09:57:02 +02:00
Christoph Reiter
5c6f39a511 break cycle 2022-03-29 20:26:19 +02:00
Christoph Reiter
0cf933cc9b CI: run every 3 hours instead of 4
it just takes 20 secs if there is nothing to do
2022-03-18 16:36:49 +01:00
Christoph Reiter
548cd95a30 break librsvg/gtk3 cycle 2022-03-18 09:05:46 +01:00
Christoph Reiter
a8d63e2852 Some cleanup; don't break cycles if the dep isn't in the repo
When bootstrapping a cycle we can't fall back to the repo, so
someone has to upload the package manually and we shouldn't try
to build it before that.
2022-03-12 08:53:05 +01:00
Christoph Reiter
1e254ee060 Another optional dep 2022-03-11 15:50:06 +01:00
Christoph Reiter
154402b355 Wrong package name
oops
2022-03-11 15:30:15 +01:00
Christoph Reiter
0ed108506a Add a list of optional dependencies
Since we no longer break cycles in msys2-web we have to do it here.
This adds a list of optional deps for some packages. If they are there
they will be used, if not they will be ignored.

By hardcoding it we should get more a more deterministic result, but
not sure if this scales well.
2022-03-11 15:20:47 +01:00
Christoph Reiter
7e96898a06 Stop setting GIT_COMMITTER_NAME/EMAIL
We no longer use "git am" in PKGBUILD files
2022-03-05 13:15:22 +01:00
Jeremy Drake
451dca0a27 run upgrade/downgrade twice for updated assets
If one or more of the assets are in the 'core' set (such as bash,
recently), only the 'core' packages will be upgraded/downgraded in the
first run.
2022-02-20 09:01:16 +01:00
Christoph Reiter
8b9b746cfa Revert "Revert setting GIT_COMITTER_NAME/EMAIL. It doesn't do anything."
This reverts commit 9b01428dde1d2476f177c2437bdd60063ec8147c.
2022-01-25 21:09:36 +01:00
Christoph Reiter
9b01428dde Revert setting GIT_COMITTER_NAME/EMAIL. It doesn't do anything.
Since https://github.com/msys2/MSYS2-packages/commit/97491f06184abf6
makepkg sets them, so this wasn't really doing anything.
2022-01-25 20:17:16 +01:00
Christoph Reiter
6c461095e0 CI: don't install git by default
We only needed it to configure the commiter name/email which is now
done via env vars.

If a package still needs git we pull it in via makedepends.
2022-01-14 16:15:42 +01:00
Christoph Reiter
3a63bf21e1 Set GIT_COMMITTER_NAME/EMAIL when calling makepkg
Instead of setting it with "git config" early on. This way we don't
have to change some global files/state while still getting the same result.
2022-01-14 16:13:45 +01:00
Christoph Reiter
e93758b39c Set PACKAGER in autobuild directly
Instead of depending on the caller to set it.
2022-01-14 16:09:51 +01:00
Christoph Reiter
7c422261fc Use the same build environment for all makepkg calls
Just the default environ for now
2022-01-14 16:09:23 +01:00
Christoph Reiter
58fac3caaf Don't import environ directly
Use the same style everywhere, to also avoid shadowing locals
2022-01-14 15:53:03 +01:00
Christoph Reiter
6a436ac4e9 No longer install the toolchain groups
They are no longer required. See
https://github.com/msys2/MINGW-packages/discussions/10506
2022-01-13 17:44:52 +01:00
Christoph Reiter
698f9f514f Only start jobs for build types where we own the asset release 2022-01-13 09:36:45 +01:00
Christoph Reiter
f765fe5ea7
Drop clangarm64 from the manual build list 2022-01-12 22:38:17 +01:00
Christoph Reiter
f49b8afb91 Fetch certain build types also from other repos
Allow mapping build types to external repos and make some
read-only operations work with it.

This mainly means downloading assets will now also download clangarm64
and the clangarm64 build status will be included on packages.msys2.org.
2021-12-26 15:19:19 +01:00