Dynamic matrix re-run all jobs causing duplicate jobs to appear

I’m using a dynamic matrix and I think this is causing duplicates to show up on the left sidebar when I use “Re-run all jobs”. Here’s an image to illustrate:

As you can see, “Group 1” was cancelled by fail-fast. When I used “Re-run all jobs” it caused a duplicate set of groups to appear. How can I avoid this?

@chingc,

This is a known UI issue similar to that reported in this earlier topic:

I had created an issue ticket (actions/runner#742) to report the problem to the appropriate engineering team for further investigation and evaluation.

you can follow the issue ticket and add your comments to it.

2 Likes

I was able to fix this issue and I think I know what’s going on.

In my original dynamic matrix I had group index and group files. The way my workflow was configured, the files were always shuffled before using set-output… so even if I had the same number of groups they would refer to a different set of files. I think this is what caused the duplicates to appear.

The fix was to separate them into two dynamic matrixes. I use the group index matrix as the matrix for my dependent jobs. Then I would set the group files matrix (which is a json string) as an environment variable. Finally, I use jq and the group index to pluck out the correct group files.

Hope that makes sense.

@chingc,

Glad that the problem has been solved.
And thanks for sharing your experience, this may be helpful to other people who have the similar problems.

1 Like