With the default non-colored job status, all the listed non-colored job
statuses can be absorbed by the default behavior.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38919>
When GitLab adds new job statuses, we need to upgrade the coloring dictionary.
By having a default value for non-colored output, we handle future unknown
status, and avoid crashes.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38919>
Update python-gitlab from 4.x to 5.x to fix AttributeError with
__annotations__ when running on Python 3.14. The 4.x series is
incompatible with Python 3.14 due to changes in how class annotations
are handled.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38123>
Remove the finally block with a return statement in GitlabGQL.query()
method. This pattern causes a SyntaxWarning in Python 3.14 as the return
in finally will override any return value or exception from the try/except
blocks.
Move the return statement to the end of the except block where it belongs,
maintaining the same error recovery behavior while fixing the warning.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38123>
This script didn't have tests defined. Now, the objects on this tool have
tests to verify its functionality, as well as the core method called to do
all the processes to provide a sorted list of the marge queue.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37395>
As proposed in !37454, we can benefit from `rich` python module to simplify
output formatting. Using it here it's only the link print in console what
needs to be adjusted. There is a side effect, that look ok, with some
coloring in the timestamps and MR ids listed.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37395>
The output line with the MR link only works in some consoles; it can be
interesting for some developers to have visibility of the MR id.
It can be useful, too, to have some sort of a header showing the fields
printed from each merge request in the queue.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37395>
For testing and an eventual use of tenacity, it is practical to encapsulate
calls to the GitLab module in methods.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37395>
Use the parameter retry_transient_errors on the GitLab object creation to
protect the script from transient errors that can be well handled.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37395>
Rebuild the information gathering about the marge queue and how the
information is later prompted to the user.
The queue provided to the user is sorted, so the user knows what will be
merged first (when the corresponding merge request pipeline succeeds).
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37395>
Enhancement of the module with two structures that can encapsulate
functionalities and establish links between data collected.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37395>
Instead of printing an exception on the screen when the process is interrupted
from the keyboard, handle it and print a more friendly message.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37395>
Encapsulate the procedure in a method that can be imported from another tool
or even a python console.
Also include a typehint fix.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37395>
With the migration concluded on !37510 of the lava-job-submitter (it is now an
independent project under the gfx-ci namespace), a lava requirements file was
not necessary anymore, but there was still one reference.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37713>
The links in the console are broken depending on the console type; for example,
when it runs within a GitLab job. This can be improved using rich. But as we
have a dependency on colorama too, we can migrate all the coloring to use this
other library too.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37454>
Bump `fire` from 0.5.0 to 0.7.0. The newer version removes the dependency
on the deprecated `pipes` module, which was removed in Python 3.13.
This fixes the LAVA tests in the `yaml-toml-shell-py-test` job when
running on Debian 13.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35853>
Cause of the following error on x86 (32-bit):
src/gbm/libgbm.so.1.0.0: unknown symbol exported: __deregister_frame_info_bases
src/gbm/libgbm.so.1.0.0: unknown symbol exported: __register_frame_info_bases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36182>
Since 655cf2f553 ("ci: Simplify filter_env_vars using indirect expansion"),
PIGLIT_REPLAY_DEVICE_NAME is declared using `declare -x`, not `export`.
Update the regex in update_traces_checksum.py accordingly. This is safe
for now, as all performance trace jobs currently run in LAVA and use this
declaration style.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36070>
The `python` command's default behaviour can vary between OSes and even
different versions of the same OS. On some systems, `python` might still
point to Python 2 for backward compatibility, while on others, it might
point to Python 3.
As Mesa already requires "Python 3.6 or newer", use `python3` explicitly
to ensure that the script is using a Python 3 interpreter.
Moreover, this commit allows this script to run on macOS, as macOS doesn't
have a `python` symlink or alias by default. Therefore, currently, when
running this script in macOS, you get a "python: command not found" error.
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35918>