What are you trying to do?
Retry binary download if binary is available and github rate limit is exceeded.
Currently rate-limit on binary download directly proceeds to source compilation.
e.g. rate limit:
seq 20 | parallel --halt soon,fail=1 -j10 'echo "=== Attempt {} ==="; curl -i https://api.github.com/repos/asgrim/example-pie-extension/releases/tags/2.0.9'
HTTP/2 403
...
{"message":"API rate limit exceeded for 176.0.50.1. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}
GithubPackageReleaseAssets::getReleaseAssetsForPackage() currently only handles 404.
CurlDownloader.php can retry, but not for 403:
// fail 4xx and 5xx responses and capture the response
if ($statusCode >= 400 && $statusCode <= 599) {
$retryableStatusCode = in_array($statusCode, [423, 425, 500, 502, 503, 504, 507, 510], true)
// codeload.github.com intermittently returns 400 on reused connections, retry those specifically, see #12958
|| ($statusCode === 400 && parse_url($job['url'], PHP_URL_HOST) === 'codeload.github.com');
What platform, and PIE version are you using?
(add the output of pie show -v, and information about which OS you're using etc.)
🥧 PHP Installer for Extensions (PIE) 1.4.7, from The PHP Foundation
You are running PHP 8.5.9
Target PHP installation: 8.5.9 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.5)
Using pie.json: /home/tb/.config/pie/php8.5_5830ff28f955df5820d08bc53fb7f06b/pie.json
Using pie.json: /home/tb/.config/pie/php8.5_5830ff28f955df5820d08bc53fb7f06b/pie.json
Tip: to include extensions in this list that PIE does not manage, use the --all flag.
Loaded PIE extensions:
(none)
Steps to reproduce the issue
wait for github rate limit error, run pie install ...
What is actually happening
Describe what is actually happening.
binary download is skipped and source compilation is continued, source compilation may fail if the machine has no compiler
Complete logs/output
Complete error messages and/or logs, including stack traces (hint: use -v for verbose), but please redact sensitive information.
Anything else?
other information that might be helpful...
What are you trying to do?
Retry binary download if binary is available and github rate limit is exceeded.
Currently rate-limit on binary download directly proceeds to source compilation.
e.g. rate limit:
GithubPackageReleaseAssets::getReleaseAssetsForPackage() currently only handles 404.
CurlDownloader.php can retry, but not for 403:
What platform, and PIE version are you using?
(add the output of
pie show -v, and information about which OS you're using etc.)🥧 PHP Installer for Extensions (PIE) 1.4.7, from The PHP Foundation
You are running PHP 8.5.9
Target PHP installation: 8.5.9 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.5)
Using pie.json: /home/tb/.config/pie/php8.5_5830ff28f955df5820d08bc53fb7f06b/pie.json
Using pie.json: /home/tb/.config/pie/php8.5_5830ff28f955df5820d08bc53fb7f06b/pie.json
Tip: to include extensions in this list that PIE does not manage, use the --all flag.
Loaded PIE extensions:
(none)
Steps to reproduce the issue
wait for github rate limit error, run pie install ...
What is actually happening
Describe what is actually happening.
binary download is skipped and source compilation is continued, source compilation may fail if the machine has no compiler
Complete logs/output
Complete error messages and/or logs, including stack traces (hint: use
-vfor verbose), but please redact sensitive information.Anything else?
other information that might be helpful...