Commit Graph

532 Commits

Author SHA1 Message Date
Daniel Stone
9f21e90a0c ci: Make token parsing more robust
Start by finding our known prefix, stripping only that off, then
validating that the rest of the data makes sense. This fixes certain
tokens which were erroneously getting rejected.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31270>
2024-09-20 11:03:50 +00:00
Daniel Stone
4ad94366c3 ci: Add Python requirements include
Make it so we can install everything we need with just
pip3 -r bin/ci/test/requirements.txt.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31151>
2024-09-12 18:17:52 +00:00
David Rosca
39f7ed5412 meson/megadriver: Add megadriver_libdir argument
To be able to install symlinks to megadriver in different directory.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31079>
2024-09-11 08:07:20 +00:00
Daniel Stone
cc4db4bc36 ci: Run pytest once for both LAVA and bin/ci
There's no need for these to be totally separate, and also for the LAVA
tests to have been disabled for months.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
eae6e122ab ci/lava: Fix path to structured logger
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Mike Blumenkrantz
1e17f49baf ci: add --pipeline-url to trace update script
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31070>
2024-09-07 12:15:35 +00:00
Mike Blumenkrantz
f944c18fad ci: fix trace update script
this was broken by various things

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31070>
2024-09-07 12:15:35 +00:00
Aleksi Sapon
13a2805325 llvmpipe: FlameGraph profiling support
For use outside Linux.

Enable dumping JIT address mappings and assembly
using an environment variable. Add a script to map
JIT addresses in collapsed stacks, and annotate
assembly dumps with sample counts.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30626>
2024-09-05 14:19:20 +00:00
Aleksi Sapon
6a3234ee3b llvmpipe: improvements to JIT assembly dump
Fix disassembly off-by-one instruction bug, add
Aarch64 support, add addresses to symbol names,
cleanup iostream usage.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30626>
2024-09-05 14:19:20 +00:00
David Heidelberg
83b74bfc6d bin/gen_release_notes: adjust checksums section
We currently provide SHA256 and SHA512, differenciated by length.

Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30897>
2024-08-28 15:25:27 +00:00
Eric Engestrom
1ba84bc5ca ci: add check for misleading indentation in ci toml files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30442>
2024-08-22 20:25:32 +00:00
Daniel Stone
2a20cdfb31 ci/run_n_monitor: Add --dry-run argument
This will just print out the target jobs and their dependencies, then
exit.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:19 +00:00
Daniel Stone
ad5f4d0270 ci/run_n_monitor: Remove --force-manual
Now that we can exclude by stages instead, we don't need --force-manual.
Having mandatory arguments which also do the wrong thing is not great.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:19 +00:00
Daniel Stone
99cd56a684 ci/run_n_monitor: Add --exclude-stage filtering
Add an argument to ci_run_n_monitor specifying certain stages to be
excluded from consideration, defaulting to the one with post-merge and
performance jobs. This allows, e.g., to run all Panfrost pre-merge jobs:
./ci_run_n_monitor.py --target 'panfrost.*'

or to run all Freedreno pre-merge jobs:
./ci_run_n_monitor.py --target '.*' --include-stage freedreno

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:19 +00:00
Daniel Stone
3ffe733214 ci/run_n_monitor: Add --include-stage argument
Add basic filtering by stages, starting with stage inclusion.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Guilherme Gallo
ae15b656ef bin/ci: crnm: Use frozen set for statuses
Let's be defensive and use `frozenset` from Python to avoid changing
global variables during the runtime (or any static part of code).

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30526>
2024-08-07 17:25:46 +00:00
Guilherme Gallo
24d64102fe bin/ci: crnm: Don't overwrite the global sets
The skip_follow_statuses variable, used to check if we need to stay
monitoring the pipeline instead of jumping to the target job traces, is
based on COMPLETED_STATUSES set. But, in Python, we do shallow copies by
default, and changes on skip_follow_statuses reflected on
COMPLETED_STATUSES, which was making manual dependencies stop playing
when --force-manual was not given.

Fixes: 84d401aebf0832741716f947dd7e2e9aac1221ac

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30526>
2024-08-07 17:25:46 +00:00
Eric Engestrom
deb1d1f9c3 pick-ui: move NominationType values around so that None is 0
This keeps tripping me up when reading the `.pick_status.json`, so let's
change it around so that starting in the next release cycle, `NONE = 0`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30427>
2024-07-30 21:54:01 +00:00
Guilherme Gallo
0acc31a001 bin/ci: crnm: Reduce trace cluttering
Some recurrent messages are only cluttering the ci_run_n_monitor's logs,
so let's use the easily provided @cache decorator to print stuff that
the user will only needs to see once.

