Skip to content

Flaky API tests: Install PHP 8.4 fails too often #12207

Closed

Description

@mmattel

From time to time, but way too often, installing PHP 8.4 exits with an error and tests fail because of this:
HTTP Error 504: Gateway Time-out

There should be a kind of recovery mechanism to retry a second time after some delay or using a cache before finally failing.
The error could also be handled better such as using try/catch reducing the output for "known errors" (504) and a full printout as we do now for unknown catches.

Note, maybe we are hitting a kind of rate limit to download resources and get rejected therefore.
PHP 8.4 is used in MANY of the API tests...?

Run sudo add-apt-repository -y ppa:ondrej/php
  sudo add-apt-repository -y ppa:ondrej/php
  sudo apt-get update -qq
  sudo apt-get install -y php8.4 php8.4-curl php8.4-xml php8.4-mbstring php8.4-zip php8.4-ldap php8.4-gd
  sudo update-alternatives --set php /usr/bin/php8.4
  curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  shell: /usr/bin/bash -e {0}
  env:
    GOTOOLCHAIN: local
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 452, in <module>
    sys.exit(0 if addaptrepo.main() else 1)
                  ^^^^^^^^^^^^^^^^^
  File "/usr/bin/add-apt-repository", line 435, in main
    shortcut = handler(source, **shortcut_params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler
    return handler(shortcut, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 89, in __init__
    if self.lpppa.publish_debug_symbols:
       ^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 133, in lpppa
    self._lpppa = self.lpteam.getPPAByName(name=self.ppaname)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 642, in __call__
    response, content = self.root._browser._request(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 484, in _request
    raise error
lazr.restfulclient.errors.ServerError: HTTP Error 504: Gateway Time-out
Response headers:
---
-content-encoding: gzip
cache-control: no-cache
content-length: 92
content-type: text/html
date: Sat, 11 Apr 2026 07:08:52 GMT
server: Apache/2.4.41 (Ubuntu)
status: 504
vary: Accept-Encoding
---
Response body:
---
b"<html><body><h1>504 Gateway Time-out</h1>\nThe server didn't respond in time.\n</body></html>\n"
---

Error: Process completed with exit code 1.

@nirajacharya2 @mklos-kw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions