@@ -252,8 +252,6 @@ jobs:
252252 - true
253253 exclude :
254254 - vm : ${{ inputs.skip-openj9-tests && 'openj9' || '' }}
255- - test-java-version : 25 # renovate: datasource=java-version
256- vm : openj9
257255 fail-fast : false
258256 steps :
259257 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -336,22 +334,27 @@ jobs:
336334 with :
337335 result-encoding : string
338336 script : |
339- const matrix = JSON.parse(process.env.matrix);
340- const job_name = `common / test${ matrix['test-partition'] } (${ matrix['test-java-version'] }, ${ matrix.vm }, indy ${ matrix['test-indy'] })`;
341-
342- const workflow_jobs_nested = await github.paginate(
343- github.rest.actions.listJobsForWorkflowRun,
344- {
345- owner: context.repo.owner,
346- repo: context.repo.repo,
347- run_id: context.runId,
348- per_page: 100
349- },
350- (response) => {
351- return response.data;
352- },
353- );
354- return workflow_jobs_nested.flat().find((job) => job.name === job_name).html_url;
337+ try {
338+ const matrix = JSON.parse(process.env.matrix);
339+ const job_name = `common / test${ matrix['test-partition'] } (${ matrix['test-java-version'] }, ${ matrix.vm }, indy ${ matrix['test-indy'] })`;
340+ const workflow_jobs_nested = await github.paginate(
341+ github.rest.actions.listJobsForWorkflowRun,
342+ {
343+ owner: context.repo.owner,
344+ repo: context.repo.repo,
345+ run_id: context.runId,
346+ per_page: 100
347+ },
348+ (response) => {
349+ return response.data;
350+ },
351+ );
352+ const job = workflow_jobs_nested.flat().find((job) => job.name === job_name);
353+ return job ? job.html_url : '';
354+ } catch (e) {
355+ core.warning(`Failed to get current job url: ${e}`);
356+ return '';
357+ }
355358
356359 - name : Flaky test report
357360 if : ${{ !cancelled() }}
0 commit comments