@@ -917,15 +917,16 @@ let ci_minimization_extract_job_specific_info ~head_pipeline_summary
917
917
if
918
918
string_match
919
919
~regexp:
920
- " This job ran on the Docker image `\\ ([^`]+\\ )`, depended on the \
921
- build job ` \\ ([^`]+\\ )` with OCaml ` \\ ([^`] +\\ )` .\n\n "
920
+ " This job ran on the Docker image `\\ ([^`]+\\ )` with OCaml ` \\ ([^`]+ \\ )` and depended on jobs \
921
+ \\ (\\ (` [^`]+` ? \\ ) +\\ ) .\n\n "
922
922
summary
923
923
then
924
- let docker_image, build_job, opam_switch =
924
+ let docker_image, opam_switch, dependencies =
925
925
( Str. matched_group 1 summary
926
926
, Str. matched_group 2 summary
927
927
, Str. matched_group 3 summary )
928
928
in
929
+ let dependencies = Str. split (Str. regexp " [ `]+" ) dependencies in
929
930
let missing_error, non_v_file =
930
931
if
931
932
string_match
@@ -941,16 +942,19 @@ let ci_minimization_extract_job_specific_info ~head_pipeline_summary
941
942
else Some filename )
942
943
else (true , None )
943
944
in
945
+ let extract_artifacts url =
946
+ List. partition_map ~f: (fun name ->
947
+ match extract_artifact_url name url with
948
+ | Some v -> First v
949
+ | None -> Second name)
950
+ (name::dependencies)
951
+ in
944
952
match
945
- ( extract_artifact_url build_job base_pipeline_summary
946
- , extract_artifact_url build_job head_pipeline_summary
947
- , extract_artifact_url name base_pipeline_summary
948
- , extract_artifact_url name head_pipeline_summary )
953
+ ( extract_artifacts base_pipeline_summary
954
+ , extract_artifacts head_pipeline_summary )
949
955
with
950
- | ( Some base_build_url
951
- , Some head_build_url
952
- , Some base_job_url
953
- , Some head_job_url ) ->
956
+ | ( (base_urls, [] )
957
+ , (head_urls, [] ) ) ->
954
958
Ok
955
959
( { base_job_failed
956
960
; base_job_errored
@@ -963,26 +967,18 @@ let ci_minimization_extract_job_specific_info ~head_pipeline_summary
963
967
; full_target= name
964
968
; docker_image
965
969
; opam_switch
966
- ; failing_urls= head_build_url ^ " " ^ head_job_url
967
- ; passing_urls= base_build_url ^ " " ^ base_job_url } )
968
- | None , _ , _ , _ ->
969
- Error
970
- (f " Could not find base build job url for %s in:\n %s" build_job
971
- (collapse_summary " Base Pipeline Summary"
972
- base_pipeline_summary ) )
973
- | _ , None , _ , _ ->
974
- Error
975
- (f " Could not find head build job url for %s in:\n %s" build_job
976
- (collapse_summary " Head Pipeline Summary"
977
- head_pipeline_summary ) )
978
- | _ , _ , None , _ ->
970
+ ; failing_urls= String. concat ~sep: " " head_urls
971
+ ; passing_urls= String. concat ~sep: " " base_urls } )
972
+ | (_ , ((_ :: _ ) as base_failed )), _ ->
979
973
Error
980
- (f " Could not find base job url for %s in:\n %s" name
974
+ (f " Could not find base dependencies artifacts for %s in:\n %s"
975
+ (String. concat ~sep: " " base_failed)
981
976
(collapse_summary " Base Pipeline Summary"
982
977
base_pipeline_summary ) )
983
- | _ , _ , _ , None ->
978
+ | _ , ( _ , (( _ :: _ ) as head_failed )) ->
984
979
Error
985
- (f " Could not find head job url for %s in:\n %s" name
980
+ (f " Could not find head dependencies artifacts for %s in:\n %s"
981
+ (String. concat ~sep: " " head_failed)
986
982
(collapse_summary " Head Pipeline Summary"
987
983
head_pipeline_summary ) )
988
984
else
0 commit comments