Eric Engestrom
941d92408e
bin/ci_run_n_monitor: automatically pick MR pipelines when they exist
...
When an MR has been created, we usually want to run the jobs in the MR
pipeline so that reviewers see that things work as expected.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25153 >
2023-09-12 17:42:34 +00:00
Eric Engestrom
f398f0fb44
bin/ci_run_n_monitor: print in which repo we're looking for the pipeline
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25153 >
2023-09-12 17:42:33 +00:00
Eric Engestrom
8366d77e4c
bin/ci_run_n_monitor: error out if both --project and --pipeline-url are passed
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24937 >
2023-08-29 19:27:22 +00:00
Helen Koike
67147a3c5c
ci: add --project option to ci_run_n_monitor.py
...
Now that we have drm-ci, add --project, so the script can also be used
to linux (and any other projects).
Let the default to "mesa" so it can keep behaving as before when the
option is not given.
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24912 >
2023-08-29 16:54:31 +00:00
Eric Engestrom
2eca558dd4
bin/ci/update_traces_checksum: use venv wrapper
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24367 >
2023-08-03 23:21:32 +00:00
Eric Engestrom
ce49034bbb
bin/ci/gitlab_gql: use venv wrapper
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24367 >
2023-08-03 23:21:32 +00:00
Eric Engestrom
6e4843bb04
bin/ci/ci_run_n_monitor: use venv wrapper
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24367 >
2023-08-03 23:21:31 +00:00
David Heidelberg
ced762a8d3
bin/ci: handle errors more gracefully in update_traces_checksum script
...
UnicodeDecodeError is present very often, since GitLab logs are scary.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24444 >
2023-08-03 21:58:13 +00:00
Eric Engestrom
42021b4d13
bin/ci_run_n_monitor: get git sha from pipeline if specified, instead of requiring --rev to match
...
Fixes: 9ce717ab31
("ci_run_n_monitor: add ability to specify the pipeline to use, instead of auto-detecting it")
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24366 >
2023-07-28 13:10:41 +00:00
Guilherme Gallo
701b035179
bin/ci: Ensure that all jobs have nodes in DAG
...
Some automatic jobs, such as 'rustfmt' and 'clang-format', are skipped
during the graph sweep because their parents are already included in the
node set.
This commit ensures all visited jobs are in DAG and fixes iteration
modification using deepcopy.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9376
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24176 >
2023-07-17 15:34:11 +00:00
Daniel Stone
b3c6cd0886
ci: Respect $HTTP_PROXY for ci_run_n_monitor
...
We need to explicitly tell AIOHTTP that it's OK to take the HTTP proxy
from the environment.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23341 >
2023-06-02 02:45:36 +00:00
David Heidelberg
b3b883ca00
bin/ci: mention requirements.txt
...
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22078 >
2023-05-28 15:19:42 +02:00
Eric Engestrom
51482b2c6a
bin/ci: fix mistakenly hardcoded repo name in get_gitlab_project()
...
It didn't matter so far because all callers always pass "mesa".
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23223 >
2023-05-26 10:13:09 +00:00
Eric Engestrom
9ce717ab31
ci_run_n_monitor: add ability to specify the pipeline to use, instead of auto-detecting it
...
The auto-detection code currently looks for a repo called "mesa" in the
current user's fork (ie. the user providing the api token), which is great for
the common use case, but sometimes needs to be able to be overridden, such as
when running a pipeline in another fork than one's own, when working with
someone else in their fork.
Signed-off-by: Eric Engestrom <eric@igalia.com >
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23230 >
2023-05-26 00:12:03 +00:00
Eric Engestrom
bcdd5b5e74
ci: bump bin/ci/ deps to support python 3.11
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22943 >
2023-05-10 14:32:02 +00:00
Guilherme Gallo
eb1945c3d9
bin/ci: Add StructuredLogger to improve log handling
...
This commit introduces the StructuredLogger module, which provides a
robust and flexible logging utility supporting multiple data formats
(CSV, JSON, and YAML). By incorporating this module into our CI system,
we enhance our log management capabilities, making it easier to:
1. Monitor and analyze logs: The StructuredLogger is a dict-like data
abstraction which autosaves into a structured data file, whenever it
is updated. With this file, one can easily know specifics of the job
execution without having to grep it in the traces logs or exploring
the job artifacts. The autosave feature makes it useful even when the
CI job fails unexpectedly, since the partial dict is always written
back to the disk.
2. Maintain data integrity: The module includes context managers for
file locking and editing log data, ensuring data integrity and
preventing race conditions.
3. Support multiple formats: With built-in support for CSV, JSON, and
YAML formats, this module caters to a wide range of use cases and
user preferences.
4. Increase maintainability: The modular design of the StructuredLogger
and its corresponding strategies simplifies maintenance and allows
for seamless integration of additional formats in the future.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500 >
2023-04-19 14:36:37 +00:00
Harri Nieminen
fd767a4517
bin: Fix typos
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22189 >
2023-03-30 21:37:00 +00:00
David Heidelberg
26dc5b3737
ci/ci_run_n_monitor: while we usually disable many jobs, print them inline
...
Saving scrolling time...
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21713 >
2023-03-06 01:51:59 +01:00
Eric Engestrom
c672b593b9
bin/ci: add gitlab_gql.py.cache to the .gitignore
...
On my machine, the filecache doesn't have the extra `.db` suffix, just `.cache`.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20722 >
2023-01-16 15:27:38 +00:00
Eric Engestrom
a6e487e367
ci_run_n_monitor.py: automatically retry on transient errors
...
This morning a GitLab update was deployed, leading to a few moments
where the API returned an error.
python-gitlab is actually able to handle a number of those and retry
automatically, so let's enable that:
https://python-gitlab.readthedocs.io/en/stable/api-usage-advanced.html#transient-errors
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20094 >
2023-01-06 19:28:55 +00:00
David Heidelberg
a04720dc1c
ci: move the CI handling scripts into bin/ci
...
Any change in .gitlab-ci/ directory triggers an entire CI run,
which is unnecessary for just changing the developers' scripts.
Added symlink to `.gitlab-ci/bin` to keep original invocation compatibility.
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org >
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20371 >
2022-12-19 16:36:19 +01:00