Module: Mesa Branch: main Commit: fcbfce4e181b25dd0f31bff545c06b08d1871657 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fcbfce4e181b25dd0f31bff545c06b08d1871657
Author: Guilherme Gallo <[email protected]> Date: Tue Aug 2 19:01:32 2022 -0300 ci/bin: Print job needs DAG in ci_run_n_monitor Signed-off-by: Guilherme Gallo <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17791> --- .gitlab-ci/bin/ci_run_n_monitor.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/bin/ci_run_n_monitor.py b/.gitlab-ci/bin/ci_run_n_monitor.py index 193b021ef74..e03a0c6425d 100755 --- a/.gitlab-ci/bin/ci_run_n_monitor.py +++ b/.gitlab-ci/bin/ci_run_n_monitor.py @@ -24,7 +24,7 @@ from typing import Optional import gitlab from colorama import Fore, Style -from gitlab_gql import GitlabGQL, create_job_needs_dag, filter_dag +from gitlab_gql import GitlabGQL, create_job_needs_dag, filter_dag, print_dag REFRESH_WAIT_LOG = 10 REFRESH_WAIT_JOBS = 6 @@ -254,9 +254,14 @@ def find_dependencies(target_job: str, project_path: str, sha: str) -> set[str]: dag, _ = create_job_needs_dag( gql_instance, {"projectPath": project_path.path_with_namespace, "sha": sha} ) + target_dep_dag = filter_dag(dag, target_job) - deps = set(chain.from_iterable(target_dep_dag.values())) - return deps + print(Fore.YELLOW) + print("Detected job dependencies:") + print() + print_dag(target_dep_dag) + print(Fore.RESET) + return set(chain.from_iterable(target_dep_dag.values())) if __name__ == "__main__":
