Eric Engestrom
189b4193ee
ci_run_n_monitor: explain how to pass multiple targets without having to use regexes
...
Fixes: 6825c67c99
("ci_run_n_monitor: allow passing multiple targets")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28461 >
2024-03-29 19:23:24 +00:00
Eric Engestrom
bc38b68ab8
ci_run_n_monitor: read job logs as utf-8
...
Fixes regular crashes like this one:
Traceback (most recent call last):
File "bin/ci/ci_run_n_monitor.py", line 478, in <module>
print_log(cur_project, target_job_id)
File "bin/ci/ci_run_n_monitor.py", line 270, in print_log
lines = job.trace().decode("raw_unicode_escape").splitlines()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'rawunicodeescape' codec can't decode bytes in position 6090-6091: truncated \uXXXX escape
decoding with 'raw_unicode_escape' codec failed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27653 >
2024-02-29 14:17:02 +00:00
Eric Engestrom
656e329fa2
ci_run_n_monitor: fix handling of optional jobs again
...
Looks like a recent rework broke this again, so let's add the existence check back.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27874 >
2024-02-29 14:11:32 +00:00
Eric Engestrom
3acb00290d
ci_run_n_monitor: allow detached heads as well
...
When running on a detached head (eg. checkout of a tag or a specific
commit), there is no active branch, so we can't perform this check; just
skip it and assume the user knows what they're doing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27578 >
2024-02-16 11:39:50 +00:00
Eric Engestrom
ef744fa589
ci_run_n_monitor: explain why/when there might be no tracked remote
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27578 >
2024-02-16 11:39:50 +00:00
Corentin Noël
b0af2b30ab
ci_run_n_monitor: Allow the upstream format to not exist
...
When pushing directly to a fork, the upstream branch does not exist and thus
returns an empty string.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27567 >
2024-02-12 10:52:53 +01:00
Eric Engestrom
9beb9081fc
ci_run_n_monitor: print the target regex before adding the X/N bit
...
To avoid showing something too complex to the user, especially since this isn't something they added themselves or can remove.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27530 >
2024-02-09 15:58:10 +00:00
Eric Engestrom
7154c1eb77
ci_run_n_monitor: implicitly include parallel:
jobs
...
This avoids the surprising behaviour where `--target jobname` works for
some jobs but not others, because gitlab adds `X/N` at the end of these
job names.
If the user does specify something like `jobname 1/.*` to only run the
first, the extra `\d+/\d+` is ignored, just like if the job isn't
`parallel:` and therefore doesn't end with `X/N`.
If the user really wants to fail to match parallel jobs (previous
behaviour), they can simply add a `$` at the end of the job name/regex
(but also, I don't see why someone would want that behaviour).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27530 >
2024-02-09 15:58:10 +00:00
Eric Engestrom
716ed7d62a
gitlab_gql: print error returned by server in --print-merged-yaml
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27535 >
2024-02-09 08:01:20 +00:00
Eric Engestrom
45df652d0b
ci_run_n_monitor: refresh job state when starting it
...
Avoids job staying in 'manual' state and making the script think there's
nothing left running.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499 >
2024-02-08 22:22:54 +00:00
Eric Engestrom
8a05cb8da7
ci_run_n_monitor: track new job when retrying a job
...
When retrying a job, we are creating a new job, so we need to keep track
of this new job now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499 >
2024-02-08 22:22:54 +00:00
Eric Engestrom
5bc1a62fbb
ci_run_n_monitor: add method to get a pipeline job by its id
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499 >
2024-02-08 22:22:54 +00:00
Eric Engestrom
bce1230587
ci_run_n_monitor: update job when it goes through enable_job()
...
`enable_job()` modifies the job, so we need to make sure we get the
updated job back out of it.
The next two commits take care of the two specific code paths.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499 >
2024-02-08 22:22:54 +00:00
Eric Engestrom
5758a5d660
ci_run_n_monitor: add some types for gitlab objects
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499 >
2024-02-08 22:22:54 +00:00
Eric Engestrom
044c51b6bf
ci_run_n_monitor: warn user if they forgot to push the branch
...
Only perform this check if they set `--rev HEAD` (or don't specify it);
let's assume if they select another commit, they know what they're
doing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26969 >
2024-02-08 21:38:21 +00:00
Eric Engestrom
5d293f01cc
ci_run_n_monitor: avoid spamming a ton of "new status: created" for all the jobs at the beginning
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27419 >
2024-02-02 15:25:22 +00:00
Dave Airlie
59fb425e1c
vulkan: update registry/includes to 1.3.277
...
Acked-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27421 >
2024-02-02 01:46:24 +00:00
Eric Engestrom
2d290eda36
Reapply "bin/ci: Add GitLab basic token validation"
...
This reverts commit e39fed5737
.
One change from the original commit (cd8b546205
):
- in `validate_gitlab_token()`, `raise ValueError` was replaced with
`return False`.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27331 >
2024-01-29 18:21:29 +00:00
Eric Engestrom
e39fed5737
Revert "bin/ci: Add GitLab basic token validation"
...
This validation code has 2 bugs, the main one being that it is wrong and
is refusing perfectly valid codes. Let's remove this until we come up
with a valid check.
This reverts commit cd8b546205
.
Fixes: cd8b546205
("bin/ci: Add GitLab basic token validation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27312 >
2024-01-29 01:44:43 +00:00
Guilherme Gallo
cd8b546205
bin/ci: Add GitLab basic token validation
...
Validate the token to be able to warn the user about wrong
authentication settings.
Treat the default token argument case, when the token file is not found.
Add some loggings to guide the user.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27206 >
2024-01-26 00:37:05 -03:00
Guilherme Gallo
8eabdb3909
bin/ci: Refactor read_token function
...
Make `read_token` utilize the `get_gitlab_pipeline_from_url` to reuse
code from `gitlab_gql.py`.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27206 >
2024-01-26 00:37:05 -03:00
Guilherme Gallo
708a26c607
bin/ci: Move get_token_from_default_dir to common
...
Moved the `get_token_from_default_dir` method to a common module for
shared use between `gitlab_gql.py` and `ci_run_n_monitor.py`. This
migration facilitates better code organization and potential future
reuse.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27206 >
2024-01-26 00:37:05 -03:00
Guilherme Gallo
50fcea9c34
bin/ci: Propagate the token to GitlabGQL
...
Fix an issue in `ci_run_n_monitor.py` where the token was not
being correctly propagated to the GitlabGQL abstraction. This addresses
misbehavior in scenarios like running pipelines in a private fork,
ensuring proper functionality.
Also document `find_dependencies` function.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27206 >
2024-01-26 00:37:03 -03:00
Eric Engestrom
6825c67c99
ci_run_n_monitor: allow passing multiple targets
...
When generating the list of targets from a script, being able to just
pass `--target "${list[@]}"` is very convenient.
The list of targets is simply converted to an "or" regex, matching any
of the `--target`s given.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27252 >
2024-01-25 21:16:13 +00:00
Eric Engestrom
eeba409c54
ci_run_n_monitor: drop always-true condition
...
`--target` is mandatory.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27252 >
2024-01-25 21:16:13 +00:00
Helen Koike
bf461d856f
ci/ci_post_gantt: add script that post gantt to Marge's messages
...
Generate Gantt chart and post an in thread reply to Marge's messages
with it in html format.
html format is used for being interactive.
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26796 >
2024-01-20 00:02:56 +00:00
Helen Koike
b289028d0a
ci/ci_gantt_chart: show duration on hover
...
Show the duration of the given phase on hover.
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793 >
2024-01-17 13:10:07 +00:00
Helen Koike
ffaa247b4f
ci/ci_gantt_chart: add option to save output to a file
...
Allow saving in html and in image formats.
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793 >
2024-01-17 13:10:07 +00:00
Helen Koike
cf86e97ace
ci/ci_gantt_chart: add timeout vertical line
...
Add pipeline total duration and add a timeout vertical line to indicate
the 1h Timeout mark.
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793 >
2024-01-17 13:10:07 +00:00
Helen Koike
61ab9ae2af
ci/ci_gantt_chart: add tool to analyse pipeline execution time
...
ci_gantt_chart.py generates a gantt chart from a given pipeline url
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793 >
2024-01-17 13:10:07 +00:00
Helen Koike
9e8cbc8e91
ci/ci_run_n_monitor: move get_gitlab_pipeline_from_url() to gitlab_common
...
Move this code to gitlab_common since it can be re-used by other
scripts.
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793 >
2024-01-17 13:10:07 +00:00
Matt Turner
0ab7ea56b2
symbols-check: Add _GLOBAL_OFFSET_TABLE_
...
This is exported on hppa/parisc.
See also: https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/291
Cc: mesa-stable
Bug: https://bugs.gentoo.org/908079
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26978 >
2024-01-10 19:25:05 +00:00
Vignesh Raman
2487e18d4e
ci: bare-metal: poe: Create strutured logs
...
Use the CustomLogger class and CLI tool to create strutured logs
for poe scripts which are used by broadcom and nouveau jobs.
Renamed stage lint to code-validation and added python-test job
which runs the tests for structured and customer logger to ci.
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25179 >
2023-12-19 10:09:35 +00:00
Vignesh Raman
aa0c4078de
ci: Add CustomLogger class and CLI tool
...
This commit introduces the CustomLogger class, which provides methods
for updating, creating, and managing dut jobs and phases in a structured
log in below json format.
{
"_timestamp": "2023-10-05T06:16:42.603921",
"dut_job_type": "rpi3",
"farm": "igalia",
"dut_jobs": [
{
"status": "pass",
"submitter_start_time": "2023-10-05T06:16:42.745862",
"dut_start_time": "2023-10-05T06:16:42.819964",
"dut_submit_time": "2023-10-05T06:16:45.866096",
"dut_end_time": "2023-10-05T06:24:13.533394",
"dut_name": "igalia-ci01-rpi3-1gb",
"dut_state": "finished",
"dut_job_phases": [
{
"name": "boot",
"start_time": "2023-10-05T06:16:45.865863",
"end_time": "2023-10-05T06:17:14.801002"
},
{
"name": "test",
"start_time": "2023-10-05T06:17:14.801009",
"end_time": "2023-10-05T06:24:13.610296"
}
],
"submitter_end_time": "2023-10-05T06:24:13.680729"
}
],
"job_combined_status": "pass",
"dut_attempt_counter": 1
}
This class uses the existing StructuredLogger module,
which provides a robust and flexible logging utility supporting multiple
formats. It also includes a command-line tool for updating, creating,
and modifying dut jobs and phases through command-line arguments.
This can be used in ci job scripts to update information in structured logs.
Unit tests also have been added for the new class.
Currently, only LAVA jobs create structured log files, and this will be
extended for other jobs using this tool.
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25179 >
2023-12-19 10:09:35 +00:00
Eric Engestrom
759b68bf66
bin/gitlab_gql: print merged yaml as yaml instead of a python dict
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26074 >
2023-12-14 12:06:39 +00:00
Eric Engestrom
db6541a41a
bin/gitlab_gql: fix --print-merged-yaml when --rev != HEAD
...
Reading the local root config file and then asking gitlab to evaluate it
in the context of some other version will cause issues if they are not
identical.
Instead, the local document should be a simple include of whatever is
the root config file at that commit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26074 >
2023-12-14 12:06:39 +00:00
Yonggang Luo
8913cf6f7d
docs: Generate document with utf8 encoding
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26515 >
2023-12-07 12:41:07 +00:00
Eric Engestrom
76be39ca6d
ci_run_n_monitor: allow picking a pipeline by its MR
...
It picks the latest pipeline from the MR; if you want another pipeline,
use `--pipeline-url`.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26381 >
2023-12-03 11:28:49 +00:00
Eric Engestrom
2765b8aea4
bin/gen_release_notes: include removed 'new_features.txt' in commit
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26469 >
2023-12-02 11:55:26 +00:00
Eric Engestrom
f548d84a35
bin/python-venv: fix venv folder check
...
My last refactor before merging !26354 was incorrect and broke the
script when use for the first time (or after deleting the venv folder).
Fixes: 69ec13b303
("bin/python-venv: detect python version change")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26453 >
2023-12-02 11:48:35 +00:00
Eric Engestrom
2a6d750a53
bin/gen_release_notes: fix regex raw string
...
Fixes: ba6336ce3e
("docs: use version-number as toctree-title for relnotes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26468 >
2023-12-02 11:44:45 +00:00
Eric Engestrom
69ec13b303
bin/python-venv: detect python version change
...
The venv only works for a specific python version; when updating python,
the venv needs to be regenerated.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26354 >
2023-11-30 08:39:17 +00:00
Helen Koike
2999091287
ci/ci_run_n_monitor: abort when target gets skipped
...
when a target receives skipped state it is because some of the
dependencies failed, abort the script and print the reason
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26155 >
2023-11-20 13:03:09 +00:00
Eric Engestrom
a5e20a5c31
ci_run_n_monitor: require user to add an explicit .*
at the end if jobs like *-full
are wanted
...
Most of the time, these jobs are not wanted, so let's make this a full
match instead of prefix match so that users only get what they ask for.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26066 >
2023-11-17 08:12:31 +00:00
Faith Ekstrand
94ea8a5883
ci: Update the python env for ci_run_n_monitor.py
...
Without this, it blows up on Fedora 39 because of changes introduced by
Python 3.12 which break a a couple of our dependencies.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998 >
2023-11-14 00:48:15 +00:00
Eric Engestrom
1cb3c349ff
bin/gitlab_gql: give a better name to the --print-job-manifest argument value than PRINT_JOB_MANIFEST
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26143 >
2023-11-13 20:03:44 +00:00
Eric Engestrom
22961fc45a
bin/gitlab_gql: deduplicate fetch_merged_yaml() logic between print branches
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26143 >
2023-11-13 20:03:44 +00:00
Eric Engestrom
ef63cc6017
bin/gitlab_gql: rename get_job_final_definition() to print_...() since that's what it actually does
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26143 >
2023-11-13 20:03:44 +00:00
Eric Engestrom
c6ef161bc1
bin/gitlab_gql: only allow a single --print-*
argument per invocation
...
Printing multiple things as the same time is not really usable, so let's
be explicit and only allow one at a time, which allows a few cleanups in
the code.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26143 >
2023-11-13 20:03:44 +00:00
Eric Engestrom
f4f4d80096
bin/gitlab_gql: only get the pipeline when a pipeline is needed
...
Otherwise, options like --print-merged-yaml are broken when their
commit's push didn't create a pipeline.
Fixes: b87e092489
("ci/bin: Fix gitlab_gql methods that uses needs DAG")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26142 >
2023-11-11 06:19:44 +00:00