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>
8f557b84f6 was done because `text` is sometimes just an int,
but the fix was only applies to the padding calculation.
Unfortunately, the padding direction is also different between strings
and integers, which means the behaviour is now incoherent.
Let's convert `text` to a string before we start doing anything so that
everything afterwards is coherent.
Fixes: 8f557b84f6 ("ci: crnm: fix hyperlink format")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35587>
Judging by comments in the chat, it seems the usage of the tokens in crnm is
only natural when you've been using it for a while. New users would appreciate
reading it in the documentation, beyond the help in the tool.
Also, mentioning how to create a token and what's the minimal scope of the
token to be used with the tool can help new users.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34860>
The number of columns should never be less than 1, otherwise we can
break the script such as:
```
Traceback (most recent call last):
File "/var/home/guilherme/projects/mesa/bin/ci/ci_run_n_monitor.py", line 734, in <module>
main()
File "/var/home/guilherme/projects/mesa/bin/ci/ci_run_n_monitor.py", line 713, in main
target_job_id, ret, exec_t = monitor_pipeline(
^^^^^^^^^^^^^^^^^
File "/var/home/guilherme/projects/mesa/bin/ci/ci_run_n_monitor.py", line 221, in monitor_pipeline
cancel_jobs(project, to_cancel)
File "/var/home/guilherme/projects/mesa/bin/ci/ci_run_n_monitor.py", line 400, in cancel_jobs
print_formatted_list(cancelled_jobs, indentation=8)
File "/var/home/guilherme/projects/mesa/bin/ci/gitlab_gql.py", line 373, in print_formatted_list
step = (len(elements) // n_columns) + 1
~~~~~~~~~~~~~~^^~~~~~~~~~~
ZeroDivisionError: integer division or modulo by zero
```
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35250>
Compared to the existing Debian-based x86_64_pyutils container, this
Alpine-based variant reduces the image size by approximately 83%.
Include all the necessary python artifacts, including lava_job_submitter
in the container to avoid having to download them at the start of each
test job.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34980>
These stages are for the jobs that are skipped in merge pipelines,
automatically run in nightly pipelines, and are available to run
manually in other pipelines.
None of these ever run in post-merge pipelines.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34590>
When one launches a stress test on a single job, the script behaves like the
stress number is not set. After this wrong end, relaunch the command works
only if stress is bigger than 2. In case 2, it can confuse the number of
executions.
When in stress mode, don't exit the monitor_pipeline method as if there were
only one job run. One job run, prints in std the job trace, but in stress
mode, there are more than one job execution.
The stress_status_counter structure lost the information about job IDs, and
the bug happens when it counts twice the same job.
Reported-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33750>
Add error handling for job retry/play actions with proper exception
handling and improve status tracking. Introduce a maximum retry
limit with MAX_ENABLE_JOB_ATTEMPTS to prevent infinite loops when
jobs cannot be enabled.
Change enable_job to return a boolean status rather than job objects
to avoid race conditions with stale job state. Update callers to
properly handle the new return value and wait for fresh job data
in the next monitoring loop.
Address race conditions in the CI monitor script:
Reported-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33750>
Extract the target job processing logic from the monitor_pipeline
function into a dedicated run_target_job helper. This improves
readability and maintainability by reducing the complexity of the
monitor_pipeline function.
Also add type casting to ensure proper typing for the job objects and
import the necessary Callable type.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33750>
Replace global path variables with ProjectPaths dataclass
- Add explicit file existence check before loading YAML
- Enhance tag retrieval by checking environment variables first
- Add logging for better debugging of tag selection process
- Remove redundant file existence check in main function
- Improve error handling for missing conditional tags file
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
This reverts commit 1cc2c738bb
We originally changed some aliases into functions so scripts could use
them without needing to be sourced, keeping the environment cleaner.
However, this broke `x_off`, which is supposed to stop debug logs
(xtrace output) from showing in the console. The function version still
triggered xtrace before disabling it, while the alias correctly
redirected the logs to `/dev/null`.
It also fixes the `bin/ci/update_tag.py` script to be able to reuse the
aliases via double sourcing the setup-test-env.sh and the respective
build script.
Reported-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
Make structural tagging functions available for both test and build
scripts.
Introduces the update_tag.sh helper for listing, checking, and updating
deterministic tags.
Also adds the ci_tag_build_time_check and ci_tag_test_time_check
functions to validate tags during build and test phases, ensuring
consistent component versioning.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
The lavacli version 1.5.2 has been released in December 2022.
Use the most recent version 2.2.0, released in October 2023, instead.
Notable changes since 1.5.2:
- Authentication tokens are now stripped from exceptions when HTTP
requests fail. (1.6)
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33266>
Currently marge will ignore an error message if it is just the word
"error" without any further information. However, if she never finds a
more informative message, then she will just print that meaningless
error message.
Instead of an empty error message, just leave the message blank.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
If marge doesn't find deqp-runner results or trace errors, she will parse
a failed job log for error messages. The parsing ignores certain phrases
in an attempt to find more relevant errors.
Add a test to check marge's error log parsing to make sure that we don't
create regressions when adding new phrases to ignore.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
Currently the update_traces_checksum script prints a label verification
request with a line that is 167 characters long.
Split the long line to make it more readable. Update the flake8
configuration to enforce a maximum line length of 159 characters to ensure
consistency.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
Currently the ci scripts and tests don't have any linting checks. Add
.flake8 linting to start adding some consistency to the scripts. Ignore
most of the existing errors until they can be addressed on an individual
basis.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
When the gantt chart service was first implemented, the read_token()
function would attempt to read from the default token file if the token
argument was missing.
Now it's necessary to call a separate function to look in the default
token file, so if the token argument is not provided, expressly call
get_token_from_default_dir().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
The gantt charts have a vertical line indicating the time when marge-bot
stops waiting for CI to finish. Currently the ci-timeout is hard-coded at
60 minutes. But marge-bot's timeout is configurable, so allow this value
to be configured as well.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
If a job is still running when the gantt chart is generated, the job's
phases won't be represented as a bar on the chart.
To show these jobs on the gantt chart, introduce a new phase "In-Progress"
to capture the current status of these jobs. Rename the "Running" phase
as "Time spent running" to emphasize that the running phase is complete.
This provides a more complete picture of the pipeline jobs when CI times
out.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
The gantt chart script currently expect the pipeline url to be the last
line of marge-bot's comment on a failed pipeline. The pipeline summary
hook now adds additional information that was preventing the gantt chart
script from finding the pipeline url.
Change the regex for finding the pipeline url to account for pipeline
summary comments.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
Add a pipeline-id to the gantt filename so that the filename is unique.
Reduce the additional info provided in the gantt comments since the tool
is now more familiar to developers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
Currently the gantt chart script will post a comment to any project that
uses the default marge bot user id. Although the gantt chart is flexible
enough to work for any project, restrict it to mesa/mesa by default. Add
the --project-id option to add a custom project or list of projects to
analyze.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
The gantt chart currently hard-codes the marge user id, but since the
script can be used for any marge-bot user, add an option to specify the
marge-bot user id. If no option is specified, the default marge-bot user
id is still used.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>