gitlab_gql: print error returned by server in --print-merged-yaml
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27535>
This commit is contained in:

committed by
Marge Bot

parent
61a125647b
commit
716ed7d62a
@@ -343,8 +343,12 @@ def fetch_merged_yaml(gl_gql: GitlabGQL, params) -> dict[str, Any]:
|
||||
- local: .gitlab-ci.yml
|
||||
""")
|
||||
raw_response = gl_gql.query("job_details.gql", params)
|
||||
if merged_yaml := raw_response["ciConfig"]["mergedYaml"]:
|
||||
ci_config = raw_response["ciConfig"]
|
||||
if merged_yaml := ci_config["mergedYaml"]:
|
||||
return yaml.safe_load(merged_yaml)
|
||||
if "errors" in ci_config:
|
||||
for error in ci_config["errors"]:
|
||||
print(error)
|
||||
|
||||
gl_gql.invalidate_query_cache()
|
||||
raise ValueError(
|
||||
|
Reference in New Issue
Block a user