104 Commits

Author SHA1 Message Date
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
eb7c3e52a0 Require SystemInclude only where needed 2024-01-31 11:42:01 -08:00
Douglas Eichelberger
f99d39faf9 Vendor CompactBlank cop 2024-01-26 15:03:59 -08:00
Douglas Eichelberger
f6c7eb7124 Add hash/keys to extend/ 2024-01-19 13:36:17 -08:00
Issy Long
f682147598
Fix RuboCop Style/RedundantFreeze offenses 2024-01-18 22:20:01 +00:00
Issy Long
149b0e4f31
Fix new Style/MutableConstant RuboCop offenses for Ruby 3.1
- A follow-up to de592af20bbff5bcb548d2474f0722e59ff1129a, resetting the previous disabled comments too.
2023-12-16 11:57:06 +00:00
Bo Anderson
b42256d286
Deprecate, disable & delete code for Homebrew 4.2.0 2023-12-07 23:42:13 +00:00
Mike McQuaid
de4207f6d0
Audit invalid versions
We have a bunch of versions we've been meaning to adjust to not use
invalid GitHub Packages characters for a while. Let's audit for them
and plan for deprecating their use in future.
2023-09-05 16:43:36 -04:00
Mike McQuaid
1a91157590
Fix more missing Utils::Curl references.
e.g. https://github.com/Homebrew/brew/pull/15940#issuecomment-1706486816
2023-09-05 08:27:02 -04:00
Bo Anderson
599f7af505
github_packages: abort with an error if image index is >= 4MB 2023-07-28 00:43:57 +01:00
Bo Anderson
d5a780d5b3
github_packages: ensure only OCI format is uploaded 2023-07-22 19:45:18 +01:00
Carlo Cabrera
c03e4111e6
github_packages: call ln with force
`FileUtils.cp` overwrites its destination when the destination already
exists, while `FileUtils.ln` throws `EEXIST`. To restore the old
behaviour, let's set `force: true`.

This fixes recent CI failures in Homebrew/core.[^1]

[^1]: For example: https://github.com/Homebrew/homebrew-core/actions/runs/5313853638/jobs/9620314048#step:8:158
2023-06-19 23:57:16 +08:00
Carlo Cabrera
4c40d452df
github_packages: create hard link instead of copying
Some bottles are quite large, and the copies can make us run out of
space rather quickly. Let's try to avoid that by using hard links
instead of copies.
2023-06-17 01:59:23 +08:00
Carlo Cabrera
65be47848d
github_packages: adjust upload retries
We still regularly see upload failures here, so let's adjust this to see
if we can try to reduce these.
2023-05-30 11:55:08 +08:00
Carlo Cabrera
9744b69071
github_packages: use exponential backoff when retrying
The retry behaviour in `publish_commit_bottles.yml` [1] is often
successful after the second try, so it's likely that we're not waiting
long enough in between retries here.

Let's fix that by retrying with exponential backoff instead of adding a
fixed interval of five seconds after each failure.

[1] 3241035b2a/.github/workflows/publish-commit-bottles.yml (L431-L443)
2023-05-03 16:58:16 +08:00
Carlo Cabrera
31a152208b
github_packages: improve upload error handling
Erroring out in the middle of uploading multiple bottles results in a
state that is tedious to recover from.

Let's try to avoid these situations by performing checks for all the
bottles first before trying to upload any.
2023-05-03 16:40:42 +08:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Ruoyu Zhong
a196d33482
github_packages: fix bottle manifest schema violation
According to [^1] [^2], image manifest annotations need to be a
string-string map.

This should fix the errors seen in Homebrew/homebrew-core#128517,
Homebrew/homebrew-core#128558, et al.

[^1]: 2879913ce4/schema/image-manifest-schema.json (L35)
[^2]: 2879913ce4/schema/defs-descriptor.json (L22)
2023-04-17 23:17:20 +08:00
Colin Dean
2787eead89 Add bottle file size to GHP manifest annotations
This will reduce the number of requests necessary to ascertain the size
of formulas' bottle archives for analysis purposes.

Currently, getting the size of each bottle requires 1 request for the
formula.json and followed by N requests per formula-version, which
for most formulae is 7— more than 47k requests!

After this change, size retrieval can ascertain all bottle sizes for a
formula-version in a single request, at the cost of one additional
request per formula-version if that formula-version has not been
rebuilt since this change was introduced.

