Fix data race looping over images to sync
requested to merge gitlab-community/gitlab-runner:ajuckel/fix-sync-docker-images-data-race into main
What does this MR do?
Fixes a data race in the building of sync commands.
Why was this MR needed?
To ensure proper deterministic building of sync commands for the requested images.
What's the best way to test this MR?
I've included steps to reproduce the issue in #34658 (closed). I expect those steps to show the erroneous behavior with gitlab-community/gitlab-runner@97568f78 and the correct behavior with gitlab-community/gitlab-runner@56499490.
What are the relevant issue numbers?
Closes: #34658 (closed)
Edited by Anthony Juckel