ci/lava: implement the priority

Before: kernelci 38; Mesa3D 75

Priority now:
 - 38 ‒ kernelci
 - 40 ‒ after merge and performance
 - 50 ‒ user runs
 - 75 ‒ marge-bot (MUST be prioritized)

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21812>
This commit is contained in:
David Heidelberg
2023-03-09 12:36:25 +01:00
committed by Marge Bot
parent ae893089e9
commit 675f757ffb
3 changed files with 16 additions and 2 deletions

View File

@@ -3,6 +3,12 @@ workflow:
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null
variables: variables:
MESA_CI_PERFORMANCE_ENABLED: 1 MESA_CI_PERFORMANCE_ENABLED: 1
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH
variables:
LAVA_JOB_PRIORITY: 40
- if: $GITLAB_USER_LOGIN != "marge-bot"
variables:
LAVA_JOB_PRIORITY: 50
- when: always - when: always
variables: variables:

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# #
# Copyright (C) 2020 - 2022 Collabora Limited # Copyright (C) 2020 - 2023 Collabora Limited
# Authors: # Authors:
# Gustavo Padovan <gustavo.padovan@collabora.com> # Gustavo Padovan <gustavo.padovan@collabora.com>
# Guilherme Gallo <guilherme.gallo@collabora.com> # Guilherme Gallo <guilherme.gallo@collabora.com>
@@ -61,6 +61,11 @@ NUMBER_OF_RETRIES_TIMEOUT_DETECTION = int(getenv("LAVA_NUMBER_OF_RETRIES_TIMEOUT
# How many attempts should be made when a timeout happen during LAVA device boot. # How many attempts should be made when a timeout happen during LAVA device boot.
NUMBER_OF_ATTEMPTS_LAVA_BOOT = int(getenv("LAVA_NUMBER_OF_ATTEMPTS_LAVA_BOOT", 3)) NUMBER_OF_ATTEMPTS_LAVA_BOOT = int(getenv("LAVA_NUMBER_OF_ATTEMPTS_LAVA_BOOT", 3))
# Supports any integers in [0, 100].
# The scheduler considers the job priority when ordering the queue
# to consider which job should run next.
JOB_PRIORITY = int(getenv("LAVA_JOB_PRIORITY", 75))
def generate_lava_yaml_payload(args) -> dict[str, Any]: def generate_lava_yaml_payload(args) -> dict[str, Any]:
# General metadata and permissions, plus also inexplicably kernel arguments # General metadata and permissions, plus also inexplicably kernel arguments
@@ -68,7 +73,7 @@ def generate_lava_yaml_payload(args) -> dict[str, Any]:
'job_name': 'mesa: {}'.format(args.pipeline_info), 'job_name': 'mesa: {}'.format(args.pipeline_info),
'device_type': args.device_type, 'device_type': args.device_type,
'visibility': { 'group': [ args.visibility_group ] }, 'visibility': { 'group': [ args.visibility_group ] },
'priority': 75, 'priority': JOB_PRIORITY,
'context': { 'context': {
'extra_nfsroot_args': ' init=/init rootwait usbcore.quirks=0bda:8153:k' 'extra_nfsroot_args': ' init=/init rootwait usbcore.quirks=0bda:8153:k'
}, },

View File

@@ -330,6 +330,7 @@
- !reference [.freedreno-manual-rules, rules] - !reference [.freedreno-manual-rules, rules]
allow_failure: true # see comment in .performance-rules, which we don't inherit this line from. allow_failure: true # see comment in .performance-rules, which we don't inherit this line from.
variables: variables:
LAVA_JOB_PRIORITY: 40
MINIO_ARTIFACT_NAME: "mesa-arm64-rel" MINIO_ARTIFACT_NAME: "mesa-arm64-rel"
needs: needs:
- job: debian/arm64_test - job: debian/arm64_test
@@ -556,6 +557,7 @@
when: manual when: manual
allow_failure: true # see comment in .performance-rules, which we don't inherit this line from. allow_failure: true # see comment in .performance-rules, which we don't inherit this line from.
variables: variables:
LAVA_JOB_PRIORITY: 40
MINIO_ARTIFACT_NAME: "mesa-amd64-rel" MINIO_ARTIFACT_NAME: "mesa-amd64-rel"
needs: needs:
- kernel+rootfs_amd64 - kernel+rootfs_amd64
@@ -685,6 +687,7 @@
when: manual when: manual
allow_failure: true # see comment in .performance-rules, which we don't inherit this line from. allow_failure: true # see comment in .performance-rules, which we don't inherit this line from.
variables: variables:
LAVA_JOB_PRIORITY: 40
MINIO_ARTIFACT_NAME: "mesa-amd64-rel" MINIO_ARTIFACT_NAME: "mesa-amd64-rel"
needs: needs:
- kernel+rootfs_amd64 - kernel+rootfs_amd64