To start, size retrieval will incur an additional P requests where
P is the number of packages. Over the next few weeks and months,
the retrieval will go a lot faster as all new and updated packages will
require only one request.
2023-04-16 21:32:47 +00:00
Issy Long
1e64a658d4
Revert "Update GitHubPackages for new Tab implementation" 2023-03-15 23:12:37 +00:00
Douglas Eichelberger
ea65b7264a Update GitHubPackages for new Tab implementation 2023-03-15 09:49:45 -07:00
Dawid Dziurla
c4cf2d208e
github_packages: reduce skopeo retry times to 2 2023-03-09 09:42:43 +01:00
Dawid Dziurla
de98ad53cc
github_packages: additional retry of skopeo copy with backoff 2023-03-09 09:17:24 +01:00
Dawid Dziurla
244006f15a
github_packages: retry skopeo copy 5 times 2023-03-08 15:32:31 +01:00
Mike McQuaid
fe37be6c30
github_packages: improve schema debugging. 2023-02-10 09:05:10 +00:00
Rylan Polster
68bbe03d04
Remove remaining formula_api_path references 2023-01-06 02:46:21 -05:00
Mike McQuaid
c294dcc616
glibc related cleanup
Extracted from https://github.com/Homebrew/brew/pull/13577
2022-08-23 12:42:02 +01:00
Bo Anderson
ecc705803f
github_packages: add comment for image-spec pin 2022-05-16 16:15:17 +01:00
Bo Anderson
354e5b60a7
github_packages: pin image spec schema 2022-05-11 04:28:02 +01:00
Bo Anderson
ac9af0dbbc
github_packages: fix OOM with large bottles 2022-03-03 16:26:47 +00:00
XuehaiPan
9ef52080e3 utils: extract common word "for" in reason 2021-11-23 23:59:09 +08:00
XuehaiPan
c0826f1890 utils: add method ensure_executable! 2021-11-23 23:32:32 +08:00
XuehaiPan
d749173adc utils: mark reason as keyword argument in ensure_formula_installed! 2021-11-23 23:31:22 +08:00
XuehaiPan
3376479e95 utils: add method ensure_formula_installed! 2021-11-23 22:48:39 +08:00
fn ⌃ ⌥
93b8fa7838 pr-upload: deprecate --github-org= 2021-11-19 11:48:23 -08:00
Michka Popoff
1cc7ca33c0
update: migrate everyone from linuxbrew-core to homebrew-core
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-10-20 11:01:38 +01:00
Bo Anderson
861dea9ada
Bump various type strictnesses 2021-09-11 01:00:23 +01:00
Bo Anderson
02724df0d6
Move json_schemer install to Gemfile 2021-09-10 03:08:21 +01:00
yahavi
0335d8c0bc Fix code review comments + disable authorization on redirections 2021-07-26 19:07:23 +03:00
Bo Anderson
d78dc014d1
github_packages: add missing root mkpath 2021-05-04 16:21:23 +01:00
Bo Anderson
ae91ec2772
github_packages: handle "manifest unknown" 2021-04-12 18:58:28 +01:00
Bo Anderson
503f6dc049
github_packages: safer handling of skopeo inspect 2021-04-11 05:04:15 +01:00
Bo Anderson
57e4209e9c
github_packages: support --keep-old 2021-04-09 17:55:12 +01:00
Bo Anderson
342a697459
github_packages: fix bottle tag handling 2021-04-09 01:55:42 +01:00
Mike McQuaid
eb25bf3668
github_packages: fix "Uploaded to" organisation.
This is hardcoded to Homebrew but we've started uploading bottles to
the Linuxbrew org.
2021-04-08 11:48:46 +01:00
Mike McQuaid
4cbc34d31d
Merge pull request #11071 from MikeMcQuaid/linuxbrew-url-fix
Fix Linuxbrew URL handling
2021-04-08 11:12:39 +01:00
Mike McQuaid
598c230e12
Fix Linuxbrew URL handling
After this `HOMEBREW_BOTTLE_DOMAIN=https://ghcr.io/v2/linuxbrew/core`
will work as expected.

While we're here, do a bit of cleanup of constant usage; we don't want
some of these leaking outside the `GitHubPackages` class.

In doing so `docker://` will continue to work for `ghcr.io` but won't
work for arbitrary other Docker hosts; this isn't something we want to
support yet.
2021-04-08 10:54:28 +01:00
Mike McQuaid
0ff9bf6cb4
github_packages: fix source for Linuxbrew bottles.
Addresses https://github.com/Homebrew/brew/pull/11056#issuecomment-815261503
2021-04-08 10:22:30 +01:00