Also removes some junk that can happen during the pipeline monitoring
loop, like the "----" line break, and newlines.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30361>
2024-07-29 18:04:21 +00:00
Guilherme Gallo
ff18d1ec23 bin/ci: crnm: Fix pipeline monitoring skipping
We stop monitoring pipeline changes when we find out that the target job
is already running, or is in a complete state.

But when we `--force-manual` we should consider that the job is not
complete and we should iterate a little more in the monitor pipeline
stage until it gets ready for trace following.

Closes: #11552

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30361>
2024-07-29 18:04:21 +00:00
Guilherme Gallo
3975366a88 bin/ci: crnm: Deal with created status
Jobs that we want to run can get the `created` status when its
dependencies are still running.

So let's gather this information and ensure that we will wait these jobs
to reach the `manual` or `running` status before jumping to monitor
target jobs trace.

Closes: #11517

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30361>
2024-07-29 18:04:21 +00:00
Eric Engestrom
1f70af7e9f bin/ci: update python-gitlab to 4.x
Quite a few fixes that we want were in the 4.x releases, so let's bump it.

See the list of breaking changes here:
https://python-gitlab.readthedocs.io/en/stable/changelog.html#v4-0-0-2023-10-17

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30019>
2024-07-29 10:08:01 +00:00
Eric Engestrom
2c6e8b2dd5 Revert "bin/ci_run_n_monitor: explain that the 'Universal Recycling symbol' ♲ emoji means these jobs were cancelled"
This reverts commit 032d4a20f9.

The `if not to_cancel: return` was a red herring as what actually matters
is the job status, which is checked in each cancel_job() call, so we
can't know in advance whether anything will be cancelled, so let's just
drop this text explanation.

In the meantime we've also improved the emoji next to cancelled jobs, so
let's hope there is no longer any need to explain what this long list of
job names means.

Fixes: 032d4a20f9 ("bin/ci_run_n_monitor: explain that the 'Universal Recycling symbol' ♲ emoji means these jobs were cancelled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30265>
2024-07-19 16:03:24 +00:00
Eric Engestrom
d5ec3a8988 meson/megadriver: replace hardlinks with symlinks
The wording in the script has always (3218056e0e) been about symlinks,
and it feels like the use of `link()` instead of `symlink()` was
a typo that became fact.

These hardlinks make packaging harder (many distros have some variant of
this patch locally) especially when it comes to debug packages where gdb
expects the symbols file to have the same name as the lib the symbols
come from, and I don't think they make anything better, so let's change
to code to match the documentation :)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29731>
2024-07-19 01:24:16 +00:00
Eric Engestrom
ac5d14c5ea meson/megadriver: stop removing the "master" .so file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29731>
2024-07-19 01:24:16 +00:00
Eric Engestrom
da05938e65 meson/megadriver: fix install message to match the rest of meson
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29731>
2024-07-19 01:24:16 +00:00
Eric Engestrom
330006375e bin/ci_run_n_monitor: replace ♲ with 🗙 to represent cancelled jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30223>
2024-07-18 19:21:45 +00:00
Eric Engestrom
964ecac0a4 bin/ci_run_n_monitor: add text labels next to the emojis
IMO emojis are nice to add next to the information to recognize things
easily in cases where they are visible, but they should not *replace*
the information.

This adds a readable text next to all emojis (some already had one,
like the "job duration" ones).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30223>
2024-07-18 19:21:45 +00:00
Eric Engestrom
032d4a20f9 bin/ci_run_n_monitor: explain that the 'Universal Recycling symbol' ♲ emoji means these jobs were cancelled
And not "restarted" for instance, which would also be a reasonable
interpretation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30223>
2024-07-18 19:21:45 +00:00
Sergi Blanch Torne
e6de8e2533 ci: fix run_n_monitor single execution
When there is a single job as a target and, when it is triggered, it takes
more than one loop time in pending status, it confuses the script to fall in
a wrong return of the pipeline monitoring.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11517

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30219>
2024-07-17 11:25:50 +00:00
Sergi Blanch Torne
5873b3ac14 ci: run_n_monitor, sort by name when listing jobs
The job loops, w/o and explicit sort, are sorted by the job id. As they produce
logs, humans could feel an improvement by sorting by name.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29444>
2024-07-11 08:28:31 +00:00
Sergi Blanch Torne
12c1bdc31d ci: run_n_monitor, listing job names with a padding
Formatting the output lines with a padding in the job name fields may help
the readability of the information when one tries to follow the progress of
a specific job.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29444>
2024-07-11 08:28:31 +00:00
Sergi Blanch Torne
d80d35ceff ci: run_n_monitor, pretty duration with padding
When printing time durations, the smaller units can always have the same
number of digits. Helps to have aligned fields when printing.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29444>
2024-07-11 08:28:31 +00:00
Sergi Blanch Torne
45f19b3631 ci: run_n_monitor, arguments review and unicode
Coding style homogenous for all the methods in the file. Document
unicode symbols used.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29444>
2024-07-11 08:28:31 +00:00
Eric Engestrom
9a3172e489 bin/ci: allow bugfixes in requirements.txt
The one exception is filecache which is just a 0.x which means any other
0.x might break compatibility, so we can't just set it to `0.*`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30016>
2024-07-04 20:15:28 +00:00
Eric Engestrom
0b09cf63a8 ci_run_n_monitor: add RUNNING_STATUSES and use it where appropriate
A couple of these were trivially missing the `created` status which
usually doesn't stay for long enough for this very slow script to notice.

The `cancel_job()` function will no longer cancel manual jobs waiting to
be started.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29917>
2024-07-04 09:14:36 +00:00
Eric Engestrom
a578101d5b ci_run_n_monitor: use COMPLETED_STATUSES in more places
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29917>
2024-07-04 09:14:36 +00:00
Eric Engestrom
fb2adbeeb7 ci_run_n_monitor: be coherent about using sets for element in group checks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29917>
2024-07-04 09:14:35 +00:00
Eric Engestrom
fa3d529f55 ci_run_n_monitor: add support for new canceling job status
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29917>
2024-07-04 09:14:35 +00:00
David Heidelberg
68215332a8 build: pass licensing information in SPDX form
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Dylan Baker <dylan.c.baker@intel.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29972>
2024-06-29 12:42:49 -07:00
Konstantin Seurer
3233d19f87 zink: Always include renderdoc_app.h
Removes the dependency on a system wide installation ot the renderdoc
header.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28892>
2024-06-20 07:02:15 +00:00
Eric Engestrom
44e6850016 bin/ci: escape literal url in regex
Fixes: b24dd1fa1c ("ci: Fix parse GitLab pipeline url")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29718>
2024-06-14 11:46:52 +00:00
Sergi Blanch Torne
0c092dc5c4 ci: run_n_monitor, collect and summarize
The job duration is printed during the test progress. It can be collected and
summarized at the end of the process. It is interesting when doing a stress
test as one will have this information together at the end.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29419>
2024-06-14 08:04:56 +00:00
Konstantin Seurer
5726ecae3e khronos-update: Add ANDROID guards to vk_android_native_buffer.h
Avoids adding back the code after every header update.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29621>
2024-06-14 06:58:35 +00:00
Sergi Blanch Torne
b24dd1fa1c ci: Fix parse GitLab pipeline url
When the namespace have a dash, this method cannot recogniza properly
the fields in a url. Better to use a regular expression quickly defining
the fields. The exception raised, when the pattern is not recognized
would help more the handler.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29683>
2024-06-13 14:10:57 +00:00
David Heidelberg
27cc8e375b ci: introduce tool for comparing nightly runs
nightly_compare.
Compare the two latest scheduled pipelines and provide information
about the jobs you're interested in.

The job part reports:
 - RED previously passing jobs
 - YELLOW jobs which failed before, but continue to fail
   here is also available link to the previous failed run
 - If no job failing, program exits.

The test part reports:
 - everything in lovely table

If any failing job is found, after this phase, commit list between these
two scheduled run is printed (you can also use the WebUI link).

Example: I care about all Adreno jobs passing and one Radeon (r300)
with gallium-nine tests.

```
./bin/ci/nightly_compare.py --target "a[3-7][0-9][0-9].*|r300-rv530-nine"
```

Co-authored-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29392>
2024-06-12 09:26:07 +00:00
Sergi Blanch Torne
2d6e72c2cb ci: continue stress run'n'monitor
When the tool is used to stress test a pipeline, if there are jobs already ran,
use their information like it does when the stress flag is not set.

This provides consistency between the behavior when stress argument is not set,
to when it is set. When it is not set, it uses the information about jobs that
are already done. When it is set, it has to use the information about the
already ran jobs. Also, it saves resources by triggering the minimum required.

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/29432>
2024-06-11 11:22:29 +02:00
Sergi Blanch Torne
d963fd596e ci: fix stress counter in run'n'monitor
The stress counter after enable_job(retry), often stores the new status
instead of the job complete. So, the summary printed later doesn't show the
real evolution of the test.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29416>
2024-05-27 20:30:36 +00:00
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